diff options
author | joerg <joerg@pkgsrc.org> | 2013-05-06 14:41:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-05-06 14:41:07 +0000 |
commit | 71c1f161eab5bb5284d4f716706c91ad6232a563 (patch) | |
tree | 0e0f9c6952b83bc43f9168119191f4a56043944d /databases | |
parent | 5e93c2e4644d2a9a5edd20ab4400e7be7152e8fa (diff) | |
download | pkgsrc-71c1f161eab5bb5284d4f716706c91ad6232a563.tar.gz |
Add more test() changes for the server.
Diffstat (limited to 'databases')
69 files changed, 2165 insertions, 30 deletions
diff --git a/databases/mysql56-client/distinfo b/databases/mysql56-client/distinfo index 706988cf3d5..67848c8e0cf 100644 --- a/databases/mysql56-client/distinfo +++ b/databases/mysql56-client/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2013/04/29 21:16:56 joerg Exp $ +$NetBSD: distinfo,v 1.4 2013/05/06 14:41:07 joerg Exp $ SHA1 (mysql-5.6.11.tar.gz) = 31df6950a9dbf4fcc45f62f44f4dee96ec5b3193 RMD160 (mysql-5.6.11.tar.gz) = acd671ace63cab1ffc442dd7e3ffa10ff9fb4659 @@ -14,8 +14,9 @@ SHA1 (patch-include_my__global.h) = d4574aea74221fe3626f3a0c0f5cee9a4d2f36dc SHA1 (patch-include_my_compare.h) = f45bac4b488332a668b0005751856279b67401f5 SHA1 (patch-include_my_net.h) = b08aa36921efd023f9ecaac4cd3fb8a16d200abd SHA1 (patch-include_my_pthread.h) = ff3bf1fddd04edd7804d810f79de64387464b5ca -SHA1 (patch-include_myisam.h) = 475070d41b06c04c6ae692743fc1b0244afe0a88 +SHA1 (patch-include_myisam.h) = c554a594ea0169cb725cfdfe5accaf231eebdc23 SHA1 (patch-libmysql_libmysql.c) = ad78143ca78b7c512e86677b3dd59e497357f289 +SHA1 (patch-libmysqld_lib__sql.cc) = ffdd74cece2d7795cb4d8d738f81c2c8dc040a7d SHA1 (patch-mysql-test_CMakeLists.txt) = b7dd562d55678b13ac487aa0ee59bf2551af1f9d SHA1 (patch-mysys_mf__iocache.c) = 32a396bba5bdbf96104a9c74b695305d7367785a SHA1 (patch-mysys_my__copy.c) = af2827cdd91d74be1bbce8aba890acf59fa2247e @@ -25,14 +26,79 @@ SHA1 (patch-scripts_CMakeLists.txt) = 3f4621b3256034c5a3114e98c108658794f06008 SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b SHA1 (patch-sql-common_client.c) = f9ecb9bb381d44ca8b551a27150fc40da887a5e9 SHA1 (patch-sql_CMakeLists.txt) = 83c1e50de6b53a0af5ff010f248dd595745b3eb5 +SHA1 (patch-sql_event__db__repository.cc) = 7a7f95b9db61c690aa6edf55503311a13def59ec +SHA1 (patch-sql_field.cc) = 54bd0505251714d18840c79260a18dec92fd3d23 +SHA1 (patch-sql_field.h) = bf0d326ffb0ddf6ce31d962c2ddb1cde5042697d +SHA1 (patch-sql_field__conv.cc) = 10847e2fc2b7bb078b125877ffd9efbbc2ba6b28 +SHA1 (patch-sql_ha__ndbcluster.cc) = f46816ab5437ef4b2618e83dc6efa6009acf5167 +SHA1 (patch-sql_ha__partition.cc) = 712dfefe65f6671c3c834ab07111f828b44b9b92 +SHA1 (patch-sql_handler.cc) = e41db8bfae19a7638048ccc37a9f9511f4304b35 +SHA1 (patch-sql_handler.h) = e45c9fab750910ef7f02a714c1a4684303cb05a0 +SHA1 (patch-sql_item.cc) = cf523f4377788ca2342d6913f22e6e2be21e7b94 +SHA1 (patch-sql_item.h) = 8b8be81418254aac383464e9b358268343a9a55d +SHA1 (patch-sql_item__cmpfunc.cc) = 2b2fc56bc4d32d5d831432f5eaee02da3799ac1c +SHA1 (patch-sql_item__cmpfunc.h) = d8dad92cf35cb305de60d3b9a4a02f2b78bd4aed +SHA1 (patch-sql_item__func.cc) = 0516bd8c9ab2a75374b55d78c52853ba0be5ae7a +SHA1 (patch-sql_item__geofunc.cc) = 19d733b40f48ff0b2432c0b7f7f9eb48062bf831 +SHA1 (patch-sql_item__strfunc.cc) = a4d7113b090cca62c44c26e2a159d4c321082c44 +SHA1 (patch-sql_item__subselect.cc) = eb86202f925a931ac1dca1d087b61e00dc7c5287 +SHA1 (patch-sql_item__subselect.h) = b29a58e9373d81d52bcdb113ce5f447123f273a1 +SHA1 (patch-sql_item__sum.cc) = a2f2e21bc8ad4ee66fa638d3836b103590e052b9 +SHA1 (patch-sql_item__timefunc.cc) = f00211a5d4229767c09df155773386e3dc978073 +SHA1 (patch-sql_key.cc) = fe9010507c34187839c6fa9869badcda085487ae SHA1 (patch-sql_log__event.cc) = ce88494dbadbcebe41499eea6acf2990f4e3c4dc SHA1 (patch-sql_log_event.h) = a413038ffa29103c75e1d243864615ccb3d9621e -SHA1 (patch-sql_mysqld.cc) = 84e5e72e5f7c199bb15075549514df02a1ac61a1 +SHA1 (patch-sql_mysqld.cc) = 873100c333038666bcf34ea1f199b202881889cd SHA1 (patch-sql_net__serv.cc) = caec72290ef36ddbae82bdc09d11f7e2e69a20fc +SHA1 (patch-sql_opt__range.cc) = b6a1d2f9da0b343be634fd4ed0f9729990cf86f4 +SHA1 (patch-sql_opt__range.h) = 392cfb7bd5c24d250a8647de84bbb53cb502c5c3 +SHA1 (patch-sql_opt__sum.cc) = e949b6622c4d4482a64ed1200fa076ef378a3f69 SHA1 (patch-sql_password.c) = 347fee69188e4ab96e990fc431bad81a57ec0f4d +SHA1 (patch-sql_rpl__mi.cc) = a015854ad02b3ab074b50ec545f1e43ea8b6e416 +SHA1 (patch-sql_rpl__slave.cc) = a4a8140c2ebf5336374604c6a521427aa1035119 +SHA1 (patch-sql_set__var.cc) = a3760b8fdfb69ea91c2b8e39a2630af61e65068a +SHA1 (patch-sql_sp__head.h) = 6a5dfe3dbb6fcf1017df1762ea72e3831d231508 +SHA1 (patch-sql_sp__rcontext.h) = 8e6bd781d8df1b048223e5cf28080ab56e8dc128 +SHA1 (patch-sql_sql__acl.cc) = 43b3ab0b169450e125c8a1fc4b72285e28d296c9 +SHA1 (patch-sql_sql__admin.cc) = 7cea08b02526133d670ba9d4e2bf6da89527a6d2 +SHA1 (patch-sql_sql__base.cc) = 8072a33fd406ea92caca5643a05abbe9271d05cb +SHA1 (patch-sql_sql__bitmap.h) = 5317e0020f8b779ff3440a9da672c2e54a409428 +SHA1 (patch-sql_sql__cache.cc) = 52b013571237de20e38f6af7a02bdee40270bfe4 +SHA1 (patch-sql_sql__class.cc) = 862c025d2934d5dfd88c294dc7a5e37bbf45ecdb +SHA1 (patch-sql_sql__class.h) = 2c1ea583edac107d20e616ecaf6ef5d50837faaf +SHA1 (patch-sql_sql__delete.cc) = e7873801ad91d9a566bcb2aea7f5c306c2e4bdac +SHA1 (patch-sql_sql__executor.cc) = 8fcb5070c5651fea3207f872e88f33505db168d4 +SHA1 (patch-sql_sql__insert.cc) = e2dec778b9545039bfd3a0dae0519b71f8d17953 +SHA1 (patch-sql_sql__join__buffer.cc) = 52aab8731d7b2c9be8e4d5ab8b241d316d194d44 +SHA1 (patch-sql_sql__lex.cc) = b56d6b0e23123c9561416a1f3da35e3bd4cdac25 +SHA1 (patch-sql_sql__lex.h) = 480ff45d47c236297a62143fd9e634f71a3fb138 +SHA1 (patch-sql_sql__load.cc) = 2deaed8591f8de74c785551e25c446f1495f6761 +SHA1 (patch-sql_sql__optimizer.cc) = 0dd2fbe662fb9f5295fdc5f56b5bb31e21ef2b6e +SHA1 (patch-sql_sql__optimizer.h) = 6104052027b9270540a7050d546a0d013ae86b8c +SHA1 (patch-sql_sql__parse.cc) = 762aa7c8f535cfc31d0af64d8398bf45b83a01f2 +SHA1 (patch-sql_sql__partition.cc) = af69c918da14566b45beb757902b03b83aa8e36f +SHA1 (patch-sql_sql__planner.cc) = f3540275174e4ab68950c579d424a2bc118eb292 +SHA1 (patch-sql_sql__prepare.cc) = 886ee8ca5863704ddf172eb746c092f308e6ca1c +SHA1 (patch-sql_sql__prepare.h) = 30b520b1dea2b8d8225c528ba58b9231d94a85dd +SHA1 (patch-sql_sql__select.cc) = 30f2df455e1018088efdf896432f4fe35fb9b2f9 +SHA1 (patch-sql_sql__select.h) = 324ebb62c71d72e7a948921cfdec9f3401771100 +SHA1 (patch-sql_sql__show.cc) = e606a267e86b9c63a46db972739561325fef7ee4 +SHA1 (patch-sql_sql__table.cc) = 6f87b68bca9b0a50c50c2392ea342005d53fd5cd +SHA1 (patch-sql_sql__time.cc) = 7a27d9656020676cb8a211befcceb3e3b25670fb +SHA1 (patch-sql_sql__tmp__table.cc) = 5fa1a1b0bb7e245e1f618e7b7536bdf5f69b9528 +SHA1 (patch-sql_sql__union.cc) = 0e0dd504eb91512d9ea668d7b09b09d25b3b3c2e +SHA1 (patch-sql_sql__update.cc) = 9a56187727fd1538b059e2d87ca0ec15ebf3e0ff SHA1 (patch-sql_sql_string.h) = 1ce4d4db59310ea45e384f34e33c0d61935059bf +SHA1 (patch-sql_sys__vars.cc) = f122050ef87e673763db4fa64202139834400d2c +SHA1 (patch-sql_table.cc) = ec9bb0891319918c306b0349fe43647e979bec4c +SHA1 (patch-sql_transaction.cc) = 76316a7f0e7a81f47d194a0a1693b07873922969 +SHA1 (patch-sql_tztime.cc) = b17a31afe95cc220b57906d263c5783793c169f4 +SHA1 (patch-sql_unireg.cc) = 0d94b247c36838abe5cb683782dd16c05b322f32 +SHA1 (patch-storage_federated_ha__federated.cc) = 17e575d4382a6d4c9005be77e7b4254380226e7c +SHA1 (patch-storage_heap_ha__heap.cc) = 8c3e426b34f5bbf2b527e539a91abfb806e14aa5 SHA1 (patch-storage_heap_hp__hash.c) = a3bd242d72e398fcc6fe6450cf05066c1ddae664 SHA1 (patch-storage_myisam_ft__boolean__search.c) = dbace659ea15b5abe14008c1d798414cda708395 +SHA1 (patch-storage_myisam_ha__myisam.cc) = 758d5a161a2ef5daf864fa67a0d678d87b8be0aa SHA1 (patch-storage_myisam_mi__check.c) = 9a3101680f72329158947d04ccce07ef0db821aa SHA1 (patch-storage_myisam_mi__create.c) = 3267429a40936f1e134f5d309b6c2391d00ce708 SHA1 (patch-storage_myisam_mi__delete.c) = ba1cab21c4cc5b8a98d16742b77d66559cbef374 @@ -47,3 +113,4 @@ SHA1 (patch-storage_ndb_include_util_Parser.hpp) = 037fc153619bf79ee95cb03a5ac4a SHA1 (patch-strings_decimal.c) = 139d86a21d785873e83bd4c97f16fa8180194ebc SHA1 (patch-vio_vio.c) = 01fe3274ad967b1035e2c354287fd2e57547ab53 SHA1 (patch-vio_viosocket.c) = d3179887e8154f8b7560b083fff6d23bfef7bc39 +SHA1 (patch-vio_viossl.c) = 81f1386cd719d87c02ecf4fc47b1f7bb6e6ea389 diff --git a/databases/mysql56-client/patches/patch-include_myisam.h b/databases/mysql56-client/patches/patch-include_myisam.h index b16ce5843ee..49e7fb7bb18 100644 --- a/databases/mysql56-client/patches/patch-include_myisam.h +++ b/databases/mysql56-client/patches/patch-include_myisam.h @@ -1,15 +1,35 @@ -$NetBSD: patch-include_myisam.h,v 1.1 2013/02/13 21:00:05 adam Exp $ +$NetBSD: patch-include_myisam.h,v 1.2 2013/05/06 14:41:08 joerg Exp $ Adjust MI_MAX_KEY_LENGTH x4. ---- include/myisam.h.orig 2010-02-04 11:37:06.000000000 +0000 +--- include/myisam.h.orig 2013-05-05 21:55:07.000000000 +0000 +++ include/myisam.h -@@ -49,7 +49,7 @@ extern "C" { - The following defines can be increased if necessary. - But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH. - */ --#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */ -+#define MI_MAX_KEY_LENGTH 4000 /* Max length in bytes */ - #define MI_MAX_KEY_SEG 16 /* Max segments for key */ +@@ -80,8 +80,8 @@ extern "C" { - #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8) + #define mi_is_key_active(_keymap_,_keyno_) \ + (((_keyno_) < MI_KEYMAP_BITS) ? \ +- test((_keymap_) & (ULL(1) << (_keyno_))) : \ +- test((_keymap_) & MI_KEYMAP_HIGH_MASK)) ++ my_test((_keymap_) & (ULL(1) << (_keyno_))) : \ ++ my_test((_keymap_) & MI_KEYMAP_HIGH_MASK)) + #define mi_set_key_active(_keymap_,_keyno_) \ + (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \ + (ULL(1) << (_keyno_)) : \ +@@ -94,7 +94,7 @@ extern "C" { + #else + + #define mi_is_key_active(_keymap_,_keyno_) \ +- test((_keymap_) & (ULL(1) << (_keyno_))) ++ my_test((_keymap_) & (ULL(1) << (_keyno_))) + #define mi_set_key_active(_keymap_,_keyno_) \ + (_keymap_)|= (ULL(1) << (_keyno_)) + #define mi_clear_key_active(_keymap_,_keyno_) \ +@@ -103,7 +103,7 @@ extern "C" { + #endif + + #define mi_is_any_key_active(_keymap_) \ +- test((_keymap_)) ++ my_test((_keymap_)) + #define mi_is_all_keys_active(_keymap_,_keys_) \ + ((_keymap_) == mi_get_mask_all_keys_active(_keys_)) + #define mi_set_all_keys_active(_keymap_,_keys_) \ diff --git a/databases/mysql56-client/patches/patch-libmysqld_lib__sql.cc b/databases/mysql56-client/patches/patch-libmysqld_lib__sql.cc new file mode 100644 index 00000000000..77ebdd85fc4 --- /dev/null +++ b/databases/mysql56-client/patches/patch-libmysqld_lib__sql.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-libmysqld_lib__sql.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- libmysqld/lib_sql.cc.orig 2013-05-05 21:46:06.000000000 +0000 ++++ libmysqld/lib_sql.cc +@@ -337,7 +337,7 @@ static int emb_stmt_execute(MYSQL_STMT * + thd->client_param_count= stmt->param_count; + thd->client_params= stmt->params; + +- res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, ++ res= my_test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, + header, sizeof(header), 1, stmt) || + emb_read_query_result(stmt->mysql)); + stmt->affected_rows= stmt->mysql->affected_rows; diff --git a/databases/mysql56-client/patches/patch-sql_event__db__repository.cc b/databases/mysql56-client/patches/patch-sql_event__db__repository.cc new file mode 100644 index 00000000000..0cc1be0b22e --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_event__db__repository.cc @@ -0,0 +1,58 @@ +$NetBSD: patch-sql_event__db__repository.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/event_db_repository.cc.orig 2013-04-05 12:27:18.000000000 +0000 ++++ sql/event_db_repository.cc +@@ -469,7 +469,7 @@ Event_db_repository::index_read_for_db_f + end: + event_table->file->ha_index_end(); + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + +@@ -743,7 +743,7 @@ end: + thd->mdl_context.rollback_to_savepoint(mdl_savepoint); + + thd->variables.sql_mode= saved_mode; +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + +@@ -858,7 +858,7 @@ end: + thd->mdl_context.rollback_to_savepoint(mdl_savepoint); + + thd->variables.sql_mode= saved_mode; +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + +@@ -918,7 +918,7 @@ end: + close_thread_tables(thd); + thd->mdl_context.rollback_to_savepoint(mdl_savepoint); + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + +@@ -1153,7 +1153,7 @@ end: + if (save_binlog_row_based) + thd->set_current_stmt_binlog_format_row(); + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + +@@ -1230,7 +1230,7 @@ Event_db_repository::check_system_tables + close_mysql_tables(thd); + } + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + /** diff --git a/databases/mysql56-client/patches/patch-sql_field.cc b/databases/mysql56-client/patches/patch-sql_field.cc new file mode 100644 index 00000000000..216bd2652f4 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_field.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_field.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/field.cc.orig 2013-04-05 12:27:18.000000000 +0000 ++++ sql/field.cc +@@ -1855,7 +1855,7 @@ type_conversion_status Field::store_time + + bool Field::optimize_range(uint idx, uint part) + { +- return test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); ++ return my_test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); + } + + +@@ -9514,7 +9514,7 @@ void Create_field::create_length_to_inte + { + pack_length= length / 8; + /* We need one extra byte to store the bits we save among the null bits */ +- key_length= pack_length + test(length & 7); ++ key_length= pack_length + my_test(length & 7); + } + break; + case MYSQL_TYPE_NEWDECIMAL: diff --git a/databases/mysql56-client/patches/patch-sql_field.h b/databases/mysql56-client/patches/patch-sql_field.h new file mode 100644 index 00000000000..1ed62d43cd5 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_field.h @@ -0,0 +1,29 @@ +$NetBSD: patch-sql_field.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/field.h.orig 2013-05-05 20:53:17.000000000 +0000 ++++ sql/field.h +@@ -887,10 +887,10 @@ public: + } + + bool is_real_null(my_ptrdiff_t row_offset= 0) const +- { return real_maybe_null() ? test(null_ptr[row_offset] & null_bit) : false; } ++ { return real_maybe_null() ? my_test(null_ptr[row_offset] & null_bit) : false; } + + bool is_null_in_record(const uchar *record) const +- { return real_maybe_null() ? test(record[null_offset()] & null_bit) : false; } ++ { return real_maybe_null() ? my_test(record[null_offset()] & null_bit) : false; } + + void set_null(my_ptrdiff_t row_offset= 0) + { +@@ -3652,9 +3652,9 @@ public: + { + DBUG_ASSERT(ptr == a || ptr == b); + if (ptr == a) +- return Field_bit::key_cmp(b, bytes_in_rec+test(bit_len)); ++ return Field_bit::key_cmp(b, bytes_in_rec+my_test(bit_len)); + else +- return Field_bit::key_cmp(a, bytes_in_rec+test(bit_len)) * -1; ++ return Field_bit::key_cmp(a, bytes_in_rec+my_test(bit_len)) * -1; + } + int cmp_binary_offset(uint row_offset) + { return cmp_offset(row_offset); } diff --git a/databases/mysql56-client/patches/patch-sql_field__conv.cc b/databases/mysql56-client/patches/patch-sql_field__conv.cc new file mode 100644 index 00000000000..447c67b5a5f --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_field__conv.cc @@ -0,0 +1,20 @@ +$NetBSD: patch-sql_field__conv.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/field_conv.cc.orig 2013-05-05 20:55:14.000000000 +0000 ++++ sql/field_conv.cc +@@ -330,7 +330,7 @@ static void do_field_int(Copy_field *cop + { + longlong value= copy->from_field->val_int(); + copy->to_field->store(value, +- test(copy->from_field->flags & UNSIGNED_FLAG)); ++ my_test(copy->from_field->flags & UNSIGNED_FLAG)); + } + + static void do_field_real(Copy_field *copy) +@@ -898,5 +898,5 @@ type_conversion_status field_conv(Field + return to->store_decimal(from->val_decimal(&buff)); + } + else +- return to->store(from->val_int(), test(from->flags & UNSIGNED_FLAG)); ++ return to->store(from->val_int(), my_test(from->flags & UNSIGNED_FLAG)); + } diff --git a/databases/mysql56-client/patches/patch-sql_ha__ndbcluster.cc b/databases/mysql56-client/patches/patch-sql_ha__ndbcluster.cc new file mode 100644 index 00000000000..73cb4ab06a3 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_ha__ndbcluster.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_ha__ndbcluster.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/ha_ndbcluster.cc.orig 2013-05-05 20:55:16.000000000 +0000 ++++ sql/ha_ndbcluster.cc +@@ -2807,7 +2807,7 @@ int ha_ndbcluster::open_indexes(THD *thd + if (check_index_fields_not_null(key_info)) + m_index[i].null_in_unique_index= TRUE; + +- if (error == 0 && test(index_flags(i, 0, 0) & HA_READ_RANGE)) ++ if (error == 0 && my_test(index_flags(i, 0, 0) & HA_READ_RANGE)) + btree_keys.set_bit(i); + } + diff --git a/databases/mysql56-client/patches/patch-sql_ha__partition.cc b/databases/mysql56-client/patches/patch-sql_ha__partition.cc new file mode 100644 index 00000000000..dc333fcd29d --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_ha__partition.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_ha__partition.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/ha_partition.cc.orig 2013-05-05 20:55:18.000000000 +0000 ++++ sql/ha_partition.cc +@@ -3192,7 +3192,7 @@ int ha_partition::open(const char *name, + m_mode= mode; + m_open_test_lock= test_if_locked; + m_part_field_array= m_part_info->full_part_field_array; +- if (get_from_handler_file(name, &table->mem_root, test(m_is_clone_of))) ++ if (get_from_handler_file(name, &table->mem_root, my_test(m_is_clone_of))) + DBUG_RETURN(error); + name_buffer_ptr= m_name_buffer_ptr; + if (populate_partition_name_hash()) +@@ -5480,7 +5480,7 @@ int ha_partition::read_range_first(const + m_start_key.key= NULL; + + m_index_scan_type= partition_read_range; +- error= common_index_read(m_rec0, test(start_key)); ++ error= common_index_read(m_rec0, my_test(start_key)); + DBUG_RETURN(error); + } + +@@ -7480,7 +7480,7 @@ uint32 ha_partition::calculate_key_hash_ + ulong nr1= 1; + ulong nr2= 4; + bool use_51_hash; +- use_51_hash= test((*field_array)->table->part_info->key_algorithm == ++ use_51_hash= my_test((*field_array)->table->part_info->key_algorithm == + partition_info::KEY_ALGORITHM_51); + + do diff --git a/databases/mysql56-client/patches/patch-sql_handler.cc b/databases/mysql56-client/patches/patch-sql_handler.cc new file mode 100644 index 00000000000..ef9413912de --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_handler.cc @@ -0,0 +1,58 @@ +$NetBSD: patch-sql_handler.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/handler.cc.orig 2013-05-05 20:55:20.000000000 +0000 ++++ sql/handler.cc +@@ -5722,7 +5722,7 @@ handler::multi_range_read_init(RANGE_SEQ + DBUG_ENTER("handler::multi_range_read_init"); + mrr_iter= seq_funcs->init(seq_init_param, n_ranges, mode); + mrr_funcs= *seq_funcs; +- mrr_is_output_sorted= test(mode & HA_MRR_SORTED); ++ mrr_is_output_sorted= my_test(mode & HA_MRR_SORTED); + mrr_have_range= FALSE; + DBUG_RETURN(0); + } +@@ -5778,7 +5778,7 @@ scan_it_again: + &mrr_cur_range.start_key : 0, + mrr_cur_range.end_key.keypart_map ? + &mrr_cur_range.end_key : 0, +- test(mrr_cur_range.range_flag & EQ_RANGE), ++ my_test(mrr_cur_range.range_flag & EQ_RANGE), + mrr_is_output_sorted); + if (result != HA_ERR_END_OF_FILE) + break; +@@ -5875,7 +5875,7 @@ int DsMrr_impl::dsmrr_init(handler *h_ar + + rowids_buf= buf->buffer; + +- is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION); ++ is_mrr_assoc= !my_test(mode & HA_MRR_NO_ASSOCIATION); + + if (is_mrr_assoc) + status_var_increment(table->in_use->status_var.ha_multi_range_read_init_count); +@@ -6113,7 +6113,7 @@ int DsMrr_impl::dsmrr_fill_buffer() + + if (res && res != HA_ERR_END_OF_FILE) + DBUG_RETURN(res); +- dsmrr_eof= test(res == HA_ERR_END_OF_FILE); ++ dsmrr_eof= my_test(res == HA_ERR_END_OF_FILE); + + /* Sort the buffer contents by rowid */ + uint elem_size= h->ref_length + (int)is_mrr_assoc * sizeof(void*); +@@ -6166,7 +6166,7 @@ int DsMrr_impl::dsmrr_next(char **range_ + if (is_mrr_assoc) + memcpy(&cur_range_info, rowids_buf_cur + h->ref_length, sizeof(uchar**)); + +- rowids_buf_cur += h->ref_length + sizeof(void*) * test(is_mrr_assoc); ++ rowids_buf_cur += h->ref_length + sizeof(void*) * my_test(is_mrr_assoc); + if (h2->mrr_funcs.skip_record && + h2->mrr_funcs.skip_record(h2->mrr_iter, (char *) cur_range_info, rowid)) + continue; +@@ -6388,7 +6388,7 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost + double index_read_cost; + + const uint elem_size= h->ref_length + +- sizeof(void*) * (!test(flags & HA_MRR_NO_ASSOCIATION)); ++ sizeof(void*) * (!my_test(flags & HA_MRR_NO_ASSOCIATION)); + const ha_rows max_buff_entries= *buffer_size / elem_size; + + if (!max_buff_entries) diff --git a/databases/mysql56-client/patches/patch-sql_handler.h b/databases/mysql56-client/patches/patch-sql_handler.h new file mode 100644 index 00000000000..f6c0bcb1a20 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_handler.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_handler.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/handler.h.orig 2013-05-05 20:53:53.000000000 +0000 ++++ sql/handler.h +@@ -3334,7 +3334,7 @@ static inline const char *ha_resolve_sto + + static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint32 flag) + { +- return db_type == NULL ? FALSE : test(db_type->flags & flag); ++ return db_type == NULL ? FALSE : my_test(db_type->flags & flag); + } + + static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) diff --git a/databases/mysql56-client/patches/patch-sql_item.cc b/databases/mysql56-client/patches/patch-sql_item.cc new file mode 100644 index 00000000000..52e34341c4c --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item.cc.orig 2013-04-05 12:27:18.000000000 +0000 ++++ sql/item.cc +@@ -2545,7 +2545,7 @@ void Item_field::set_field(Field *field_ + field_name= field_par->field_name; + db_name= field_par->table->s->db.str; + alias_name_used= field_par->table->alias_name_used; +- unsigned_flag=test(field_par->flags & UNSIGNED_FLAG); ++ unsigned_flag=my_test(field_par->flags & UNSIGNED_FLAG); + collation.set(field_par->charset(), field_par->derivation(), + field_par->repertoire()); + fix_char_length(field_par->char_length()); diff --git a/databases/mysql56-client/patches/patch-sql_item.h b/databases/mysql56-client/patches/patch-sql_item.h new file mode 100644 index 00000000000..c2551f29a40 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item.h @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_item.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item.h.orig 2013-05-05 20:52:25.000000000 +0000 ++++ sql/item.h +@@ -1637,7 +1637,7 @@ public: + { + if (is_expensive_cache < 0) + is_expensive_cache= walk(&Item::is_expensive_processor, 0, (uchar*)0); +- return test(is_expensive_cache); ++ return my_test(is_expensive_cache); + } + virtual bool can_be_evaluated_now() const; + uint32 max_char_length() const +@@ -2578,7 +2578,7 @@ public: + virtual void print(String *str, enum_query_type query_type); + Item_num *neg() { value= -value; return this; } + uint decimal_precision() const +- { return (uint)(max_length - test(value < 0)); } ++ { return (uint)(max_length - my_test(value < 0)); } + bool eq(const Item *, bool binary_cmp) const; + bool check_partition_func_processor(uchar *bool_arg) { return FALSE;} + }; +@@ -4168,7 +4168,7 @@ public: + virtual void store(Item *item); + virtual bool cache_value()= 0; + bool basic_const_item() const +- { return test(example && example->basic_const_item());} ++ { return my_test(example && example->basic_const_item());} + bool walk (Item_processor processor, bool walk_subquery, uchar *argument); + virtual void clear() { null_value= TRUE; value_cached= FALSE; } + bool is_null() { return value_cached ? null_value : example->is_null(); } diff --git a/databases/mysql56-client/patches/patch-sql_item__cmpfunc.cc b/databases/mysql56-client/patches/patch-sql_item__cmpfunc.cc new file mode 100644 index 00000000000..ee801221be5 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__cmpfunc.cc @@ -0,0 +1,101 @@ +$NetBSD: patch-sql_item__cmpfunc.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_cmpfunc.cc.orig 2013-05-05 20:55:22.000000000 +0000 ++++ sql/item_cmpfunc.cc +@@ -497,7 +497,7 @@ static bool convert_constant_item(THD *t + *item) : + #endif + new Item_int_with_ref(field->val_int(), *item, +- test(field->flags & UNSIGNED_FLAG)); ++ my_test(field->flags & UNSIGNED_FLAG)); + if (tmp) + thd->change_item_tree(item, tmp); + result= 1; // Item was replaced +@@ -1425,8 +1425,8 @@ int Arg_comparator::compare_e_string() + res1= (*a)->val_str(&value1); + res2= (*b)->val_str(&value2); + if (!res1 || !res2) +- return test(res1 == res2); +- return test(sortcmp(res1, res2, cmp_collation.collation) == 0); ++ return my_test(res1 == res2); ++ return my_test(sortcmp(res1, res2, cmp_collation.collation) == 0); + } + + +@@ -1436,8 +1436,8 @@ int Arg_comparator::compare_e_binary_str + res1= (*a)->val_str(&value1); + res2= (*b)->val_str(&value2); + if (!res1 || !res2) +- return test(res1 == res2); +- return test(stringcmp(res1, res2) == 0); ++ return my_test(res1 == res2); ++ return my_test(stringcmp(res1, res2) == 0); + } + + +@@ -1492,8 +1492,8 @@ int Arg_comparator::compare_e_real() + double val1= (*a)->val_real(); + double val2= (*b)->val_real(); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return test(val1 == val2); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return my_test(val1 == val2); + } + + int Arg_comparator::compare_e_decimal() +@@ -1502,8 +1502,8 @@ int Arg_comparator::compare_e_decimal() + my_decimal *val1= (*a)->val_decimal(&decimal1); + my_decimal *val2= (*b)->val_decimal(&decimal2); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return test(my_decimal_cmp(val1, val2) == 0); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return my_test(my_decimal_cmp(val1, val2) == 0); + } + + +@@ -1541,8 +1541,8 @@ int Arg_comparator::compare_e_real_fixed + double val1= (*a)->val_real(); + double val2= (*b)->val_real(); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return test(val1 == val2 || fabs(val1 - val2) < precision); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return my_test(val1 == val2 || fabs(val1 - val2) < precision); + } + + +@@ -1616,8 +1616,8 @@ int Arg_comparator::compare_e_time_packe + longlong val1= (*a)->val_time_temporal(); + longlong val2= (*b)->val_time_temporal(); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return test(val1 == val2); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return my_test(val1 == val2); + } + + +@@ -1708,8 +1708,8 @@ int Arg_comparator::compare_e_int() + longlong val1= (*a)->val_int(); + longlong val2= (*b)->val_int(); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return test(val1 == val2); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return my_test(val1 == val2); + } + + /** +@@ -1720,8 +1720,8 @@ int Arg_comparator::compare_e_int_diff_s + longlong val1= (*a)->val_int(); + longlong val2= (*b)->val_int(); + if ((*a)->null_value || (*b)->null_value) +- return test((*a)->null_value && (*b)->null_value); +- return (val1 >= 0) && test(val1 == val2); ++ return my_test((*a)->null_value && (*b)->null_value); ++ return (val1 >= 0) && my_test(val1 == val2); + } + + int Arg_comparator::compare_row() diff --git a/databases/mysql56-client/patches/patch-sql_item__cmpfunc.h b/databases/mysql56-client/patches/patch-sql_item__cmpfunc.h new file mode 100644 index 00000000000..2da592e7fe7 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__cmpfunc.h @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_item__cmpfunc.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_cmpfunc.h.orig 2013-05-05 20:53:04.000000000 +0000 ++++ sql/item_cmpfunc.h +@@ -400,7 +400,7 @@ public: + Item_func::print_op(str, query_type); + } + +- bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); } ++ bool is_null() { return my_test(args[0]->is_null() || args[1]->is_null()); } + const CHARSET_INFO *compare_collation() + { return cmp.cmp_collation.collation; } + void top_level_item() { abort_on_null= TRUE; } +@@ -950,7 +950,7 @@ public: + /* Compare values number pos1 and pos2 for equality */ + bool compare_elems(uint pos1, uint pos2) + { +- return test(compare(collation, base + pos1*size, base + pos2*size)); ++ return my_test(compare(collation, base + pos1*size, base + pos2*size)); + } + virtual Item_result result_type()= 0; + }; diff --git a/databases/mysql56-client/patches/patch-sql_item__func.cc b/databases/mysql56-client/patches/patch-sql_item__func.cc new file mode 100644 index 00000000000..eab6fd4f60d --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__func.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_item__func.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_func.cc.orig 2013-05-05 20:55:24.000000000 +0000 ++++ sql/item_func.cc +@@ -2474,7 +2474,7 @@ void Item_func_round::fix_length_and_dec + case INT_RESULT: + if ((!decimals_to_set && truncate) || (args[0]->decimal_precision() < DECIMAL_LONGLONG_DIGITS)) + { +- int length_can_increase= test(!truncate && (val1 < 0) && !val1_unsigned); ++ int length_can_increase= my_test(!truncate && (val1 < 0) && !val1_unsigned); + max_length= args[0]->max_length + length_can_increase; + /* Here we can keep INT_RESULT */ + hybrid_type= INT_RESULT; +@@ -4555,7 +4555,7 @@ longlong Item_func_sleep::val_int() + + mysql_cond_destroy(&cond); + +- return test(!error); // Return 1 killed ++ return my_test(!error); // Return 1 killed + } + + +@@ -4726,7 +4726,7 @@ bool user_var_entry::realloc(uint length + bool user_var_entry::store(void *from, uint length, Item_result type) + { + // Store strings with end \0 +- if (realloc(length + test(type == STRING_RESULT))) ++ if (realloc(length + my_test(type == STRING_RESULT))) + return true; + if (type == STRING_RESULT) + m_ptr[length]= 0; // Store end \0 +@@ -6694,7 +6694,7 @@ void Item_func_sp::fix_length_and_dec() + max_length= sp_result_field->field_length; + collation.set(sp_result_field->charset()); + maybe_null= 1; +- unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG); ++ unsigned_flag= my_test(sp_result_field->flags & UNSIGNED_FLAG); + + DBUG_VOID_RETURN; + } diff --git a/databases/mysql56-client/patches/patch-sql_item__geofunc.cc b/databases/mysql56-client/patches/patch-sql_item__geofunc.cc new file mode 100644 index 00000000000..a7a04577e3d --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__geofunc.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item__geofunc.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_geofunc.cc.orig 2013-05-05 20:55:27.000000000 +0000 ++++ sql/item_geofunc.cc +@@ -262,7 +262,7 @@ String *Item_func_centroid::val_str(Stri + srid= uint4korr(swkb->ptr()); + str->q_append(srid); + +- return (null_value= test(geom->centroid(str))) ? 0 : str; ++ return (null_value= my_test(geom->centroid(str))) ? 0 : str; + } + + diff --git a/databases/mysql56-client/patches/patch-sql_item__strfunc.cc b/databases/mysql56-client/patches/patch-sql_item__strfunc.cc new file mode 100644 index 00000000000..ae271f967a7 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__strfunc.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item__strfunc.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_strfunc.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/item_strfunc.cc +@@ -100,7 +100,7 @@ bool Item_str_func::fix_fields(THD *thd, + bool res= Item_func::fix_fields(thd, ref); + /* + In Item_str_func::check_well_formed_result() we may set null_value +- flag on the same condition as in test() below. ++ flag on the same condition as in my_test() below. + */ + maybe_null= (maybe_null || thd->is_strict_mode()); + return res; diff --git a/databases/mysql56-client/patches/patch-sql_item__subselect.cc b/databases/mysql56-client/patches/patch-sql_item__subselect.cc new file mode 100644 index 00000000000..ace501a8963 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__subselect.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_item__subselect.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_subselect.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/item_subselect.cc +@@ -3588,7 +3588,7 @@ bool subselect_hash_sj_engine::setup(Lis + /* TODO: + the NULL byte is taken into account in + key_parts[part_no].store_length, so instead of +- cur_ref_buff + test(maybe_null), we could ++ cur_ref_buff + my_test(maybe_null), we could + use that information instead. + */ + cur_ref_buff + (nullable ? 1 : 0), +@@ -3697,7 +3697,7 @@ bool subselect_hash_sj_engine::exec() + goto err; /* purecov: inspected */ + + materialize_engine->join->exec(); +- if ((res= test(materialize_engine->join->error || thd->is_fatal_error))) ++ if ((res= my_test(materialize_engine->join->error || thd->is_fatal_error))) + goto err; + + /* diff --git a/databases/mysql56-client/patches/patch-sql_item__subselect.h b/databases/mysql56-client/patches/patch-sql_item__subselect.h new file mode 100644 index 00000000000..0e728dcaa03 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__subselect.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item__subselect.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_subselect.h.orig 2013-05-05 20:54:13.000000000 +0000 ++++ sql/item_subselect.h +@@ -433,7 +433,7 @@ public: + if ( pushed_cond_guards) + pushed_cond_guards[i]= v; + } +- bool have_guarded_conds() { return test(pushed_cond_guards); } ++ bool have_guarded_conds() { return my_test(pushed_cond_guards); } + + Item_in_subselect(Item * left_expr, st_select_lex *select_lex); + Item_in_subselect() diff --git a/databases/mysql56-client/patches/patch-sql_item__sum.cc b/databases/mysql56-client/patches/patch-sql_item__sum.cc new file mode 100644 index 00000000000..4bf3b2b8803 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__sum.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item__sum.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_sum.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/item_sum.cc +@@ -3417,7 +3417,7 @@ bool Item_func_group_concat::setup(THD * + { + List<Item> list; + SELECT_LEX *select_lex= thd->lex->current_select; +- const bool order_or_distinct= test(arg_count_order > 0 || distinct); ++ const bool order_or_distinct= my_test(arg_count_order > 0 || distinct); + DBUG_ENTER("Item_func_group_concat::setup"); + + /* diff --git a/databases/mysql56-client/patches/patch-sql_item__timefunc.cc b/databases/mysql56-client/patches/patch-sql_item__timefunc.cc new file mode 100644 index 00000000000..83cd9498139 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_item__timefunc.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_item__timefunc.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/item_timefunc.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/item_timefunc.cc +@@ -1337,7 +1337,7 @@ longlong Item_func_weekday::val_int() + + return (longlong) calc_weekday(calc_daynr(ltime.year, ltime.month, + ltime.day), +- odbc_type) + test(odbc_type); ++ odbc_type) + my_test(odbc_type); + } + + void Item_func_dayname::fix_length_and_dec() diff --git a/databases/mysql56-client/patches/patch-sql_key.cc b/databases/mysql56-client/patches/patch-sql_key.cc new file mode 100644 index 00000000000..4d1d81e7962 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_key.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_key.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/key.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/key.cc +@@ -123,7 +123,7 @@ void key_copy(uchar *to_key, uchar *from + { + if (key_part->null_bit) + { +- *to_key++= test(from_record[key_part->null_offset] & ++ *to_key++= my_test(from_record[key_part->null_offset] & + key_part->null_bit); + key_length--; + } +@@ -299,7 +299,7 @@ bool key_cmp_if_same(TABLE *table,const + + if (key_part->null_bit) + { +- if (*key != test(table->record[0][key_part->null_offset] & ++ if (*key != my_test(table->record[0][key_part->null_offset] & + key_part->null_bit)) + return 1; + if (*key) +@@ -438,7 +438,7 @@ void key_unpack(String *to, TABLE *table + } + } + field_unpack(to, key_part->field, table->record[0], key_part->length, +- test(key_part->key_part_flag & HA_PART_KEY_SEG)); ++ my_test(key_part->key_part_flag & HA_PART_KEY_SEG)); + } + dbug_tmp_restore_column_map(table->read_set, old_map); + DBUG_VOID_RETURN; diff --git a/databases/mysql56-client/patches/patch-sql_mysqld.cc b/databases/mysql56-client/patches/patch-sql_mysqld.cc index c5a171e7394..633d0a9b0f0 100644 --- a/databases/mysql56-client/patches/patch-sql_mysqld.cc +++ b/databases/mysql56-client/patches/patch-sql_mysqld.cc @@ -1,22 +1,31 @@ -$NetBSD: patch-sql_mysqld.cc,v 1.2 2013/04/20 08:06:01 adam Exp $ +$NetBSD: patch-sql_mysqld.cc,v 1.3 2013/05/06 14:41:08 joerg Exp $ ---- sql/mysqld.cc.orig 2013-01-22 16:54:50.000000000 +0000 +--- sql/mysqld.cc.orig 2013-05-05 21:55:08.000000000 +0000 +++ sql/mysqld.cc -@@ -184,7 +184,7 @@ extern int memcntl(caddr_t, size_t, int, - int initgroups(const char *,unsigned int); +@@ -8268,7 +8268,7 @@ mysqld_get_one_option(int optid, + opt_myisam_log=1; + break; + case (int) OPT_BIN_LOG: +- opt_bin_log= test(argument != disabled_my_option); ++ opt_bin_log= my_test(argument != disabled_my_option); + break; + #ifdef HAVE_REPLICATION + case (int)OPT_REPLICATE_IGNORE_DB: +@@ -8766,7 +8766,7 @@ static int get_options(int *argc_ptr, ch + Set some global variables from the global_system_variables + In most cases the global variables will not be used + */ +- my_disable_locking= myisam_single_user= test(opt_external_locking == 0); ++ my_disable_locking= myisam_single_user= my_test(opt_external_locking == 0); + my_default_record_cache_size=global_system_variables.read_buff_size; + + global_system_variables.long_query_time= (ulonglong) +@@ -8793,7 +8793,7 @@ static int get_options(int *argc_ptr, ch #endif --#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) -+#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) - #include <ieeefp.h> - #ifdef HAVE_FP_EXCEPT // Fix type conflict - typedef fp_except fp_except_t; -@@ -215,7 +215,7 @@ extern "C" my_bool reopen_fstreams(const + global_system_variables.engine_condition_pushdown= +- test(global_system_variables.optimizer_switch & ++ my_test(global_system_variables.optimizer_switch & + OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); - inline void setup_fpu() - { --#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) -+#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT) - /* We can't handle floating point exceptions with threads, so disable - this on freebsd - Don't fall for overflow, underflow,divide-by-zero or loss of precision. + opt_readonly= read_only; diff --git a/databases/mysql56-client/patches/patch-sql_opt__range.cc b/databases/mysql56-client/patches/patch-sql_opt__range.cc new file mode 100644 index 00000000000..fd30784acd2 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_opt__range.cc @@ -0,0 +1,82 @@ +$NetBSD: patch-sql_opt__range.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/opt_range.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/opt_range.cc +@@ -468,7 +468,7 @@ public: + new_max=arg->max_value; flag_max=arg->max_flag; + } + return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, +- test(maybe_flag && arg->maybe_flag)); ++ my_test(maybe_flag && arg->maybe_flag)); + } + SEL_ARG *clone_first(SEL_ARG *arg) + { // min <= X < arg->min +@@ -2938,7 +2938,7 @@ free_mem: + Assume that if the user is using 'limit' we will only need to scan + limit rows if we are using a key + */ +- DBUG_RETURN(records ? test(quick) : -1); ++ DBUG_RETURN(records ? my_test(quick) : -1); + } + + /**************************************************************************** +@@ -3068,7 +3068,7 @@ typedef struct st_part_prune_param + int last_subpart_partno; /* Same as above for supartitioning */ + + /* +- is_part_keypart[i] == test(keypart #i in partitioning index is a member ++ is_part_keypart[i] == my_test(keypart #i in partitioning index is a member + used in partitioning) + Used to maintain current values of cur_part_fields and cur_subpart_fields + */ +@@ -3951,7 +3951,7 @@ process_next_key_part: + ppar->mark_full_partition_used(ppar->part_info, part_id); + found= TRUE; + } +- res= test(found); ++ res= my_test(found); + } + /* + Restore the "used partitions iterator" to the default setting that +@@ -4979,7 +4979,7 @@ static double ror_scan_selectivity(const + SEL_ARG *sel_arg, *tuple_arg= NULL; + key_part_map keypart_map= 0; + bool cur_covered; +- bool prev_covered= test(bitmap_is_set(&info->covered_fields, ++ bool prev_covered= my_test(bitmap_is_set(&info->covered_fields, + key_part->fieldnr-1)); + key_range min_range; + key_range max_range; +@@ -4994,7 +4994,7 @@ static double ror_scan_selectivity(const + sel_arg= sel_arg->next_key_part) + { + DBUG_PRINT("info",("sel_arg step")); +- cur_covered= test(bitmap_is_set(&info->covered_fields, ++ cur_covered= my_test(bitmap_is_set(&info->covered_fields, + key_part[sel_arg->part].fieldnr-1)); + if (cur_covered != prev_covered) + { +@@ -9550,12 +9550,12 @@ get_quick_select(PARAM *param,uint idx,S + if (param->table->key_info[param->real_keynr[idx]].flags & HA_SPATIAL) + quick=new QUICK_RANGE_SELECT_GEOM(param->thd, param->table, + param->real_keynr[idx], +- test(parent_alloc), ++ my_test(parent_alloc), + parent_alloc, &create_err); + else + quick=new QUICK_RANGE_SELECT(param->thd, param->table, + param->real_keynr[idx], +- test(parent_alloc), NULL, &create_err); ++ my_test(parent_alloc), NULL, &create_err); + + if (quick) + { +@@ -10607,7 +10607,7 @@ int QUICK_RANGE_SELECT::get_next_prefix( + const bool sorted= (mrr_flags & HA_MRR_SORTED); + result= file->read_range_first(last_range->min_keypart_map ? &start_key : 0, + last_range->max_keypart_map ? &end_key : 0, +- test(last_range->flag & EQ_RANGE), ++ my_test(last_range->flag & EQ_RANGE), + sorted); + if (last_range->flag == (UNIQUE_RANGE | EQ_RANGE)) + last_range= 0; // Stop searching diff --git a/databases/mysql56-client/patches/patch-sql_opt__range.h b/databases/mysql56-client/patches/patch-sql_opt__range.h new file mode 100644 index 00000000000..841b900c7b4 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_opt__range.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_opt__range.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/opt_range.h.orig 2013-05-05 20:54:50.000000000 +0000 ++++ sql/opt_range.h +@@ -596,7 +596,7 @@ public: + THD *thd; + int read_keys_and_merge(); + +- bool clustered_pk_range() { return test(pk_quick_select); } ++ bool clustered_pk_range() { return my_test(pk_quick_select); } + + virtual bool is_valid() + { diff --git a/databases/mysql56-client/patches/patch-sql_opt__sum.cc b/databases/mysql56-client/patches/patch-sql_opt__sum.cc new file mode 100644 index 00000000000..24991868ddd --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_opt__sum.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_opt__sum.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/opt_sum.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/opt_sum.cc +@@ -304,7 +304,7 @@ int opt_sum_query(THD *thd, + } + else + { +- maybe_exact_count&= test(table_filled && ++ maybe_exact_count&= my_test(table_filled && + (tl->table->file->ha_table_flags() & + HA_HAS_RECORDS)); + is_exact_count= FALSE; +@@ -379,7 +379,7 @@ int opt_sum_query(THD *thd, + case Item_sum::MIN_FUNC: + case Item_sum::MAX_FUNC: + { +- int is_max= test(item_sum->sum_func() == Item_sum::MAX_FUNC); ++ int is_max= my_test(item_sum->sum_func() == Item_sum::MAX_FUNC); + /* + If MIN/MAX(expr) is the first part of a key or if all previous + parts of the key is found in the COND, then we can use +@@ -811,7 +811,7 @@ static bool matching_cond(bool max_fl, T + Item *value= args[between && max_fl ? 2 : 1]; + value->save_in_field_no_warnings(part->field, true); + if (part->null_bit) +- *key_ptr++= (uchar) test(part->field->is_null()); ++ *key_ptr++= (uchar) my_test(part->field->is_null()); + part->field->get_key_image(key_ptr, part->length, Field::itRAW); + } + if (is_field_part) +@@ -831,7 +831,7 @@ static bool matching_cond(bool max_fl, T + else if (eq_type) + { + if ((!is_null && !cond->val_int()) || +- (is_null && !test(part->field->is_null()))) ++ (is_null && !my_test(part->field->is_null()))) + DBUG_RETURN(FALSE); // Impossible test + } + else if (is_field_part) diff --git a/databases/mysql56-client/patches/patch-sql_rpl__mi.cc b/databases/mysql56-client/patches/patch-sql_rpl__mi.cc new file mode 100644 index 00000000000..cc59ca535d0 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_rpl__mi.cc @@ -0,0 +1,18 @@ +$NetBSD: patch-sql_rpl__mi.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/rpl_mi.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/rpl_mi.cc +@@ -478,10 +478,10 @@ bool Master_info::read_info(Rpl_info_han + DBUG_RETURN(true); + } + +- ssl= (my_bool) test(temp_ssl); +- ssl_verify_server_cert= (my_bool) test(temp_ssl_verify_server_cert); ++ ssl= (my_bool) my_test(temp_ssl); ++ ssl_verify_server_cert= (my_bool) my_test(temp_ssl_verify_server_cert); + master_log_pos= (my_off_t) temp_master_log_pos; +- auto_position= test(temp_auto_position); ++ auto_position= my_test(temp_auto_position); + + if (auto_position != 0 && gtid_mode != 3) + { diff --git a/databases/mysql56-client/patches/patch-sql_rpl__slave.cc b/databases/mysql56-client/patches/patch-sql_rpl__slave.cc new file mode 100644 index 00000000000..09bc4ff7439 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_rpl__slave.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_rpl__slave.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/rpl_slave.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/rpl_slave.cc +@@ -3492,7 +3492,7 @@ apply_event_and_update_pos(Log_event** p + "skipped because event skip counter was non-zero" + }; + DBUG_PRINT("info", ("OPTION_BEGIN: %d; IN_STMT: %d", +- test(thd->variables.option_bits & OPTION_BEGIN), ++ my_test(thd->variables.option_bits & OPTION_BEGIN), + rli->get_flag(Relay_log_info::IN_STMT))); + DBUG_PRINT("skip_event", ("%s event was %s", + ev->get_type_str(), explain[reason])); diff --git a/databases/mysql56-client/patches/patch-sql_set__var.cc b/databases/mysql56-client/patches/patch-sql_set__var.cc new file mode 100644 index 00000000000..6e89d99c58b --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_set__var.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_set__var.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/set_var.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/set_var.cc +@@ -566,7 +566,7 @@ int sql_set_variables(THD *thd, List<set + if ((error= var->check(thd))) + goto err; + } +- if (!(error= test(thd->is_error()))) ++ if (!(error= my_test(thd->is_error()))) + { + it.rewind(); + while ((var= it++)) diff --git a/databases/mysql56-client/patches/patch-sql_sp__head.h b/databases/mysql56-client/patches/patch-sql_sp__head.h new file mode 100644 index 00000000000..5b89b36d22d --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sp__head.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sp__head.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sp_head.h.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sp_head.h +@@ -859,7 +859,7 @@ public: + else if (m_flags & HAS_SQLCOM_FLUSH) + my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH"); + +- return test(m_flags & ++ return my_test(m_flags & + (CONTAINS_DYNAMIC_SQL|MULTI_RESULTS|HAS_SET_AUTOCOMMIT_STMT| + HAS_COMMIT_OR_ROLLBACK|HAS_SQLCOM_RESET|HAS_SQLCOM_FLUSH)); + } diff --git a/databases/mysql56-client/patches/patch-sql_sp__rcontext.h b/databases/mysql56-client/patches/patch-sql_sp__rcontext.h new file mode 100644 index 00000000000..265c4e9075f --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sp__rcontext.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sp__rcontext.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sp_rcontext.h.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sp_rcontext.h +@@ -453,7 +453,7 @@ public: + bool close(THD *thd); + + bool is_open() const +- { return test(m_server_side_cursor); } ++ { return my_test(m_server_side_cursor); } + + bool fetch(THD *thd, List<sp_variable> *vars); + diff --git a/databases/mysql56-client/patches/patch-sql_sql__acl.cc b/databases/mysql56-client/patches/patch-sql_sql__acl.cc new file mode 100644 index 00000000000..6a49a968c89 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__acl.cc @@ -0,0 +1,61 @@ +$NetBSD: patch-sql_sql__acl.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_acl.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_acl.cc +@@ -2732,9 +2732,9 @@ update_user_table(THD *thd, TABLE *table + static bool test_if_create_new_users(THD *thd) + { + Security_context *sctx= thd->security_ctx; +- bool create_new_users= test(sctx->master_access & INSERT_ACL) || ++ bool create_new_users= my_test(sctx->master_access & INSERT_ACL) || + (!opt_safe_user_create && +- test(sctx->master_access & CREATE_USER_ACL)); ++ my_test(sctx->master_access & CREATE_USER_ACL)); + if (!create_new_users) + { + TABLE_LIST tl; +@@ -4449,7 +4449,7 @@ int mysql_table_grant(THD *thd, TABLE_LI + /* Create user if needed */ + error=replace_user_table(thd, tables[0].table, Str, + 0, revoke_grant, create_new_users, +- test(thd->variables.sql_mode & ++ my_test(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER)); + if (error) + { +@@ -4694,7 +4694,7 @@ bool mysql_routine_grant(THD *thd, TABLE + /* Create user if needed */ + error=replace_user_table(thd, tables[0].table, Str, + 0, revoke_grant, create_new_users, +- test(thd->variables.sql_mode & ++ my_test(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER)); + if (error) + { +@@ -4971,7 +4971,7 @@ bool mysql_grant(THD *thd, const char *d + + if (replace_user_table(thd, tables[0].table, Str, + (!db ? rights : 0), revoke_grant, create_new_users, +- test(thd->variables.sql_mode & ++ my_test(thd->variables.sql_mode & + MODE_NO_AUTO_CREATE_USER))) + result= -1; + else if (db) +@@ -5470,7 +5470,7 @@ bool check_grant(THD *thd, ulong want_ac + tl && number-- && tl != first_not_own_table; + tl= tl->next_global) + { +- sctx = test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; ++ sctx = my_test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; + + const ACL_internal_table_access *access= + get_cached_table_access(&tl->grant.m_internal, +@@ -5680,7 +5680,7 @@ bool check_column_grant_in_table_ref(THD + GRANT_INFO *grant; + const char *db_name; + const char *table_name; +- Security_context *sctx= test(table_ref->security_ctx) ? ++ Security_context *sctx= my_test(table_ref->security_ctx) ? + table_ref->security_ctx : thd->security_ctx; + + if (table_ref->view || table_ref->field_translation) diff --git a/databases/mysql56-client/patches/patch-sql_sql__admin.cc b/databases/mysql56-client/patches/patch-sql_sql__admin.cc new file mode 100644 index 00000000000..196bce8e91c --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__admin.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__admin.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_admin.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_admin.cc +@@ -1123,7 +1123,7 @@ bool Sql_cmd_repair_table::execute(THD * + thd->enable_slow_log= opt_log_slow_admin_statements; + res= mysql_admin_table(thd, first_table, &thd->lex->check_opt, "repair", + TL_WRITE, 1, +- test(thd->lex->check_opt.sql_flags & TT_USEFRM), ++ my_test(thd->lex->check_opt.sql_flags & TT_USEFRM), + HA_OPEN_FOR_REPAIR, &prepare_for_repair, + &handler::ha_repair, 0); + diff --git a/databases/mysql56-client/patches/patch-sql_sql__base.cc b/databases/mysql56-client/patches/patch-sql_sql__base.cc new file mode 100644 index 00000000000..b03ace87164 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__base.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_sql__base.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_base.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_base.cc +@@ -1612,7 +1612,7 @@ bool close_temporary_tables(THD *thd) + + /* We always quote db,table names though it is slight overkill */ + if (found_user_tables && +- !(was_quote_show= test(thd->variables.option_bits & OPTION_QUOTE_SHOW_CREATE))) ++ !(was_quote_show= my_test(thd->variables.option_bits & OPTION_QUOTE_SHOW_CREATE))) + { + thd->variables.option_bits |= OPTION_QUOTE_SHOW_CREATE; + } +@@ -8211,7 +8211,7 @@ bool setup_fields(THD *thd, Ref_ptr_arra + thd->lex->allow_sum_func= save_allow_sum_func; + thd->mark_used_columns= save_mark_used_columns; + DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns)); +- DBUG_RETURN(test(thd->is_error())); ++ DBUG_RETURN(my_test(thd->is_error())); + } + + +@@ -8775,7 +8775,7 @@ int setup_conds(THD *thd, TABLE_LIST *ta + } + + thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup; +- DBUG_RETURN(test(thd->is_error())); ++ DBUG_RETURN(my_test(thd->is_error())); + + err_no_arena: + select_lex->is_item_list_lookup= save_is_item_list_lookup; diff --git a/databases/mysql56-client/patches/patch-sql_sql__bitmap.h b/databases/mysql56-client/patches/patch-sql_sql__bitmap.h new file mode 100644 index 00000000000..9ac56a3f6c4 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__bitmap.h @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__bitmap.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_bitmap.h.orig 2013-05-05 20:53:40.000000000 +0000 ++++ sql/sql_bitmap.h +@@ -60,7 +60,7 @@ public: + intersect(map2buff); + if (map.n_bits > sizeof(ulonglong) * 8) + bitmap_set_above(&map, sizeof(ulonglong), +- test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); ++ my_test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); + } + void subtract(const Bitmap& map2) { bitmap_subtract(&map, &map2.map); } + void merge(const Bitmap& map2) { bitmap_union(&map, &map2.map); } +@@ -135,7 +135,7 @@ public: + void intersect_extended(ulonglong map2) { map&= map2; } + void subtract(const Bitmap<64>& map2) { map&= ~map2.map; } + void merge(const Bitmap<64>& map2) { map|= map2.map; } +- my_bool is_set(uint n) const { return test(map & (((ulonglong)1) << n)); } ++ my_bool is_set(uint n) const { return my_test(map & (((ulonglong)1) << n)); } + my_bool is_prefix(uint n) const { return map == (((ulonglong)1) << n)-1; } + my_bool is_clear_all() const { return map == (ulonglong)0; } + my_bool is_set_all() const { return map == ~(ulonglong)0; } diff --git a/databases/mysql56-client/patches/patch-sql_sql__cache.cc b/databases/mysql56-client/patches/patch-sql_sql__cache.cc new file mode 100644 index 00000000000..ccc257d7398 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__cache.cc @@ -0,0 +1,56 @@ +$NetBSD: patch-sql_sql__cache.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_cache.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_cache.cc +@@ -1209,8 +1209,8 @@ void Query_cache::store_query(THD *thd, + Query_cache_query_flags flags; + // fill all gaps between fields with 0 to get repeatable key + memset(&flags, 0, QUERY_CACHE_FLAGS_SIZE); +- flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); +- flags.client_protocol_41= test(thd->client_capabilities & ++ flags.client_long_flag= my_test(thd->client_capabilities & CLIENT_LONG_FLAG); ++ flags.client_protocol_41= my_test(thd->client_capabilities & + CLIENT_PROTOCOL_41); + /* + Protocol influences result format, so statement results in the binary +@@ -1220,10 +1220,10 @@ void Query_cache::store_query(THD *thd, + flags.protocol_type= (unsigned int) thd->protocol->type(); + /* PROTOCOL_LOCAL results are not cached. */ + DBUG_ASSERT(flags.protocol_type != (unsigned int) Protocol::PROTOCOL_LOCAL); +- flags.more_results_exists= test(thd->server_status & ++ flags.more_results_exists= my_test(thd->server_status & + SERVER_MORE_RESULTS_EXISTS); + flags.in_trans= thd->in_active_multi_stmt_transaction(); +- flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); ++ flags.autocommit= my_test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); + flags.pkt_nr= net->pkt_nr; + flags.character_set_client_num= + thd->variables.character_set_client->number; +@@ -1584,14 +1584,14 @@ Query_cache::send_result_to_client(THD * + + // fill all gaps between fields with 0 to get repeatable key + memset(&flags, 0, QUERY_CACHE_FLAGS_SIZE); +- flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); +- flags.client_protocol_41= test(thd->client_capabilities & ++ flags.client_long_flag= my_test(thd->client_capabilities & CLIENT_LONG_FLAG); ++ flags.client_protocol_41= my_test(thd->client_capabilities & + CLIENT_PROTOCOL_41); + flags.protocol_type= (unsigned int) thd->protocol->type(); +- flags.more_results_exists= test(thd->server_status & ++ flags.more_results_exists= my_test(thd->server_status & + SERVER_MORE_RESULTS_EXISTS); + flags.in_trans= thd->in_active_multi_stmt_transaction(); +- flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); ++ flags.autocommit= my_test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); + flags.pkt_nr= thd->net.pkt_nr; + flags.character_set_client_num= thd->variables.character_set_client->number; + flags.character_set_results_num= +@@ -3040,7 +3040,7 @@ my_bool Query_cache::register_all_tables + tmp++) + unlink_table(tmp); + } +- return test(n); ++ return my_test(n); + } + + diff --git a/databases/mysql56-client/patches/patch-sql_sql__class.cc b/databases/mysql56-client/patches/patch-sql_sql__class.cc new file mode 100644 index 00000000000..74fed681a89 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__class.cc @@ -0,0 +1,41 @@ +$NetBSD: patch-sql_sql__class.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_class.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_class.cc +@@ -553,14 +553,14 @@ extern "C" int mysql_tmpfile(const char + extern "C" + int thd_in_lock_tables(const THD *thd) + { +- return test(thd->in_lock_tables); ++ return my_test(thd->in_lock_tables); + } + + + extern "C" + int thd_tablespace_op(const THD *thd) + { +- return test(thd->tablespace_op); ++ return my_test(thd->tablespace_op); + } + + +@@ -2535,7 +2535,7 @@ void select_to_file::send_error(uint err + + bool select_to_file::send_eof() + { +- int error= test(end_io_cache(&cache)); ++ int error= my_test(end_io_cache(&cache)); + if (mysql_file_close(file, MYF(MY_WME)) || thd->is_error()) + error= true; + +@@ -2716,8 +2716,8 @@ select_export::prepare(List<Item> &list, + escape_char= (int) (uchar) (*exchange->escaped)[0]; + else + escape_char= -1; +- is_ambiguous_field_sep= test(strchr(ESCAPE_CHARS, field_sep_char)); +- is_unsafe_field_sep= test(strchr(NUMERIC_CHARS, field_sep_char)); ++ is_ambiguous_field_sep= my_test(strchr(ESCAPE_CHARS, field_sep_char)); ++ is_unsafe_field_sep= my_test(strchr(NUMERIC_CHARS, field_sep_char)); + line_sep_char= (exchange->line_term->length() ? + (int) (uchar) (*exchange->line_term)[0] : INT_MAX); + if (!field_term_length) diff --git a/databases/mysql56-client/patches/patch-sql_sql__class.h b/databases/mysql56-client/patches/patch-sql_sql__class.h new file mode 100644 index 00000000000..4f952e3a674 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__class.h @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__class.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_class.h.orig 2013-05-05 20:51:58.000000000 +0000 ++++ sql/sql_class.h +@@ -3156,7 +3156,7 @@ public: + } + inline bool is_strict_mode() const + { +- return test(variables.sql_mode & (MODE_STRICT_TRANS_TABLES | ++ return my_test(variables.sql_mode & (MODE_STRICT_TRANS_TABLES | + MODE_STRICT_ALL_TABLES)); + } + inline Time_zone *time_zone() +@@ -4608,7 +4608,7 @@ public: + table.str= internal_table_name; + table.length=1; + } +- bool is_derived_table() const { return test(sel); } ++ bool is_derived_table() const { return my_test(sel); } + inline void change_db(char *db_name) + { + db.str= db_name; db.length= (uint) strlen(db_name); diff --git a/databases/mysql56-client/patches/patch-sql_sql__delete.cc b/databases/mysql56-client/patches/patch-sql_sql__delete.cc new file mode 100644 index 00000000000..5737e7c26b7 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__delete.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__delete.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_delete.cc.orig 2013-04-05 12:27:18.000000000 +0000 ++++ sql/sql_delete.cc +@@ -119,7 +119,7 @@ bool mysql_delete(THD *thd, TABLE_LIST * + DBUG_RETURN(true); + + const_cond= (!conds || conds->const_item()); +- safe_update=test(thd->variables.option_bits & OPTION_SAFE_UPDATES); ++ safe_update=my_test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + if (safe_update && const_cond) + { + my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, diff --git a/databases/mysql56-client/patches/patch-sql_sql__executor.cc b/databases/mysql56-client/patches/patch-sql_sql__executor.cc new file mode 100644 index 00000000000..e0fbdbb5f35 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__executor.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__executor.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_executor.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_executor.cc +@@ -1455,7 +1455,7 @@ evaluate_join_record(JOIN *join, JOIN_TA + + if (condition) + { +- found= test(condition->val_int()); ++ found= my_test(condition->val_int()); + + if (join->thd->killed) + { +@@ -1863,7 +1863,7 @@ join_read_const_table(JOIN_TAB *tab, POS + { + // We cannot handle outer-joined tables with expensive join conditions here: + DBUG_ASSERT(!(*tab->on_expr_ref)->is_expensive()); +- if ((table->null_row= test((*tab->on_expr_ref)->val_int() == 0))) ++ if ((table->null_row= my_test((*tab->on_expr_ref)->val_int() == 0))) + mark_as_null_row(table); + } + if (!table->null_row) diff --git a/databases/mysql56-client/patches/patch-sql_sql__insert.cc b/databases/mysql56-client/patches/patch-sql_sql__insert.cc new file mode 100644 index 00000000000..9e18f997a4b --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__insert.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_sql__insert.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_insert.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_insert.cc +@@ -759,7 +759,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t + update, + update_fields, + fields, +- !test(values->elements), ++ !my_test(values->elements), + &can_prune_partitions, + &prune_needs_default_values, + &used_partitions)) +@@ -1906,7 +1906,7 @@ int check_that_all_fields_are_given_valu + if (table_list) + { + table_list= table_list->top_table(); +- view= test(table_list->view); ++ view= my_test(table_list->view); + } + if (view) + { +@@ -3895,7 +3895,7 @@ static TABLE *create_table_from_items(TH + + tmp_table.s->db_create_options=0; + tmp_table.s->db_low_byte_first= +- test(create_info->db_type == myisam_hton || ++ my_test(create_info->db_type == myisam_hton || + create_info->db_type == heap_hton); + tmp_table.null_row=tmp_table.maybe_null=0; + diff --git a/databases/mysql56-client/patches/patch-sql_sql__join__buffer.cc b/databases/mysql56-client/patches/patch-sql_sql__join__buffer.cc new file mode 100644 index 00000000000..5c28224e1ef --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__join__buffer.cc @@ -0,0 +1,51 @@ +$NetBSD: patch-sql_sql__join__buffer.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_join_buffer.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_join_buffer.cc +@@ -184,8 +184,8 @@ void JOIN_CACHE::calc_record_fields() + for ( ; tab < join_tab ; tab++) + { + calc_used_field_length(join->thd, tab); +- flag_fields+= test(tab->used_null_fields || tab->used_uneven_bit_fields); +- flag_fields+= test(tab->table->maybe_null); ++ flag_fields+= my_test(tab->used_null_fields || tab->used_uneven_bit_fields); ++ flag_fields+= my_test(tab->table->maybe_null); + fields+= tab->used_fields; + blobs+= tab->used_blobs; + +@@ -1350,7 +1350,7 @@ void JOIN_CACHE::get_record_by_pos(uchar + bool JOIN_CACHE::get_match_flag_by_pos(uchar *rec_ptr) + { + if (with_match_flag) +- return test(*rec_ptr); ++ return my_test(*rec_ptr); + if (prev_cache) + { + uchar *prev_rec_ptr= prev_cache->get_rec_ref(rec_ptr); +@@ -1593,7 +1593,7 @@ bool JOIN_CACHE::skip_record_if_match() + if (prev_cache) + offset+= prev_cache->get_size_of_rec_offset(); + /* Check whether the match flag is on */ +- if (test(*(pos+offset))) ++ if (my_test(*(pos+offset))) + { + pos+= size_of_rec_len + get_rec_length(pos); + return TRUE; +@@ -1886,7 +1886,7 @@ enum_nested_loop_state JOIN_CACHE_BNL::j + reset_cache(false); + + /* Read each record from the join buffer and look for matches */ +- for (cnt= records - test(skip_last) ; cnt; cnt--) ++ for (cnt= records - my_test(skip_last) ; cnt; cnt--) + { + /* + If only the first match is needed and it has been already found for +@@ -2131,7 +2131,7 @@ enum_nested_loop_state JOIN_CACHE::join_ + if (!records) + DBUG_RETURN(NESTED_LOOP_OK); + +- cnt= records - (is_key_access() ? 0 : test(skip_last)); ++ cnt= records - (is_key_access() ? 0 : my_test(skip_last)); + + /* This function may be called only for inner tables of outer joins */ + DBUG_ASSERT(join_tab->first_inner); diff --git a/databases/mysql56-client/patches/patch-sql_sql__lex.cc b/databases/mysql56-client/patches/patch-sql_sql__lex.cc new file mode 100644 index 00000000000..ff33151775d --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__lex.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__lex.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_lex.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_lex.cc +@@ -247,7 +247,7 @@ Lex_input_stream::reset(char *buffer, un + m_cpp_utf8_processed_ptr= NULL; + next_state= MY_LEX_START; + found_semicolon= NULL; +- ignore_space= test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); ++ ignore_space= my_test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); + stmt_prepare_mode= FALSE; + multi_statements= TRUE; + in_comment=NO_COMMENT; +@@ -3368,7 +3368,7 @@ TABLE_LIST *LEX::unlink_first_table(bool + /* + and from local list if it is not empty + */ +- if ((*link_to_local= test(select_lex.table_list.first))) ++ if ((*link_to_local= my_test(select_lex.table_list.first))) + { + select_lex.context.table_list= + select_lex.context.first_name_resolution_table= first->next_local; diff --git a/databases/mysql56-client/patches/patch-sql_sql__lex.h b/databases/mysql56-client/patches/patch-sql_sql__lex.h new file mode 100644 index 00000000000..86e493babfa --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__lex.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__lex.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_lex.h.orig 2013-05-05 20:52:49.000000000 +0000 ++++ sql/sql_lex.h +@@ -1201,7 +1201,7 @@ public: + } + bool requires_prelocking() + { +- return test(query_tables_own_last); ++ return my_test(query_tables_own_last); + } + void mark_as_requiring_prelocking(TABLE_LIST **tables_own_last) + { diff --git a/databases/mysql56-client/patches/patch-sql_sql__load.cc b/databases/mysql56-client/patches/patch-sql_sql__load.cc new file mode 100644 index 00000000000..8fa2666ad0e --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__load.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_sql__load.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_load.cc.orig 2013-04-05 12:27:18.000000000 +0000 ++++ sql/sql_load.cc +@@ -475,7 +475,7 @@ int mysql_load(THD *thd,sql_exchange *ex + } + } + +- if (!(error=test(read_info.error))) ++ if (!(error=my_test(read_info.error))) + { + + table->next_number_field=table->found_next_number_field; +@@ -908,7 +908,7 @@ read_fixed_length(THD *thd, COPY_INFO &i + thd->get_stmt_da()->inc_current_row_for_warning(); + continue_loop:; + } +- DBUG_RETURN(test(read_info.error)); ++ DBUG_RETURN(my_test(read_info.error)); + } + + +@@ -1118,7 +1118,7 @@ read_sep_field(THD *thd, COPY_INFO &info + thd->get_stmt_da()->inc_current_row_for_warning(); + continue_loop:; + } +- DBUG_RETURN(test(read_info.error)); ++ DBUG_RETURN(my_test(read_info.error)); + } + + +@@ -1280,7 +1280,7 @@ read_xml_field(THD *thd, COPY_INFO &info + thd->get_stmt_da()->inc_current_row_for_warning(); + continue_loop:; + } +- DBUG_RETURN(test(read_info.error) || thd->is_error()); ++ DBUG_RETURN(my_test(read_info.error) || thd->is_error()); + } /* load xml end */ + + diff --git a/databases/mysql56-client/patches/patch-sql_sql__optimizer.cc b/databases/mysql56-client/patches/patch-sql_sql__optimizer.cc new file mode 100644 index 00000000000..bbf25147762 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__optimizer.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_sql__optimizer.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_optimizer.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_optimizer.cc +@@ -739,13 +739,13 @@ JOIN::optimize() + need_tmp= ((!plan_is_const() && + ((select_distinct || !simple_order || !simple_group) || + (group_list && order) || +- test(select_options & OPTION_BUFFER_RESULT))) || ++ my_test(select_options & OPTION_BUFFER_RESULT))) || + (rollup.state != ROLLUP::STATE_NONE && select_distinct)); + + /* Perform FULLTEXT search before all regular searches */ + if (!(select_options & SELECT_DESCRIBE)) + { +- init_ftfuncs(thd, select_lex, test(order)); ++ init_ftfuncs(thd, select_lex, my_test(order)); + optimize_fts_query(); + } + +@@ -2504,7 +2504,7 @@ simplify_joins(JOIN *join, List<TABLE_LI + NESTED_JOIN *nested_join; + TABLE_LIST *prev_table= 0; + List_iterator<TABLE_LIST> li(*join_list); +- bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); ++ bool straight_join= my_test(join->select_options & SELECT_STRAIGHT_JOIN); + DBUG_ENTER("simplify_joins"); + + /* +@@ -5416,8 +5416,8 @@ static int sort_keyuse(Key_use *a, Key_u + if (a->keypart != b->keypart) + return (int) (a->keypart - b->keypart); + // Place const values before other ones +- if ((res= test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - +- test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) ++ if ((res= my_test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - ++ my_test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) + return res; + /* Place rows that are not 'OPTIMIZE_REF_OR_NULL' first */ + return (int) ((a->optimize & KEY_OPTIMIZE_REF_OR_NULL) - diff --git a/databases/mysql56-client/patches/patch-sql_sql__optimizer.h b/databases/mysql56-client/patches/patch-sql_sql__optimizer.h new file mode 100644 index 00000000000..ca78f17ea01 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__optimizer.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__optimizer.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_optimizer.h.orig 2013-05-05 20:54:46.000000000 +0000 ++++ sql/sql_optimizer.h +@@ -433,7 +433,7 @@ public: + result= result_arg; + lock= thd_arg->lock; + select_lex= 0; //for safety +- select_distinct= test(select_options & SELECT_DISTINCT); ++ select_distinct= my_test(select_options & SELECT_DISTINCT); + no_order= 0; + simple_order= 0; + simple_group= 0; diff --git a/databases/mysql56-client/patches/patch-sql_sql__parse.cc b/databases/mysql56-client/patches/patch-sql_sql__parse.cc new file mode 100644 index 00000000000..c68e1ee13f0 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__parse.cc @@ -0,0 +1,36 @@ +$NetBSD: patch-sql_sql__parse.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_parse.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_parse.cc +@@ -6427,7 +6427,7 @@ TABLE_LIST *st_select_lex::add_table_to_ + if (!table) + DBUG_RETURN(0); // End of memory + alias_str= alias ? alias->str : table->table.str; +- if (!test(table_options & TL_OPTION_ALIAS)) ++ if (!my_test(table_options & TL_OPTION_ALIAS)) + { + enum_ident_name_check ident_check_status= + check_table_name(table->table.str, table->table.length, FALSE); +@@ -6477,10 +6477,10 @@ TABLE_LIST *st_select_lex::add_table_to_ + ptr->table_name=table->table.str; + ptr->table_name_length=table->table.length; + ptr->lock_type= lock_type; +- ptr->updating= test(table_options & TL_OPTION_UPDATING); ++ ptr->updating= my_test(table_options & TL_OPTION_UPDATING); + /* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */ +- ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); +- ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); ++ ptr->force_index= my_test(table_options & TL_OPTION_FORCE_INDEX); ++ ptr->ignore_leaves= my_test(table_options & TL_OPTION_IGNORE_LEAVES); + ptr->derived= table->sel; + if (!ptr->derived && is_infoschema_db(ptr->db, ptr->db_length)) + { +@@ -6571,7 +6571,7 @@ TABLE_LIST *st_select_lex::add_table_to_ + lex->add_to_query_tables(ptr); + + // Pure table aliases do not need to be locked: +- if (!test(table_options & TL_OPTION_ALIAS)) ++ if (!my_test(table_options & TL_OPTION_ALIAS)) + { + ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type, + MDL_TRANSACTION); diff --git a/databases/mysql56-client/patches/patch-sql_sql__partition.cc b/databases/mysql56-client/patches/patch-sql_sql__partition.cc new file mode 100644 index 00000000000..32f08c806a8 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__partition.cc @@ -0,0 +1,69 @@ +$NetBSD: patch-sql_sql__partition.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_partition.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_partition.cc +@@ -3294,7 +3294,7 @@ uint32 get_partition_id_cols_list_for_en + } + else + { +- DBUG_RETURN(list_index + test(!tailf)); ++ DBUG_RETURN(list_index + my_test(!tailf)); + } + } while (max_list_index >= min_list_index); + if (cmp > 0) +@@ -3370,7 +3370,7 @@ uint32 get_list_array_idx_for_endpoint(p + } + else + { +- DBUG_RETURN(list_index + test(left_endpoint ^ include_endpoint)); ++ DBUG_RETURN(list_index + my_test(left_endpoint ^ include_endpoint)); + } + } while (max_list_index >= min_list_index); + notfound: +@@ -5846,7 +5846,7 @@ static bool mysql_change_partitions(ALTE + if (mysql_trans_commit_alter_copy_data(thd)) + error= 1; /* The error has been reported */ + +- DBUG_RETURN(test(error)); ++ DBUG_RETURN(my_test(error)); + } + + +@@ -7720,7 +7720,7 @@ uint32 get_partition_id_cols_range_for_e + loc_part_id * num_columns, + nparts, tailf); + if (!res) +- loc_part_id += test(include_endpoint); ++ loc_part_id += my_test(include_endpoint); + else if (res > 0) + loc_part_id++; + } +@@ -7902,7 +7902,7 @@ int get_part_iter_for_interval_via_mappi + index-in-ordered-array-of-list-constants (for LIST) space. + */ + store_key_image_to_rec(field, min_value, field_len); +- bool include_endp= !test(flags & NEAR_MIN); ++ bool include_endp= !my_test(flags & NEAR_MIN); + part_iter->part_nums.start= get_endpoint(part_info, 1, include_endp); + if (!can_match_multiple_values && part_info->part_expr->null_value) + { +@@ -7937,7 +7937,7 @@ int get_part_iter_for_interval_via_mappi + else + { + store_key_image_to_rec(field, max_value, field_len); +- bool include_endp= !test(flags & NEAR_MAX); ++ bool include_endp= !my_test(flags & NEAR_MAX); + part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp); + if (check_zero_dates && + !zero_in_start_date && +@@ -8104,8 +8104,8 @@ int get_part_iter_for_interval_via_walki + if ((ulonglong)b - (ulonglong)a == ~0ULL) + DBUG_RETURN(-1); + +- a += test(flags & NEAR_MIN); +- b += test(!(flags & NEAR_MAX)); ++ a += my_test(flags & NEAR_MIN); ++ b += my_test(!(flags & NEAR_MAX)); + ulonglong n_values= b - a; + + /* diff --git a/databases/mysql56-client/patches/patch-sql_sql__planner.cc b/databases/mysql56-client/patches/patch-sql_sql__planner.cc new file mode 100644 index 00000000000..d22fc3f3084 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__planner.cc @@ -0,0 +1,58 @@ +$NetBSD: patch-sql_sql__planner.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_planner.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_planner.cc +@@ -193,7 +193,7 @@ public: + } + } + +- bool have_a_case() { return test(handled_sj_equalities); } ++ bool have_a_case() { return my_test(handled_sj_equalities); } + + /** + Check if an index can be used for LooseScan, part 1 +@@ -571,7 +571,7 @@ void Optimize_table_order::best_access_p + } + else + { +- found_constraint= test(found_part); ++ found_constraint= my_test(found_part); + loose_scan_opt.check_ref_access_part1(s, key, start_key, found_part); + + /* Check if we found full key */ +@@ -711,7 +711,7 @@ void Optimize_table_order::best_access_p + */ + if (table->quick_keys.is_set(key) && !found_ref && //(C1) + table->quick_key_parts[key] == max_key_part && //(C2) +- table->quick_n_ranges[key] == 1+test(ref_or_null_part)) //(C3) ++ table->quick_n_ranges[key] == 1+my_test(ref_or_null_part)) //(C3) + { + tmp= records= (double) table->quick_rows[key]; + } +@@ -813,7 +813,7 @@ void Optimize_table_order::best_access_p + table->quick_key_parts[key] <= max_key_part && + const_part & + ((key_part_map)1 << table->quick_key_parts[key]) && +- table->quick_n_ranges[key] == 1 + test(ref_or_null_part & ++ table->quick_n_ranges[key] == 1 + my_test(ref_or_null_part & + const_part) && + records > (double) table->quick_rows[key]) + { +@@ -1037,7 +1037,7 @@ void Optimize_table_order::best_access_p + best_key= 0; + /* range/index_merge/ALL/index access method are "independent", so: */ + best_ref_depends_map= 0; +- best_uses_jbuf= test(!disable_jbuf); ++ best_uses_jbuf= my_test(!disable_jbuf); + } + } + +@@ -1101,7 +1101,7 @@ bool Optimize_table_order::choose_table_ + + reset_nj_counters(join->join_list); + +- const bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); ++ const bool straight_join= my_test(join->select_options & SELECT_STRAIGHT_JOIN); + table_map join_tables; ///< The tables involved in order selection + + if (emb_sjm_nest) diff --git a/databases/mysql56-client/patches/patch-sql_sql__prepare.cc b/databases/mysql56-client/patches/patch-sql_sql__prepare.cc new file mode 100644 index 00000000000..e51e74e9858 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__prepare.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__prepare.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_prepare.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_prepare.cc +@@ -978,7 +978,7 @@ static bool setup_conversion_functions(P + + typecode= sint2korr(read_pos); + read_pos+= 2; +- (**it).unsigned_flag= test(typecode & signed_bit); ++ (**it).unsigned_flag= my_test(typecode & signed_bit); + setup_one_conversion_function(thd, *it, (uchar) (typecode & ~signed_bit)); + } + } +@@ -2653,7 +2653,7 @@ void mysqld_stmt_execute(THD *thd, char + DBUG_PRINT("exec_query", ("%s", stmt->query())); + DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt)); + +- open_cursor= test(flags & (ulong) CURSOR_TYPE_READ_ONLY); ++ open_cursor= my_test(flags & (ulong) CURSOR_TYPE_READ_ONLY); + + thd->protocol= &thd->protocol_binary; + stmt->execute_loop(&expanded_query, open_cursor, packet, packet_end); diff --git a/databases/mysql56-client/patches/patch-sql_sql__prepare.h b/databases/mysql56-client/patches/patch-sql_sql__prepare.h new file mode 100644 index 00000000000..641cc81d57f --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__prepare.h @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__prepare.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_prepare.h.orig 2013-05-05 20:54:42.000000000 +0000 ++++ sql/sql_prepare.h +@@ -289,7 +289,7 @@ public: + one. + Never fails. + */ +- bool has_next_result() const { return test(m_current_rset->m_next_rset); } ++ bool has_next_result() const { return my_test(m_current_rset->m_next_rset); } + /** + Only valid to call if has_next_result() returned true. + Otherwise the result is undefined. +@@ -297,7 +297,7 @@ public: + bool move_to_next_result() + { + m_current_rset= m_current_rset->m_next_rset; +- return test(m_current_rset); ++ return my_test(m_current_rset); + } + + ~Ed_connection() { free_old_result(); } diff --git a/databases/mysql56-client/patches/patch-sql_sql__select.cc b/databases/mysql56-client/patches/patch-sql_sql__select.cc new file mode 100644 index 00000000000..29c47219b6a --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__select.cc @@ -0,0 +1,76 @@ +$NetBSD: patch-sql_sql__select.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_select.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_select.cc +@@ -789,7 +789,7 @@ void JOIN::reset() + } + + if (!(select_options & SELECT_DESCRIBE)) +- init_ftfuncs(thd, select_lex, test(order)); ++ init_ftfuncs(thd, select_lex, my_test(order)); + + DBUG_VOID_RETURN; + } +@@ -931,7 +931,7 @@ bool JOIN::destroy() + sjm_exec_list.empty(); + + keyuse.clear(); +- DBUG_RETURN(test(error)); ++ DBUG_RETURN(my_test(error)); + } + + +@@ -1687,7 +1687,7 @@ bool create_ref_for_key(JOIN *join, JOIN + for (uint part_no= 0 ; part_no < keyparts ; part_no++) + { + keyuse= chosen_keyuses[part_no]; +- uint maybe_null= test(keyinfo->key_part[part_no].null_bit); ++ uint maybe_null= my_test(keyinfo->key_part[part_no].null_bit); + + if (keyuse->val->type() == Item::FIELD_ITEM) + { +@@ -1925,7 +1925,7 @@ static Item *make_cond_for_index(Item *c + new_cond->argument_list()->push_back(fix); + used_tables|= fix->used_tables(); + } +- n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY); ++ n_marked += my_test(item->marker == ICP_COND_USES_INDEX_ONLY); + } + if (n_marked ==((Item_cond*)cond)->argument_list()->elements) + cond->marker= ICP_COND_USES_INDEX_ONLY; +@@ -1954,7 +1954,7 @@ static Item *make_cond_for_index(Item *c + if (!fix) + return NULL; + new_cond->argument_list()->push_back(fix); +- n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY); ++ n_marked += my_test(item->marker == ICP_COND_USES_INDEX_ONLY); + } + if (n_marked ==((Item_cond*)cond)->argument_list()->elements) + cond->marker= ICP_COND_USES_INDEX_ONLY; +@@ -2759,7 +2759,7 @@ bool JOIN::setup_materialized_table(JOIN + bool + make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) + { +- const bool statistics= test(!(join->select_options & SELECT_DESCRIBE)); ++ const bool statistics= my_test(!(join->select_options & SELECT_DESCRIBE)); + + DBUG_ENTER("make_join_readinfo"); + +@@ -4397,7 +4397,7 @@ test_if_subpart(ORDER *a,ORDER *b) + else + return 0; + } +- return test(!b); ++ return my_test(!b); + } + + /** +@@ -5147,7 +5147,7 @@ bool JOIN::make_tmp_tables_info() + or end_write_group()) if JOIN::group is set to false. + */ + // the temporary table was explicitly requested +- DBUG_ASSERT(test(select_options & OPTION_BUFFER_RESULT)); ++ DBUG_ASSERT(my_test(select_options & OPTION_BUFFER_RESULT)); + // the temporary table does not have a grouping expression + DBUG_ASSERT(!join_tab[curr_tmp_table].table->group); + } diff --git a/databases/mysql56-client/patches/patch-sql_sql__select.h b/databases/mysql56-client/patches/patch-sql_sql__select.h new file mode 100644 index 00000000000..6dc85ac84f8 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__select.h @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__select.h,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_select.h.orig 2013-05-05 20:54:55.000000000 +0000 ++++ sql/sql_select.h +@@ -789,7 +789,7 @@ public: + used_rowid_fields= 1; + used_fieldlength+= table->file->ref_length; + } +- return test(used_rowid_fields); ++ return my_test(used_rowid_fields); + } + bool is_inner_table_of_outer_join() + { diff --git a/databases/mysql56-client/patches/patch-sql_sql__show.cc b/databases/mysql56-client/patches/patch-sql_sql__show.cc new file mode 100644 index 00000000000..5801456c491 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__show.cc @@ -0,0 +1,57 @@ +$NetBSD: patch-sql_sql__show.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_show.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_show.cc +@@ -740,7 +740,7 @@ public: + m_view_access_denied_message_ptr(NULL) + { + +- m_sctx = test(m_top_view->security_ctx) ? ++ m_sctx = my_test(m_top_view->security_ctx) ? + m_top_view->security_ctx : thd->security_ctx; + } + +@@ -1835,7 +1835,7 @@ static void store_key_options(THD *thd, + end= longlong10_to_str(key_info->block_size, buff, 10); + packet->append(buff, (uint) (end - buff)); + } +- DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) == ++ DBUG_ASSERT(my_test(key_info->flags & HA_USES_COMMENT) == + (key_info->comment.length > 0)); + if (key_info->flags & HA_USES_COMMENT) + { +@@ -4634,7 +4634,7 @@ static int get_schema_column_record(THD + #ifndef NO_EMBEDDED_ACCESS_CHECKS + uint col_access; + check_access(thd,SELECT_ACL, db_name->str, +- &tables->grant.privilege, 0, 0, test(tables->schema_table)); ++ &tables->grant.privilege, 0, 0, my_test(tables->schema_table)); + col_access= get_column_grant(thd, &tables->grant, + db_name->str, table_name->str, + field->field_name) & COL_ACLS; +@@ -4775,13 +4775,13 @@ static my_bool iter_schema_engines(THD * + table->field[1]->store(option_name, strlen(option_name), scs); + table->field[2]->store(plugin_decl(plugin)->descr, + strlen(plugin_decl(plugin)->descr), scs); +- tmp= &yesno[test(hton->commit)]; ++ tmp= &yesno[my_test(hton->commit)]; + table->field[3]->store(tmp->str, tmp->length, scs); + table->field[3]->set_notnull(); +- tmp= &yesno[test(hton->prepare)]; ++ tmp= &yesno[my_test(hton->prepare)]; + table->field[4]->store(tmp->str, tmp->length, scs); + table->field[4]->set_notnull(); +- tmp= &yesno[test(hton->savepoint_set)]; ++ tmp= &yesno[my_test(hton->savepoint_set)]; + table->field[5]->store(tmp->str, tmp->length, scs); + table->field[5]->set_notnull(); + +@@ -5357,7 +5357,7 @@ static int get_schema_stat_record(THD *t + else + table->field[14]->store("", 0, cs); + table->field[14]->set_notnull(); +- DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) == ++ DBUG_ASSERT(my_test(key_info->flags & HA_USES_COMMENT) == + (key_info->comment.length > 0)); + if (key_info->flags & HA_USES_COMMENT) + table->field[15]->store(key_info->comment.str, diff --git a/databases/mysql56-client/patches/patch-sql_sql__table.cc b/databases/mysql56-client/patches/patch-sql_sql__table.cc new file mode 100644 index 00000000000..bf608274c3e --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__table.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-sql_sql__table.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_table.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_table.cc +@@ -3870,7 +3870,7 @@ mysql_prepare_create_table(THD *thd, HA_ + with length (unlike blobs, where ft code takes data length from a + data prefix, ignoring column->length). + */ +- column->length=test(f_is_blob(sql_field->pack_flag)); ++ column->length=my_test(f_is_blob(sql_field->pack_flag)); + } + else + { +@@ -7012,7 +7012,7 @@ mysql_prepare_alter_table(THD *thd, TABL + + key= new Key(key_type, key_name, strlen(key_name), + &key_create_info, +- test(key_info->flags & HA_GENERATED_KEY), ++ my_test(key_info->flags & HA_GENERATED_KEY), + key_parts); + new_key_list.push_back(key); + } +@@ -9029,7 +9029,7 @@ static bool check_engine(THD *thd, const + handlerton **new_engine= &create_info->db_type; + handlerton *req_engine= *new_engine; + bool no_substitution= +- test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); ++ my_test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); + if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine), + no_substitution, 1))) + DBUG_RETURN(true); diff --git a/databases/mysql56-client/patches/patch-sql_sql__time.cc b/databases/mysql56-client/patches/patch-sql_sql__time.cc new file mode 100644 index 00000000000..5b1004c4ca8 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__time.cc @@ -0,0 +1,17 @@ +$NetBSD: patch-sql_sql__time.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_time.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_time.cc +@@ -105,9 +105,9 @@ uint calc_week(MYSQL_TIME *l_time, uint + uint days; + ulong daynr=calc_daynr(l_time->year,l_time->month,l_time->day); + ulong first_daynr=calc_daynr(l_time->year,1,1); +- bool monday_first= test(week_behaviour & WEEK_MONDAY_FIRST); +- bool week_year= test(week_behaviour & WEEK_YEAR); +- bool first_weekday= test(week_behaviour & WEEK_FIRST_WEEKDAY); ++ bool monday_first= my_test(week_behaviour & WEEK_MONDAY_FIRST); ++ bool week_year= my_test(week_behaviour & WEEK_YEAR); ++ bool first_weekday= my_test(week_behaviour & WEEK_FIRST_WEEKDAY); + + uint weekday=calc_weekday(first_daynr, !monday_first); + *year=l_time->year; diff --git a/databases/mysql56-client/patches/patch-sql_sql__tmp__table.cc b/databases/mysql56-client/patches/patch-sql_sql__tmp__table.cc new file mode 100644 index 00000000000..0544f4ba748 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__tmp__table.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_sql__tmp__table.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_tmp_table.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_tmp_table.cc +@@ -1006,7 +1006,7 @@ update_hidden: + table->group=group; /* Table is grouped by key */ + param->group_buff=group_buff; + share->keys=1; +- share->uniques= test(using_unique_constraint); ++ share->uniques= my_test(using_unique_constraint); + table->key_info= share->key_info= keyinfo; + keyinfo->key_part= key_part_info; + keyinfo->flags=HA_NOSAME; +@@ -1028,7 +1028,7 @@ update_hidden: + { + cur_group->buff=(char*) group_buff; + cur_group->field= field->new_key_field(thd->mem_root, table, +- group_buff + test(maybe_null)); ++ group_buff + my_test(maybe_null)); + + if (!cur_group->field) + goto err; /* purecov: inspected */ +@@ -1076,7 +1076,7 @@ update_hidden: + null_pack_length-=hidden_null_pack_length; + keyinfo->user_defined_key_parts= + ((field_count-param->hidden_field_count) + +- (share->uniques ? test(null_pack_length) : 0)); ++ (share->uniques ? my_test(null_pack_length) : 0)); + keyinfo->actual_key_parts= keyinfo->user_defined_key_parts; + table->distinct= 1; + share->keys= 1; +@@ -1400,7 +1400,7 @@ TABLE *create_duplicate_weedout_tmp_tabl + { + DBUG_PRINT("info",("Creating group key in temporary table")); + share->keys=1; +- share->uniques= test(using_unique_constraint); ++ share->uniques= my_test(using_unique_constraint); + table->key_info= table->s->key_info= keyinfo; + keyinfo->key_part=key_part_info; + keyinfo->actual_flags= keyinfo->flags= HA_NOSAME; diff --git a/databases/mysql56-client/patches/patch-sql_sql__union.cc b/databases/mysql56-client/patches/patch-sql_sql__union.cc new file mode 100644 index 00000000000..dba75c6277b --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__union.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-sql_sql__union.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_union.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_union.cc +@@ -271,7 +271,7 @@ bool st_select_lex_unit::prepare(THD *th + bool is_union_select; + DBUG_ENTER("st_select_lex_unit::prepare"); + +- describe= test(additional_options & SELECT_DESCRIBE); ++ describe= my_test(additional_options & SELECT_DESCRIBE); + + /* + result object should be reassigned even if preparing already done for +@@ -462,7 +462,7 @@ bool st_select_lex_unit::prepare(THD *th + if (global_parameters->ftfunc_list->elements) + create_options= create_options | TMP_TABLE_FORCE_MYISAM; + +- if (union_result->create_result_table(thd, &types, test(union_distinct), ++ if (union_result->create_result_table(thd, &types, my_test(union_distinct), + create_options, "", FALSE, TRUE)) + goto err; + memset(&result_table_list, 0, sizeof(result_table_list)); diff --git a/databases/mysql56-client/patches/patch-sql_sql__update.cc b/databases/mysql56-client/patches/patch-sql_sql__update.cc new file mode 100644 index 00000000000..0fcc1655121 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sql__update.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sql__update.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sql_update.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sql_update.cc +@@ -222,7 +222,7 @@ int mysql_update(THD *thd, + ha_rows *found_return, ha_rows *updated_return) + { + bool using_limit= limit != HA_POS_ERROR; +- bool safe_update= test(thd->variables.option_bits & OPTION_SAFE_UPDATES); ++ bool safe_update= my_test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + bool used_key_is_modified= FALSE, transactional_table, will_batch; + int res; + int error= 1; diff --git a/databases/mysql56-client/patches/patch-sql_sys__vars.cc b/databases/mysql56-client/patches/patch-sql_sys__vars.cc new file mode 100644 index 00000000000..e4efe4f3ca0 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_sys__vars.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_sys__vars.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/sys_vars.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/sys_vars.cc +@@ -2055,7 +2055,7 @@ static bool fix_optimizer_switch(sys_var + { + SV *sv= (type == OPT_GLOBAL) ? &global_system_variables : &thd->variables; + sv->engine_condition_pushdown= +- test(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); ++ my_test(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); + + return false; + } diff --git a/databases/mysql56-client/patches/patch-sql_table.cc b/databases/mysql56-client/patches/patch-sql_table.cc new file mode 100644 index 00000000000..20ef34d1412 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_table.cc @@ -0,0 +1,52 @@ +$NetBSD: patch-sql_table.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/table.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/table.cc +@@ -1076,7 +1076,7 @@ static int open_binary_frm(THD *thd, TAB + } + share->db_record_offset= 1; + /* Set temporarily a good value for db_low_byte_first */ +- share->db_low_byte_first= test(legacy_db_type != DB_TYPE_ISAM); ++ share->db_low_byte_first= my_test(legacy_db_type != DB_TYPE_ISAM); + error=4; + share->max_rows= uint4korr(head+18); + share->min_rows= uint4korr(head+22); +@@ -1206,7 +1206,7 @@ static int open_binary_frm(THD *thd, TAB + keyinfo->comment.length); + strpos+= 2 + keyinfo->comment.length; + } +- DBUG_ASSERT(test(keyinfo->flags & HA_USES_COMMENT) == ++ DBUG_ASSERT(my_test(keyinfo->flags & HA_USES_COMMENT) == + (keyinfo->comment.length > 0)); + } + +@@ -2374,9 +2374,9 @@ partititon_err: + else if (outparam->file) + { + handler::Table_flags flags= outparam->file->ha_table_flags(); +- outparam->no_replicate= ! test(flags & (HA_BINLOG_STMT_CAPABLE ++ outparam->no_replicate= ! my_test(flags & (HA_BINLOG_STMT_CAPABLE + | HA_BINLOG_ROW_CAPABLE)) +- || test(flags & HA_HAS_OWN_BINLOGGING); ++ || my_test(flags & HA_HAS_OWN_BINLOGGING); + } + else + { +@@ -2928,7 +2928,7 @@ File create_frm(THD *thd, const char *na + /* header */ + fileinfo[0]=(uchar) 254; + fileinfo[1]= 1; +- fileinfo[2]= FRM_VER+3+ test(create_info->varchar); ++ fileinfo[2]= FRM_VER+3+ my_test(create_info->varchar); + + fileinfo[3]= (uchar) ha_legacy_type( + ha_checktype(thd,ha_legacy_type(create_info->db_type),0,0)); +@@ -2948,7 +2948,7 @@ File create_frm(THD *thd, const char *na + */ + for (i= 0; i < keys; i++) + { +- DBUG_ASSERT(test(key_info[i].flags & HA_USES_COMMENT) == ++ DBUG_ASSERT(my_test(key_info[i].flags & HA_USES_COMMENT) == + (key_info[i].comment.length > 0)); + if (key_info[i].flags & HA_USES_COMMENT) + key_comment_total_bytes += 2 + key_info[i].comment.length; diff --git a/databases/mysql56-client/patches/patch-sql_transaction.cc b/databases/mysql56-client/patches/patch-sql_transaction.cc new file mode 100644 index 00000000000..35b7bf6b530 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_transaction.cc @@ -0,0 +1,106 @@ +$NetBSD: patch-sql_transaction.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/transaction.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/transaction.cc +@@ -134,7 +134,7 @@ bool trans_begin(THD *thd, uint flags) + thd->server_status&= + ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); + DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); +- res= test(ha_commit_trans(thd, TRUE)); ++ res= my_test(ha_commit_trans(thd, TRUE)); + } + + thd->variables.option_bits&= ~OPTION_BEGIN; +@@ -163,7 +163,7 @@ bool trans_begin(THD *thd, uint flags) + compatibility. + */ + const bool user_is_super= +- test(thd->security_ctx->master_access & SUPER_ACL); ++ my_test(thd->security_ctx->master_access & SUPER_ACL); + if (opt_readonly && !user_is_super) + { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); +@@ -182,7 +182,7 @@ bool trans_begin(THD *thd, uint flags) + if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) + res= ha_start_consistent_snapshot(thd); + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -221,7 +221,7 @@ bool trans_commit(THD *thd) + thd->transaction.all.reset_unsafe_rollback_flags(); + thd->lex->start_transaction_opt= 0; + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -263,7 +263,7 @@ bool trans_commit_implicit(THD *thd) + thd->server_status&= + ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); + DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); +- res= test(ha_commit_trans(thd, TRUE)); ++ res= my_test(ha_commit_trans(thd, TRUE)); + } + else if (tc_log) + tc_log->commit(thd, true); +@@ -319,7 +319,7 @@ bool trans_rollback(THD *thd) + thd->transaction.all.reset_unsafe_rollback_flags(); + thd->lex->start_transaction_opt= 0; + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -382,7 +382,7 @@ bool trans_commit_stmt(THD *thd) + + thd->transaction.stmt.reset(); + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -588,7 +588,7 @@ bool trans_rollback_to_savepoint(THD *th + if (!res && !binlog_on) + thd->mdl_context.rollback_to_savepoint(sv->mdl_savepoint); + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -630,7 +630,7 @@ bool trans_release_savepoint(THD *thd, L + + thd->transaction.savepoints= sv->prev; + +- DBUG_RETURN(test(res)); ++ DBUG_RETURN(my_test(res)); + } + + +@@ -794,7 +794,7 @@ bool trans_xa_commit(THD *thd) + else if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE) + { + int r= ha_commit_trans(thd, TRUE); +- if ((res= test(r))) ++ if ((res= my_test(r))) + my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); + } + else if (xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE) +@@ -822,9 +822,9 @@ bool trans_xa_commit(THD *thd) + DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock"); + + if (tc_log) +- res= test(tc_log->commit(thd, /* all */ true)); ++ res= my_test(tc_log->commit(thd, /* all */ true)); + else +- res= test(ha_commit_low(thd, /* all */ true)); ++ res= my_test(ha_commit_low(thd, /* all */ true)); + + if (res) + my_error(ER_XAER_RMERR, MYF(0)); diff --git a/databases/mysql56-client/patches/patch-sql_tztime.cc b/databases/mysql56-client/patches/patch-sql_tztime.cc new file mode 100644 index 00000000000..fe2b26fd7d5 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_tztime.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_tztime.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/tztime.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/tztime.cc +@@ -2643,7 +2643,7 @@ main(int argc, char **argv) + if (TYPE_SIGNED(time_t)) + { + t= -100; +- localtime_negative= test(localtime_r(&t, &tmp) != 0); ++ localtime_negative= my_test(localtime_r(&t, &tmp) != 0); + printf("localtime_r %s negative params \ + (time_t=%d is %d-%d-%d %d:%d:%d)\n", + (localtime_negative ? "supports" : "doesn't support"), (int)t, diff --git a/databases/mysql56-client/patches/patch-sql_unireg.cc b/databases/mysql56-client/patches/patch-sql_unireg.cc new file mode 100644 index 00000000000..bd7969e1507 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_unireg.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_unireg.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- sql/unireg.cc.orig 2013-05-05 20:56:04.000000000 +0000 ++++ sql/unireg.cc +@@ -287,7 +287,7 @@ bool mysql_create_frm(THD *thd, const ch + maxlength=(uint) next_io_size((ulong) (uint2korr(forminfo_p)+1000)); + int2store(forminfo+2,maxlength); + int4store(fileinfo+10,(ulong) (filepos+maxlength)); +- fileinfo[26]= (uchar) test((create_info->max_rows == 1) && ++ fileinfo[26]= (uchar) my_test((create_info->max_rows == 1) && + (create_info->min_rows == 1) && (keys == 0)); + int2store(fileinfo+28,key_info_length); + diff --git a/databases/mysql56-client/patches/patch-storage_federated_ha__federated.cc b/databases/mysql56-client/patches/patch-storage_federated_ha__federated.cc new file mode 100644 index 00000000000..8f33d873342 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_federated_ha__federated.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-storage_federated_ha__federated.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- storage/federated/ha_federated.cc.orig 2013-05-05 20:50:46.000000000 +0000 ++++ storage/federated/ha_federated.cc +@@ -1463,7 +1463,7 @@ prepare_for_next_key_part: + ptr was incremented by 1. Since store_length still counts null-byte, + we need to subtract 1 from store_length. + */ +- ptr+= store_length - test(key_part->null_bit); ++ ptr+= store_length - my_test(key_part->null_bit); + if (tmp.append(STRING_WITH_LEN(" AND "))) + goto err; + +@@ -2105,7 +2105,7 @@ int ha_federated::update_row(const uchar + this? Because we only are updating one record, and LIMIT enforces + this. + */ +- bool has_a_primary_key= test(table->s->primary_key != MAX_KEY); ++ bool has_a_primary_key= my_test(table->s->primary_key != MAX_KEY); + + /* + buffers for following strings diff --git a/databases/mysql56-client/patches/patch-storage_heap_ha__heap.cc b/databases/mysql56-client/patches/patch-storage_heap_ha__heap.cc new file mode 100644 index 00000000000..795364c2b4d --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_heap_ha__heap.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-storage_heap_ha__heap.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- storage/heap/ha_heap.cc.orig 2013-04-05 12:27:17.000000000 +0000 ++++ storage/heap/ha_heap.cc +@@ -97,7 +97,7 @@ const char **ha_heap::bas_ext() const + + int ha_heap::open(const char *name, int mode, uint test_if_locked) + { +- internal_table= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); ++ internal_table= my_test(test_if_locked & HA_OPEN_INTERNAL_TABLE); + if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT)) + { + HP_CREATE_INFO create_info; +@@ -113,7 +113,7 @@ int ha_heap::open(const char *name, int + if (rc) + goto end; + +- implicit_emptied= test(created_new_share); ++ implicit_emptied= my_test(created_new_share); + if (internal_table) + file= heap_open_from_share(internal_share, mode); + else diff --git a/databases/mysql56-client/patches/patch-storage_myisam_ha__myisam.cc b/databases/mysql56-client/patches/patch-storage_myisam_ha__myisam.cc new file mode 100644 index 00000000000..dafd093e304 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_ha__myisam.cc @@ -0,0 +1,44 @@ +$NetBSD: patch-storage_myisam_ha__myisam.cc,v 1.1 2013/05/06 14:41:08 joerg Exp $ + +--- storage/myisam/ha_myisam.cc.orig 2013-05-05 21:01:47.000000000 +0000 ++++ storage/myisam/ha_myisam.cc +@@ -464,8 +464,8 @@ int check_definition(MI_KEYDEF *t1_keyin + { + DBUG_PRINT("error", ("Key %d has different definition", i)); + DBUG_PRINT("error", ("t1_fulltext= %d, t2_fulltext=%d", +- test(t1_keyinfo[i].flag & HA_FULLTEXT), +- test(t2_keyinfo[i].flag & HA_FULLTEXT))); ++ my_test(t1_keyinfo[i].flag & HA_FULLTEXT), ++ my_test(t2_keyinfo[i].flag & HA_FULLTEXT))); + DBUG_RETURN(1); + } + if (t1_keyinfo[i].flag & HA_SPATIAL && t2_keyinfo[i].flag & HA_SPATIAL) +@@ -475,8 +475,8 @@ int check_definition(MI_KEYDEF *t1_keyin + { + DBUG_PRINT("error", ("Key %d has different definition", i)); + DBUG_PRINT("error", ("t1_spatial= %d, t2_spatial=%d", +- test(t1_keyinfo[i].flag & HA_SPATIAL), +- test(t2_keyinfo[i].flag & HA_SPATIAL))); ++ my_test(t1_keyinfo[i].flag & HA_SPATIAL), ++ my_test(t2_keyinfo[i].flag & HA_SPATIAL))); + DBUG_RETURN(1); + } + if ((!mysql_40_compat && +@@ -1067,7 +1067,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK + share->state.key_map); + uint testflag=param.testflag; + #ifdef HAVE_MMAP +- bool remap= test(share->file_map); ++ bool remap= my_test(share->file_map); + /* + mi_repair*() functions family use file I/O even if memory + mapping is available. +@@ -1609,7 +1609,7 @@ ICP_RESULT index_cond_func_myisam(void * + if (h->end_range && h->compare_key_icp(h->end_range) > 0) + return ICP_OUT_OF_RANGE; /* caller should return HA_ERR_END_OF_FILE already */ + +- return (ICP_RESULT) test(h->pushed_idx_cond->val_int()); ++ return (ICP_RESULT) my_test(h->pushed_idx_cond->val_int()); + } + + C_MODE_END |