You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

554 lines
14 KiB

Added support for hex strings to mysqlimport A lot of new tests to mysqltest Fixed bug with BDB tables and autocommit BitKeeper/deleted/.del-delete.test~389410e29f2cebe5: Delete: mysql-test/t/delete.test BitKeeper/deleted/.del-delete.result~e866a6678e29f186: Delete: mysql-test/r/delete.result BitKeeper/deleted/.del-sel000014.test~74cb8c70f1d73fcc: Delete: mysql-test/t/sel000014.test BitKeeper/deleted/.del-sel000015.test~7442bf9cbc96fe07: Delete: mysql-test/t/sel000015.test BitKeeper/deleted/.del-sel000016.test~f495235f14c47ec: Delete: mysql-test/t/sel000016.test BitKeeper/deleted/.del-sel000017.test~7c39f2b45a6aa780: Delete: mysql-test/t/sel000017.test BitKeeper/deleted/.del-sel000018.test~16207f3ad74de75e: Delete: mysql-test/t/sel000018.test BitKeeper/deleted/.del-sel000014.result~fc8de0ec89d9e35: Delete: mysql-test/r/sel000014.result BitKeeper/deleted/.del-sel000015.result~cadbc52051d47bac: Delete: mysql-test/r/sel000015.result BitKeeper/deleted/.del-sel000016.result~6177851869bd5b07: Delete: mysql-test/r/sel000016.result BitKeeper/deleted/.del-sel000017.result~84ebf147850ff31c: Delete: mysql-test/r/sel000017.result BitKeeper/deleted/.del-sel000018.result~562ac9094cf53aba: Delete: mysql-test/r/sel000018.result BitKeeper/deleted/.del-sel000005.test~982fde89a4d6d886: Delete: mysql-test/t/sel000005.test BitKeeper/deleted/.del-sel000006.test~291cc6c8d85e51df: Delete: mysql-test/t/sel000006.test BitKeeper/deleted/.del-sel000005.result~d5410bb765199cc5: Delete: mysql-test/r/sel000005.result BitKeeper/deleted/.del-sel000006.result~d38004d1acfc11a5: Delete: mysql-test/r/sel000006.result BitKeeper/deleted/.del-sel000004.test~daf9ad4a1a31cd3c: Delete: mysql-test/t/sel000004.test BitKeeper/deleted/.del-sel000007.test~f431e4f4739a24c3: Delete: mysql-test/t/sel000007.test BitKeeper/deleted/.del-sel000008.test~b338ef585cadf7ae: Delete: mysql-test/t/sel000008.test BitKeeper/deleted/.del-sel000009.test~a455c38f5c942cd1: Delete: mysql-test/t/sel000009.test BitKeeper/deleted/.del-sel000010.test~ca07085ae92255f1: Delete: mysql-test/t/sel000010.test BitKeeper/deleted/.del-sel000011.test~c2a971726c9d18d6: Delete: mysql-test/t/sel000011.test BitKeeper/deleted/.del-sel000012.test~ae64bff363c42e92: Delete: mysql-test/t/sel000012.test BitKeeper/deleted/.del-sel000013.test~ce8aa504ba4f74ba: Delete: mysql-test/t/sel000013.test BitKeeper/deleted/.del-sel000019.test~8fd63c8dc6be8dbc: Delete: mysql-test/t/sel000019.test BitKeeper/deleted/.del-sel000020.test~c5758ad18a6dff1e: Delete: mysql-test/t/sel000020.test BitKeeper/deleted/.del-sel000021.test~94dd47de2872264a: Delete: mysql-test/t/sel000021.test BitKeeper/deleted/.del-sel000022.test~6e3e5435e66875e9: Delete: mysql-test/t/sel000022.test BitKeeper/deleted/.del-sel000023.test~7bdfcfaa278f837d: Delete: mysql-test/t/sel000023.test BitKeeper/deleted/.del-sel000024.test~849f47e6cbdc4fe3: Delete: mysql-test/t/sel000024.test BitKeeper/deleted/.del-sel000025.test~65b32b4b67e4c77: Delete: mysql-test/t/sel000025.test BitKeeper/deleted/.del-sel000026.test~d8aa2d614f23b1: Delete: mysql-test/t/sel000026.test BitKeeper/deleted/.del-sel000027.test~ab44bb57a580de9: Delete: mysql-test/t/sel000027.test BitKeeper/deleted/.del-sel000028.test~db9bfc0a808fb629: Delete: mysql-test/t/sel000028.test BitKeeper/deleted/.del-sel000029.test~6aae34dbb3ee86d9: Delete: mysql-test/t/sel000029.test BitKeeper/deleted/.del-sel000030.test~a29683eac3e7b706: Delete: mysql-test/t/sel000030.test BitKeeper/deleted/.del-sel000004.result~1f8d1265be521c17: Delete: mysql-test/r/sel000004.result BitKeeper/deleted/.del-sel000007.result~df455e49f9727c4f: Delete: mysql-test/r/sel000007.result BitKeeper/deleted/.del-sel000008.result~67a459ff62c84d6a: Delete: mysql-test/r/sel000008.result BitKeeper/deleted/.del-sel000009.result~e042b35ab131fb3: Delete: mysql-test/r/sel000009.result BitKeeper/deleted/.del-sel000010.result~eee5b9631a1e0066: Delete: mysql-test/r/sel000010.result BitKeeper/deleted/.del-sel000011.result~6907fe356973ed25: Delete: mysql-test/r/sel000011.result BitKeeper/deleted/.del-sel000012.result~be18991fc28954c2: Delete: mysql-test/r/sel000012.result BitKeeper/deleted/.del-sel000013.result~513389e06c96af73: Delete: mysql-test/r/sel000013.result BitKeeper/deleted/.del-sel000019.result~2870fe1c4998d929: Delete: mysql-test/r/sel000019.result BitKeeper/deleted/.del-sel000020.result~faa670294ef5fa91: Delete: mysql-test/r/sel000020.result BitKeeper/deleted/.del-sel000021.result~8f0ce4ec26e0c21d: Delete: mysql-test/r/sel000021.result BitKeeper/deleted/.del-sel000022.result~34828a43753ee767: Delete: mysql-test/r/sel000022.result BitKeeper/deleted/.del-sel000023.result~13e112d77573bf17: Delete: mysql-test/r/sel000023.result BitKeeper/deleted/.del-sel000024.result~b10d449624f48d07: Delete: mysql-test/r/sel000024.result BitKeeper/deleted/.del-sel000025.result~f31e08fcca805f35: Delete: mysql-test/r/sel000025.result BitKeeper/deleted/.del-sel000026.result~854fa951666b7982: Delete: mysql-test/r/sel000026.result BitKeeper/deleted/.del-sel000027.result~cfd73fe738f27da: Delete: mysql-test/r/sel000027.result BitKeeper/deleted/.del-sel000028.result~13ff5add6ac24908: Delete: mysql-test/r/sel000028.result BitKeeper/deleted/.del-sel000029.result~c6d071781808aa26: Delete: mysql-test/r/sel000029.result BitKeeper/deleted/.del-sel000030.result~98d496948e15064d: Delete: mysql-test/r/sel000030.result BitKeeper/deleted/.del-alt000001.test~633aed61c4bad94c: Delete: mysql-test/t/alt000001.test BitKeeper/deleted/.del-alt000001.result~393103dbf15f35c9: Delete: mysql-test/r/alt000001.result BitKeeper/deleted/.del-mrg000001.dummy.result~bf7e6d609f22b897: Delete: mysql-test/r/mrg000001.dummy.result BitKeeper/deleted/.del-mrg000001.result~db2ef2e717ab8332: Delete: mysql-test/r/mrg000001.result BitKeeper/deleted/.del-mrg000002.result~745be0854aaaaf5e: Delete: mysql-test/r/mrg000002.result BitKeeper/deleted/.del-mrg000001.test~e0327f9d1e6cb4e: Delete: mysql-test/t/mrg000001.test BitKeeper/deleted/.del-mrg000002.test~16b3a176adc0f311: Delete: mysql-test/t/mrg000002.test Docs/manual.texi: Changelog client/mysqlimport.c: Added support for hex strings client/mysqltest.c: Added linenumbers in output Only allow '{' first on a row (Conflicts with ODBC {} syntax). Handle bigger queries. Handle double '' Truncate result files. mysql-test/mysql-test-run.sh: Added --verbose cleanup mysql-test/r/bdb.result: Updating of test mysql-test/r/func_crypt.result: Updating of test mysql-test/r/func_equal.result: Updating of test mysql-test/r/func_str.result: Updating of test mysql-test/r/ins000001.result: Updating of test mysql-test/t/bdb.test: Updating of test mysql-test/t/err000001.test: Updating of test mysql-test/t/func_crypt.test: Updating of test mysql-test/t/func_equal.test: Updating of test mysql-test/t/func_str.test: Updating of test mysql-test/t/ins000001.test: Updating of test sql/gen_lex_hash.cc: Smaller table sql/handler.cc: Fixed bug in auto_commit
25 years ago
Added support for hex strings to mysqlimport A lot of new tests to mysqltest Fixed bug with BDB tables and autocommit BitKeeper/deleted/.del-delete.test~389410e29f2cebe5: Delete: mysql-test/t/delete.test BitKeeper/deleted/.del-delete.result~e866a6678e29f186: Delete: mysql-test/r/delete.result BitKeeper/deleted/.del-sel000014.test~74cb8c70f1d73fcc: Delete: mysql-test/t/sel000014.test BitKeeper/deleted/.del-sel000015.test~7442bf9cbc96fe07: Delete: mysql-test/t/sel000015.test BitKeeper/deleted/.del-sel000016.test~f495235f14c47ec: Delete: mysql-test/t/sel000016.test BitKeeper/deleted/.del-sel000017.test~7c39f2b45a6aa780: Delete: mysql-test/t/sel000017.test BitKeeper/deleted/.del-sel000018.test~16207f3ad74de75e: Delete: mysql-test/t/sel000018.test BitKeeper/deleted/.del-sel000014.result~fc8de0ec89d9e35: Delete: mysql-test/r/sel000014.result BitKeeper/deleted/.del-sel000015.result~cadbc52051d47bac: Delete: mysql-test/r/sel000015.result BitKeeper/deleted/.del-sel000016.result~6177851869bd5b07: Delete: mysql-test/r/sel000016.result BitKeeper/deleted/.del-sel000017.result~84ebf147850ff31c: Delete: mysql-test/r/sel000017.result BitKeeper/deleted/.del-sel000018.result~562ac9094cf53aba: Delete: mysql-test/r/sel000018.result BitKeeper/deleted/.del-sel000005.test~982fde89a4d6d886: Delete: mysql-test/t/sel000005.test BitKeeper/deleted/.del-sel000006.test~291cc6c8d85e51df: Delete: mysql-test/t/sel000006.test BitKeeper/deleted/.del-sel000005.result~d5410bb765199cc5: Delete: mysql-test/r/sel000005.result BitKeeper/deleted/.del-sel000006.result~d38004d1acfc11a5: Delete: mysql-test/r/sel000006.result BitKeeper/deleted/.del-sel000004.test~daf9ad4a1a31cd3c: Delete: mysql-test/t/sel000004.test BitKeeper/deleted/.del-sel000007.test~f431e4f4739a24c3: Delete: mysql-test/t/sel000007.test BitKeeper/deleted/.del-sel000008.test~b338ef585cadf7ae: Delete: mysql-test/t/sel000008.test BitKeeper/deleted/.del-sel000009.test~a455c38f5c942cd1: Delete: mysql-test/t/sel000009.test BitKeeper/deleted/.del-sel000010.test~ca07085ae92255f1: Delete: mysql-test/t/sel000010.test BitKeeper/deleted/.del-sel000011.test~c2a971726c9d18d6: Delete: mysql-test/t/sel000011.test BitKeeper/deleted/.del-sel000012.test~ae64bff363c42e92: Delete: mysql-test/t/sel000012.test BitKeeper/deleted/.del-sel000013.test~ce8aa504ba4f74ba: Delete: mysql-test/t/sel000013.test BitKeeper/deleted/.del-sel000019.test~8fd63c8dc6be8dbc: Delete: mysql-test/t/sel000019.test BitKeeper/deleted/.del-sel000020.test~c5758ad18a6dff1e: Delete: mysql-test/t/sel000020.test BitKeeper/deleted/.del-sel000021.test~94dd47de2872264a: Delete: mysql-test/t/sel000021.test BitKeeper/deleted/.del-sel000022.test~6e3e5435e66875e9: Delete: mysql-test/t/sel000022.test BitKeeper/deleted/.del-sel000023.test~7bdfcfaa278f837d: Delete: mysql-test/t/sel000023.test BitKeeper/deleted/.del-sel000024.test~849f47e6cbdc4fe3: Delete: mysql-test/t/sel000024.test BitKeeper/deleted/.del-sel000025.test~65b32b4b67e4c77: Delete: mysql-test/t/sel000025.test BitKeeper/deleted/.del-sel000026.test~d8aa2d614f23b1: Delete: mysql-test/t/sel000026.test BitKeeper/deleted/.del-sel000027.test~ab44bb57a580de9: Delete: mysql-test/t/sel000027.test BitKeeper/deleted/.del-sel000028.test~db9bfc0a808fb629: Delete: mysql-test/t/sel000028.test BitKeeper/deleted/.del-sel000029.test~6aae34dbb3ee86d9: Delete: mysql-test/t/sel000029.test BitKeeper/deleted/.del-sel000030.test~a29683eac3e7b706: Delete: mysql-test/t/sel000030.test BitKeeper/deleted/.del-sel000004.result~1f8d1265be521c17: Delete: mysql-test/r/sel000004.result BitKeeper/deleted/.del-sel000007.result~df455e49f9727c4f: Delete: mysql-test/r/sel000007.result BitKeeper/deleted/.del-sel000008.result~67a459ff62c84d6a: Delete: mysql-test/r/sel000008.result BitKeeper/deleted/.del-sel000009.result~e042b35ab131fb3: Delete: mysql-test/r/sel000009.result BitKeeper/deleted/.del-sel000010.result~eee5b9631a1e0066: Delete: mysql-test/r/sel000010.result BitKeeper/deleted/.del-sel000011.result~6907fe356973ed25: Delete: mysql-test/r/sel000011.result BitKeeper/deleted/.del-sel000012.result~be18991fc28954c2: Delete: mysql-test/r/sel000012.result BitKeeper/deleted/.del-sel000013.result~513389e06c96af73: Delete: mysql-test/r/sel000013.result BitKeeper/deleted/.del-sel000019.result~2870fe1c4998d929: Delete: mysql-test/r/sel000019.result BitKeeper/deleted/.del-sel000020.result~faa670294ef5fa91: Delete: mysql-test/r/sel000020.result BitKeeper/deleted/.del-sel000021.result~8f0ce4ec26e0c21d: Delete: mysql-test/r/sel000021.result BitKeeper/deleted/.del-sel000022.result~34828a43753ee767: Delete: mysql-test/r/sel000022.result BitKeeper/deleted/.del-sel000023.result~13e112d77573bf17: Delete: mysql-test/r/sel000023.result BitKeeper/deleted/.del-sel000024.result~b10d449624f48d07: Delete: mysql-test/r/sel000024.result BitKeeper/deleted/.del-sel000025.result~f31e08fcca805f35: Delete: mysql-test/r/sel000025.result BitKeeper/deleted/.del-sel000026.result~854fa951666b7982: Delete: mysql-test/r/sel000026.result BitKeeper/deleted/.del-sel000027.result~cfd73fe738f27da: Delete: mysql-test/r/sel000027.result BitKeeper/deleted/.del-sel000028.result~13ff5add6ac24908: Delete: mysql-test/r/sel000028.result BitKeeper/deleted/.del-sel000029.result~c6d071781808aa26: Delete: mysql-test/r/sel000029.result BitKeeper/deleted/.del-sel000030.result~98d496948e15064d: Delete: mysql-test/r/sel000030.result BitKeeper/deleted/.del-alt000001.test~633aed61c4bad94c: Delete: mysql-test/t/alt000001.test BitKeeper/deleted/.del-alt000001.result~393103dbf15f35c9: Delete: mysql-test/r/alt000001.result BitKeeper/deleted/.del-mrg000001.dummy.result~bf7e6d609f22b897: Delete: mysql-test/r/mrg000001.dummy.result BitKeeper/deleted/.del-mrg000001.result~db2ef2e717ab8332: Delete: mysql-test/r/mrg000001.result BitKeeper/deleted/.del-mrg000002.result~745be0854aaaaf5e: Delete: mysql-test/r/mrg000002.result BitKeeper/deleted/.del-mrg000001.test~e0327f9d1e6cb4e: Delete: mysql-test/t/mrg000001.test BitKeeper/deleted/.del-mrg000002.test~16b3a176adc0f311: Delete: mysql-test/t/mrg000002.test Docs/manual.texi: Changelog client/mysqlimport.c: Added support for hex strings client/mysqltest.c: Added linenumbers in output Only allow '{' first on a row (Conflicts with ODBC {} syntax). Handle bigger queries. Handle double '' Truncate result files. mysql-test/mysql-test-run.sh: Added --verbose cleanup mysql-test/r/bdb.result: Updating of test mysql-test/r/func_crypt.result: Updating of test mysql-test/r/func_equal.result: Updating of test mysql-test/r/func_str.result: Updating of test mysql-test/r/ins000001.result: Updating of test mysql-test/t/bdb.test: Updating of test mysql-test/t/err000001.test: Updating of test mysql-test/t/func_crypt.test: Updating of test mysql-test/t/func_equal.test: Updating of test mysql-test/t/func_str.test: Updating of test mysql-test/t/ins000001.test: Updating of test sql/gen_lex_hash.cc: Smaller table sql/handler.cc: Fixed bug in auto_commit
25 years ago
22 years ago
Added casts to avoid compiler warnings and fixed a wrong type. --- Added casts and fixed wrong type. --- Added casts and fixed wrong type. --- Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel --- Don't give warning that readonly variable is forced to be readonly mysql-test-run run now fails if we have [Warning] and [ERROR] as tags in .err file Fixed wrong reference to the mysql manual Fixed wrong prototype that caused some tests to fail on 64 bit platforms --- Disabled compiler warnings mainly for Win 64. --- Added casts to remove compiler warnings on windows Give warnings also for safe_mutex errors found by test system Added some warnings from different machines in pushbuild --- Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel into mysql.com:/home/my/mysql-5.1 --- Added escapes for double quotes and parenthesis. --- Archive db fix plus added non-critical warnings in ignore list. --- Fixed previously added patch and added new ignored warning. client/mysqltest.c: Added casts to avoid compiler warnings. --- Added casts to avoid compiler warnings. mysql-test/lib/mtr_report.pl: Test run now fails if we have [Warning] and [ERROR] as tags in .err file Added list of all common 'not fatal' errors to ignore error list --- Give warnings also for safe_mutex errors Added some warnings from different machines in pushbuild --- Added escapes for double quotes and parenthesis. --- Added non-critical warnings to be ignored. --- Fixed a wrong regexp Added new non-critical warning mysql-test/mysql-test-run-shell.sh: Fixed some wrong startup options mysql-test/r/func_misc.result: Test case for archive db fix. mysql-test/t/disabled.def: Disable instance manager tests because they generate warnings (and probably don't read the option files correctly) mysql-test/t/func_misc.test: Test case for archive db fix. mysys/array.c: Added casts to avoid compiler warnings. mysys/hash.c: Added casts to avoid compiler warnings. mysys/my_compress.c: Added casts to remove compiler warnings on windows mysys/my_conio.c: To avoid a warning from compiler. mysys/my_pread.c: Archive db fix. mysys/my_quick.c: Added cast to avoid compiler warning. --- Added cast to avoid compiler warning. sql/ha_ndbcluster_binlog.cc: Ensure we log all binglog errors with the "NDB Binlog" tag sql/ha_partition.cc: result is type bool, so calculation should be forced to that also. sql/log.cc: Fixed compiler problem on Solaris. sql/slave.cc: Make errors uniform sql/sql_class.cc: Added cast to remove compiler warnings on windows sql/sql_map.cc: Added casts to avoid compiler warnings. --- Added casts to avoid compiler warnings. sql/sql_plugin.cc: Fixed wrong type. --- Don't give warning that readonly variable is forced to be readonly sql/stacktrace.c: Corrected manual reference storage/archive/azio.c: Archive db fix. --- Fixed previously added patch. storage/blackhole/ha_blackhole.cc: Fixed wrong prototype that caused test to fail on 64 bit platforms storage/example/ha_example.cc: Fixed wrong prototype that caused test to fail on 64 bit platforms strings/ctype-ucs2.c: Fixed wrong type. --- Fixed wrong type. support-files/compiler_warnings.supp: Added new disabled warnings for Win 64.
19 years ago
Bug #8433: Overflow must be an error All numeric operators and functions on integer, floating point and DECIMAL values now throw an 'out of range' error rather than returning an incorrect value or NULL, when the result is out of supported range for the corresponding data type. Some test cases in the test suite had to be updated accordingly either because the test case itself relied on a value returned in case of a numeric overflow, or because a numeric overflow was the root cause of the corresponding bugs. The latter tests are no longer relevant, since the expressions used to trigger the corresponding bugs are not valid anymore. However, such test cases have been adjusted and kept "for the record". mysql-test/r/func_math.result: Added test cases for bug #8433. Updated results of the test case for bug #31236. mysql-test/r/func_misc.result: Streamlined test cases. mysql-test/r/func_test.result: Streamlined test cases. mysql-test/r/select.result: Streamlined test cases. mysql-test/r/sp.result: Streamlined test cases. mysql-test/r/strict.result: Streamlined test cases. mysql-test/r/type_newdecimal.result: Streamlined test cases. mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result: Streamlined test cases. mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test: Streamlined test cases. mysql-test/t/func_math.test: Added test cases for bug #8433. Updated results of the test case for bug #31236. mysql-test/t/func_misc.test: Streamlined test cases. mysql-test/t/func_test.test: Streamlined test cases. mysql-test/t/select.test: Streamlined test cases. mysql-test/t/sp.test: Streamlined test cases. mysql-test/t/strict.test: Streamlined test cases. mysql-test/t/type_newdecimal.test: Streamlined test cases. sql/item_create.cc: Changed Item_func_cot() to be defined as a standalone Item rather than a combination of "1 / TAN(x)". sql/item_func.cc: Throw an 'out of range' error rather than returning an incorrect value or NULL, when the result of a numeric operator or a function is out of supported range for the corresponding data type. sql/item_func.h: Added validation helpers as inline methods of Item_func. sql/share/errmsg-utf8.txt: New ER_DATA_OUT_OF_RANGE error.
16 years ago
Merge mysql.com:/home/my/mysql-4.1 into mysql.com:/home/my/mysql-5.0 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-ctype_cp932.test: Auto merged BitKeeper/deleted/.del-isam.test~834fb0ee8196c445: Auto merged include/thr_lock.h: Auto merged mysql-test/t/alias.test: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/archive.test: Auto merged mysql-test/t/backup.test: Auto merged mysql-test/t/bool.test: Auto merged mysql-test/t/connect.test: Auto merged mysql-test/t/count_distinct2.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/ctype_many.test: Auto merged mysql-test/t/ctype_ucs_binlog.test: Auto merged mysql-test/t/date_formats.test: Auto merged mysql-test/t/delayed.test: Auto merged mysql-test/t/derived.test: Auto merged mysql-test/t/distinct.test: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/endspace.test: Auto merged mysql-test/t/flush.test: Auto merged mysql-test/t/fulltext.test: Auto merged mysql-test/t/fulltext_order_by.test: Auto merged mysql-test/t/func_compress.test: Auto merged mysql-test/t/func_concat.test: Auto merged mysql-test/t/func_date_add.test: Auto merged mysql-test/t/func_equal.test: Auto merged mysql-test/t/func_if.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_set.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/gis-rtree.test: Auto merged mysql-test/t/gis.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/grant2.test: Auto merged mysql-test/t/grant_cache.test: Auto merged mysql-test/t/heap.test: Auto merged mysql-test/t/heap_btree.test: Auto merged mysql-test/t/heap_hash.test: Auto merged mysql-test/t/init_connect.test: Auto merged mysql-test/t/insert_select.test: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/keywords.test: Auto merged mysql-test/t/limit.test: Auto merged mysql-test/t/lock.test: Auto merged mysql-test/t/lowercase_table.test: Auto merged mysql-test/t/lowercase_table3.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/mysqlbinlog2.test: Auto merged mysql-test/t/ndb_alter_table.test: Auto merged mysql-test/t/ndb_autodiscover.test: Auto merged mysql-test/t/ndb_charset.test: Auto merged mysql-test/t/ndb_grant.later: Auto merged mysql-test/t/ndb_index_ordered.test: Auto merged mysql-test/t/ndb_index_unique.test: Auto merged mysql-test/t/ndb_restore.test: Auto merged mysql-test/t/ndb_types.test: Auto merged mysql-test/t/ndb_update.test: Auto merged mysql-test/t/null.test: Auto merged mysql-test/t/null_key.test: Auto merged mysql-test/t/olap.test: Auto merged mysql-test/t/openssl_1.test: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/ps_4heap.test: Auto merged mysql-test/t/ps_5merge.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/replace.test: Auto merged mysql-test/t/row.test: Auto merged mysql-test/t/rpl000001.test: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl000017.test: Auto merged mysql-test/t/rpl000018.test: Auto merged mysql-test/t/rpl_EE_error.test: Auto merged mysql-test/t/rpl_change_master.test: Auto merged mysql-test/t/rpl_charset.test: Auto merged mysql-test/t/rpl_create_database.test: Auto merged mysql-test/t/rpl_ddl.test: Auto merged mysql-test/t/rpl_deadlock.test: Auto merged mysql-test/t/rpl_empty_master_crash.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_flush_log_loop.test: Auto merged mysql-test/t/rpl_flush_tables.test: Auto merged mysql-test/t/rpl_get_lock.test: Auto merged mysql-test/t/rpl_heap.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_rule_m.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_multi_query.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_redirect.test: Auto merged mysql-test/t/rpl_relayrotate.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/rpl_reset_slave.test: Auto merged mysql-test/t/rpl_server_id2.test: Auto merged mysql-test/t/rpl_temporary.test: Auto merged mysql-test/t/rpl_timezone.test: Auto merged mysql-test/t/rpl_user_variables.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/symlink.test: Auto merged mysql-test/t/synchronization.test: Auto merged mysql-test/t/system_mysql_db.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged mysql-test/t/temp_table.test: Auto merged mysql-test/t/timezone2.test: Auto merged mysql-test/t/timezone_grant.test: Auto merged mysql-test/t/type_float.test: Auto merged mysql-test/t/type_ranges.test: Auto merged mysql-test/t/type_timestamp.test: Auto merged mysql-test/t/union.test: Auto merged mysql-test/t/update.test: Auto merged mysql-test/t/user_var-binlog.test: Auto merged mysql-test/t/warnings.test: Auto merged mysys/thr_lock.c: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_select.cc: Auto merged support-files/mysql.spec.sh: Auto merged BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8: Simple merge mysql-test/r/ps_grant.result: Simple merge mysql-test/t/analyse.test: Simple merge mysql-test/t/auto_increment.test: Simple merge mysql-test/t/bdb.test: Simple merge mysql-test/t/bigint.test: Simple merge mysql-test/t/case.test: Simple merge mysql-test/t/cast.test: Simple merge mysql-test/t/check.test: Simple merge mysql-test/t/count_distinct.test: Simple merge mysql-test/t/ctype_latin1_de.test: Simple merge mysql-test/t/ctype_uca.test: Simple merge mysql-test/t/ctype_ucs.test: Simple merge mysql-test/t/ctype_utf8.test: Simple merge mysql-test/t/delete.test: Simple merge mysql-test/t/flush_block_commit.test: Simple merge mysql-test/t/func_default.test: Simple merge mysql-test/t/func_gconcat.test: Simple merge mysql-test/t/func_group.test: Aligned code with 4.1 mysql-test/t/func_in.test: Simple merge mysql-test/t/func_math.test: Simple merge mysql-test/t/func_misc.test: Simple merge mysql-test/t/func_test.test: Simple merge mysql-test/t/func_time.test: Simple merge mysql-test/t/group_by.test: Simple merge mysql-test/t/having.test: Simple merge mysql-test/t/innodb.test: Simple merge mysql-test/t/insert.test: Simple merge mysql-test/t/join_outer.test: Simple merge mysql-test/t/kill.test: Simple merge mysql-test/t/loaddata.test: Simple merge mysql-test/t/lock_multi.test: Simple merge mysql-test/t/multi_update.test: Simple merge mysql-test/t/mysqlbinlog.test: Simple merge mysql-test/t/mysqldump.test: Aligned code with 4.1 mysql-test/t/mysqltest.test: Simple merge mysql-test/t/ndb_basic.test: Simple merge mysql-test/t/ndb_cache.test: Simple merge mysql-test/t/ndb_subquery.test: Simple merge mysql-test/t/ps_grant.test: Simple merge mysql-test/t/range.test: Simple merge mysql-test/t/rpl_drop_temp.test: Simple merge mysql-test/t/rpl_loaddata_rule_s.test: Simple merge mysql-test/t/rpl_loaddatalocal.test: Simple merge mysql-test/t/rpl_rotate_logs.test: Simple merge mysql-test/t/rpl_until.test: Simple merge mysql-test/t/rpl_variables.test: Simple merge mysql-test/t/select.test: Simple merge mysql-test/t/sql_mode.test: Simple merge mysql-test/t/type_blob.test: Simple merge mysql-test/t/type_decimal.test: Simple merge mysql-test/t/user_var.test: Simple merge mysql-test/t/variables.test: Simple merge sql/lock.cc: Simple optimization sql/mysql_priv.h: Simple merge sql/sql_table.cc: Simple merge sql/table.cc: Simple merge sql/unireg.cc: Simple merge
21 years ago
Merge mysql.com:/home/my/mysql-4.1 into mysql.com:/home/my/mysql-5.0 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-ctype_cp932.test: Auto merged BitKeeper/deleted/.del-isam.test~834fb0ee8196c445: Auto merged include/thr_lock.h: Auto merged mysql-test/t/alias.test: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/archive.test: Auto merged mysql-test/t/backup.test: Auto merged mysql-test/t/bool.test: Auto merged mysql-test/t/connect.test: Auto merged mysql-test/t/count_distinct2.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/ctype_many.test: Auto merged mysql-test/t/ctype_ucs_binlog.test: Auto merged mysql-test/t/date_formats.test: Auto merged mysql-test/t/delayed.test: Auto merged mysql-test/t/derived.test: Auto merged mysql-test/t/distinct.test: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/endspace.test: Auto merged mysql-test/t/flush.test: Auto merged mysql-test/t/fulltext.test: Auto merged mysql-test/t/fulltext_order_by.test: Auto merged mysql-test/t/func_compress.test: Auto merged mysql-test/t/func_concat.test: Auto merged mysql-test/t/func_date_add.test: Auto merged mysql-test/t/func_equal.test: Auto merged mysql-test/t/func_if.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_set.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/gis-rtree.test: Auto merged mysql-test/t/gis.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/grant2.test: Auto merged mysql-test/t/grant_cache.test: Auto merged mysql-test/t/heap.test: Auto merged mysql-test/t/heap_btree.test: Auto merged mysql-test/t/heap_hash.test: Auto merged mysql-test/t/init_connect.test: Auto merged mysql-test/t/insert_select.test: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/keywords.test: Auto merged mysql-test/t/limit.test: Auto merged mysql-test/t/lock.test: Auto merged mysql-test/t/lowercase_table.test: Auto merged mysql-test/t/lowercase_table3.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/mysqlbinlog2.test: Auto merged mysql-test/t/ndb_alter_table.test: Auto merged mysql-test/t/ndb_autodiscover.test: Auto merged mysql-test/t/ndb_charset.test: Auto merged mysql-test/t/ndb_grant.later: Auto merged mysql-test/t/ndb_index_ordered.test: Auto merged mysql-test/t/ndb_index_unique.test: Auto merged mysql-test/t/ndb_restore.test: Auto merged mysql-test/t/ndb_types.test: Auto merged mysql-test/t/ndb_update.test: Auto merged mysql-test/t/null.test: Auto merged mysql-test/t/null_key.test: Auto merged mysql-test/t/olap.test: Auto merged mysql-test/t/openssl_1.test: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/ps_4heap.test: Auto merged mysql-test/t/ps_5merge.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/replace.test: Auto merged mysql-test/t/row.test: Auto merged mysql-test/t/rpl000001.test: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl000017.test: Auto merged mysql-test/t/rpl000018.test: Auto merged mysql-test/t/rpl_EE_error.test: Auto merged mysql-test/t/rpl_change_master.test: Auto merged mysql-test/t/rpl_charset.test: Auto merged mysql-test/t/rpl_create_database.test: Auto merged mysql-test/t/rpl_ddl.test: Auto merged mysql-test/t/rpl_deadlock.test: Auto merged mysql-test/t/rpl_empty_master_crash.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_flush_log_loop.test: Auto merged mysql-test/t/rpl_flush_tables.test: Auto merged mysql-test/t/rpl_get_lock.test: Auto merged mysql-test/t/rpl_heap.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_rule_m.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_multi_query.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_redirect.test: Auto merged mysql-test/t/rpl_relayrotate.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/rpl_reset_slave.test: Auto merged mysql-test/t/rpl_server_id2.test: Auto merged mysql-test/t/rpl_temporary.test: Auto merged mysql-test/t/rpl_timezone.test: Auto merged mysql-test/t/rpl_user_variables.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/symlink.test: Auto merged mysql-test/t/synchronization.test: Auto merged mysql-test/t/system_mysql_db.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged mysql-test/t/temp_table.test: Auto merged mysql-test/t/timezone2.test: Auto merged mysql-test/t/timezone_grant.test: Auto merged mysql-test/t/type_float.test: Auto merged mysql-test/t/type_ranges.test: Auto merged mysql-test/t/type_timestamp.test: Auto merged mysql-test/t/union.test: Auto merged mysql-test/t/update.test: Auto merged mysql-test/t/user_var-binlog.test: Auto merged mysql-test/t/warnings.test: Auto merged mysys/thr_lock.c: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_select.cc: Auto merged support-files/mysql.spec.sh: Auto merged BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8: Simple merge mysql-test/r/ps_grant.result: Simple merge mysql-test/t/analyse.test: Simple merge mysql-test/t/auto_increment.test: Simple merge mysql-test/t/bdb.test: Simple merge mysql-test/t/bigint.test: Simple merge mysql-test/t/case.test: Simple merge mysql-test/t/cast.test: Simple merge mysql-test/t/check.test: Simple merge mysql-test/t/count_distinct.test: Simple merge mysql-test/t/ctype_latin1_de.test: Simple merge mysql-test/t/ctype_uca.test: Simple merge mysql-test/t/ctype_ucs.test: Simple merge mysql-test/t/ctype_utf8.test: Simple merge mysql-test/t/delete.test: Simple merge mysql-test/t/flush_block_commit.test: Simple merge mysql-test/t/func_default.test: Simple merge mysql-test/t/func_gconcat.test: Simple merge mysql-test/t/func_group.test: Aligned code with 4.1 mysql-test/t/func_in.test: Simple merge mysql-test/t/func_math.test: Simple merge mysql-test/t/func_misc.test: Simple merge mysql-test/t/func_test.test: Simple merge mysql-test/t/func_time.test: Simple merge mysql-test/t/group_by.test: Simple merge mysql-test/t/having.test: Simple merge mysql-test/t/innodb.test: Simple merge mysql-test/t/insert.test: Simple merge mysql-test/t/join_outer.test: Simple merge mysql-test/t/kill.test: Simple merge mysql-test/t/loaddata.test: Simple merge mysql-test/t/lock_multi.test: Simple merge mysql-test/t/multi_update.test: Simple merge mysql-test/t/mysqlbinlog.test: Simple merge mysql-test/t/mysqldump.test: Aligned code with 4.1 mysql-test/t/mysqltest.test: Simple merge mysql-test/t/ndb_basic.test: Simple merge mysql-test/t/ndb_cache.test: Simple merge mysql-test/t/ndb_subquery.test: Simple merge mysql-test/t/ps_grant.test: Simple merge mysql-test/t/range.test: Simple merge mysql-test/t/rpl_drop_temp.test: Simple merge mysql-test/t/rpl_loaddata_rule_s.test: Simple merge mysql-test/t/rpl_loaddatalocal.test: Simple merge mysql-test/t/rpl_rotate_logs.test: Simple merge mysql-test/t/rpl_until.test: Simple merge mysql-test/t/rpl_variables.test: Simple merge mysql-test/t/select.test: Simple merge mysql-test/t/sql_mode.test: Simple merge mysql-test/t/type_blob.test: Simple merge mysql-test/t/type_decimal.test: Simple merge mysql-test/t/user_var.test: Simple merge mysql-test/t/variables.test: Simple merge sql/lock.cc: Simple optimization sql/mysql_priv.h: Simple merge sql/sql_table.cc: Simple merge sql/table.cc: Simple merge sql/unireg.cc: Simple merge
21 years ago
18 years ago
Bug #54461: crash with longblob and union or update with subquery Queries may crash, if 1) the GREATEST or the LEAST function has a mixed list of numeric and LONGBLOB arguments and 2) the result of such a function goes through an intermediate temporary table. An Item that references a LONGBLOB field has max_length of UINT_MAX32 == (2^32 - 1). The current implementation of GREATEST/LEAST returns REAL result for a mixed list of numeric and string arguments (that contradicts with the current documentation, this contradiction was discussed and it was decided to update the documentation). The max_length of such a function call was calculated as a maximum of argument max_length values (i.e. UINT_MAX32). That max_length value of UINT_MAX32 was used as a length for the intermediate temporary table Field_double to hold GREATEST/LEAST function result. The Field_double::val_str() method call on that field allocates a String value. Since an allocation of String reserves an additional byte for a zero-termination, the size of String buffer was set to (UINT_MAX32 + 1), that caused an integer overflow: actually, an empty buffer of size 0 was allocated. An initialization of the "first" byte of that zero-size buffer with '\0' caused a crash. The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. ****** Bug #54461: crash with longblob and union or update with subquery Queries may crash, if 1) the GREATEST or the LEAST function has a mixed list of numeric and LONGBLOB arguments and 2) the result of such a function goes through an intermediate temporary table. An Item that references a LONGBLOB field has max_length of UINT_MAX32 == (2^32 - 1). The current implementation of GREATEST/LEAST returns REAL result for a mixed list of numeric and string arguments (that contradicts with the current documentation, this contradiction was discussed and it was decided to update the documentation). The max_length of such a function call was calculated as a maximum of argument max_length values (i.e. UINT_MAX32). That max_length value of UINT_MAX32 was used as a length for the intermediate temporary table Field_double to hold GREATEST/LEAST function result. The Field_double::val_str() method call on that field allocates a String value. Since an allocation of String reserves an additional byte for a zero-termination, the size of String buffer was set to (UINT_MAX32 + 1), that caused an integer overflow: actually, an empty buffer of size 0 was allocated. An initialization of the "first" byte of that zero-size buffer with '\0' caused a crash. The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. mysql-test/r/func_misc.result: Test case for bug #54461. ****** Test case for bug #54461. mysql-test/t/func_misc.test: Test case for bug #54461. ****** Test case for bug #54461. sql/item_func.cc: Bug #54461: crash with longblob and union or update with subquery The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. ****** Bug #54461: crash with longblob and union or update with subquery The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators.
16 years ago
16 years ago
16 years ago
Bug #54461: crash with longblob and union or update with subquery Queries may crash, if 1) the GREATEST or the LEAST function has a mixed list of numeric and LONGBLOB arguments and 2) the result of such a function goes through an intermediate temporary table. An Item that references a LONGBLOB field has max_length of UINT_MAX32 == (2^32 - 1). The current implementation of GREATEST/LEAST returns REAL result for a mixed list of numeric and string arguments (that contradicts with the current documentation, this contradiction was discussed and it was decided to update the documentation). The max_length of such a function call was calculated as a maximum of argument max_length values (i.e. UINT_MAX32). That max_length value of UINT_MAX32 was used as a length for the intermediate temporary table Field_double to hold GREATEST/LEAST function result. The Field_double::val_str() method call on that field allocates a String value. Since an allocation of String reserves an additional byte for a zero-termination, the size of String buffer was set to (UINT_MAX32 + 1), that caused an integer overflow: actually, an empty buffer of size 0 was allocated. An initialization of the "first" byte of that zero-size buffer with '\0' caused a crash. The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. ****** Bug #54461: crash with longblob and union or update with subquery Queries may crash, if 1) the GREATEST or the LEAST function has a mixed list of numeric and LONGBLOB arguments and 2) the result of such a function goes through an intermediate temporary table. An Item that references a LONGBLOB field has max_length of UINT_MAX32 == (2^32 - 1). The current implementation of GREATEST/LEAST returns REAL result for a mixed list of numeric and string arguments (that contradicts with the current documentation, this contradiction was discussed and it was decided to update the documentation). The max_length of such a function call was calculated as a maximum of argument max_length values (i.e. UINT_MAX32). That max_length value of UINT_MAX32 was used as a length for the intermediate temporary table Field_double to hold GREATEST/LEAST function result. The Field_double::val_str() method call on that field allocates a String value. Since an allocation of String reserves an additional byte for a zero-termination, the size of String buffer was set to (UINT_MAX32 + 1), that caused an integer overflow: actually, an empty buffer of size 0 was allocated. An initialization of the "first" byte of that zero-size buffer with '\0' caused a crash. The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. mysql-test/r/func_misc.result: Test case for bug #54461. ****** Test case for bug #54461. mysql-test/t/func_misc.test: Test case for bug #54461. ****** Test case for bug #54461. sql/item_func.cc: Bug #54461: crash with longblob and union or update with subquery The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators. ****** Bug #54461: crash with longblob and union or update with subquery The Item_func_min_max::fix_length_and_dec() has been modified to calculate max_length for the REAL result like we do it for arithmetical operators.
16 years ago
15 years ago
15 years ago
  1. #
  2. # Testing of misc functions
  3. #
  4. --disable_warnings
  5. DROP TABLE IF EXISTS t1, t2;
  6. --enable_warnings
  7. select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
  8. select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"));
  9. select inet_aton("255.255.255.255.255"),inet_aton("255.255.1.255"),inet_aton("0.1.255");
  10. select inet_ntoa(1099511627775),inet_ntoa(4294902271),inet_ntoa(511);
  11. select hex(inet_aton('127'));
  12. select hex(inet_aton('127.1'));
  13. select hex(inet_aton('127.1.1'));
  14. select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
  15. # As we can assume we are the only user for the mysqld server, the difference
  16. # between two calls should be -1
  17. set @a= uuid_short();
  18. set @b= uuid_short();
  19. select @b - @a;
  20. #
  21. # Test for core dump with nan
  22. #
  23. select length(format('nan', 2)) > 0;
  24. #
  25. # Test for bug #628
  26. #
  27. select concat("$",format(2500,2));
  28. # Test for BUG#7716
  29. create table t1 ( a timestamp );
  30. insert into t1 values ( '2004-01-06 12:34' );
  31. select a from t1 where left(a+0,6) in ( left(20040106,6) );
  32. select a from t1 where left(a+0,6) = ( left(20040106,6) );
  33. select a from t1 where right(a+0,6) in ( right(20040106123400,6) );
  34. select a from t1 where right(a+0,6) = ( right(20040106123400,6) );
  35. select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) );
  36. select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
  37. drop table t1;
  38. #
  39. # Bug#16501: IS_USED_LOCK does not appear to work
  40. #
  41. CREATE TABLE t1 (conn CHAR(7), connection_id INT);
  42. INSERT INTO t1 VALUES ('default', CONNECTION_ID());
  43. SELECT GET_LOCK('bug16501',600);
  44. connect (con1,localhost,root,,);
  45. INSERT INTO t1 VALUES ('con1', CONNECTION_ID());
  46. SELECT IS_USED_LOCK('bug16501') = connection_id
  47. FROM t1
  48. WHERE conn = 'default';
  49. send SELECT GET_LOCK('bug16501',600);
  50. connection default;
  51. SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
  52. SELECT RELEASE_LOCK('bug16501');
  53. connection con1;
  54. reap;
  55. connection default;
  56. SELECT IS_USED_LOCK('bug16501') = connection_id
  57. FROM t1
  58. WHERE conn = 'con1';
  59. connection con1;
  60. SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
  61. SELECT RELEASE_LOCK('bug16501');
  62. SELECT IS_USED_LOCK('bug16501');
  63. disconnect con1;
  64. connection default;
  65. DROP TABLE t1;
  66. #
  67. # Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
  68. #
  69. select export_set(3, _latin1'foo', _utf8'bar', ',', 4);
  70. --echo End of 4.1 tests
  71. #
  72. # Test for BUG#9535
  73. #
  74. --disable_warnings
  75. create table t1 as select uuid(), length(uuid());
  76. --enable_warnings
  77. show create table t1;
  78. drop table t1;
  79. #
  80. # Bug #21466: INET_ATON() returns signed, not unsigned
  81. #
  82. create table t1 select INET_ATON('255.255.0.1') as `a`;
  83. show create table t1;
  84. drop table t1;
  85. #
  86. # Bug#26093 (SELECT BENCHMARK() for SELECT statements does not produce
  87. # valid results)
  88. #
  89. --disable_warnings
  90. drop table if exists table_26093;
  91. drop function if exists func_26093_a;
  92. drop function if exists func_26093_b;
  93. --enable_warnings
  94. create table table_26093(a int);
  95. insert into table_26093 values
  96. (1), (2), (3), (4), (5),
  97. (6), (7), (8), (9), (10);
  98. delimiter //;
  99. create function func_26093_a(x int) returns int
  100. begin
  101. set @invoked := @invoked + 1;
  102. return x;
  103. end//
  104. create function func_26093_b(x int, y int) returns int
  105. begin
  106. set @invoked := @invoked + 1;
  107. return x;
  108. end//
  109. delimiter ;//
  110. select avg(a) from table_26093;
  111. select benchmark(100, (select avg(a) from table_26093));
  112. set @invoked := 0;
  113. select benchmark(100, (select avg(func_26093_a(a)) from table_26093));
  114. # Returns only 10, since intermediate results are cached.
  115. select @invoked;
  116. set @invoked := 0;
  117. select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093));
  118. # Returns 1000, due to rand() preventing caching.
  119. select @invoked;
  120. --error ER_SUBQUERY_NO_1_ROW
  121. select benchmark(100, (select (a) from table_26093));
  122. --error ER_OPERAND_COLUMNS
  123. select benchmark(100, (select 1, 1));
  124. drop table table_26093;
  125. drop function func_26093_a;
  126. drop function func_26093_b;
  127. #
  128. # Bug #30832: Assertion + crash with select name_const('test',now());
  129. #
  130. --error ER_WRONG_ARGUMENTS
  131. SELECT NAME_CONST('test', NOW());
  132. --error ER_WRONG_ARGUMENTS
  133. SELECT NAME_CONST('test', UPPER('test'));
  134. SELECT NAME_CONST('test', NULL);
  135. SELECT NAME_CONST('test', 1);
  136. SELECT NAME_CONST('test', -1);
  137. SELECT NAME_CONST('test', 1.0);
  138. SELECT NAME_CONST('test', -1.0);
  139. SELECT NAME_CONST('test', 'test');
  140. #
  141. # Bug #34749: Server crash when using NAME_CONST() with an aggregate function
  142. #
  143. CREATE TABLE t1 (a INT);
  144. INSERT INTO t1 VALUES (1),(2),(3);
  145. # NAME_CONST() + aggregate.
  146. SELECT NAME_CONST('flag',1) * MAX(a) FROM t1;
  147. SELECT NAME_CONST('flag',1.5) * MAX(a) FROM t1;
  148. # Now, wrap the INT_ITEM in Item_func_neg and watch the pretty explosions
  149. SELECT NAME_CONST('flag',-1) * MAX(a) FROM t1;
  150. SELECT NAME_CONST('flag',-1.5) * MAX(a) FROM t1;
  151. --error ER_WRONG_ARGUMENTS
  152. SELECT NAME_CONST('flag', SQRT(4)) * MAX(a) FROM t1;
  153. --error ER_WRONG_ARGUMENTS
  154. SELECT NAME_CONST('flag',-SQRT(4)) * MAX(a) FROM t1;
  155. DROP TABLE t1;
  156. #
  157. # Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter
  158. # resolved against a column name of a derived table hangs the client
  159. #
  160. CREATE TABLE t1 (a int);
  161. INSERT INTO t1 VALUES (5), (2);
  162. --error ER_WRONG_ARGUMENTS
  163. SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t;
  164. DROP TABLE t1;
  165. #
  166. # Bug #32559: connection hangs on query with name_const
  167. #
  168. CREATE TABLE t1(a INT);
  169. INSERT INTO t1 VALUES (), (), ();
  170. --error ER_WRONG_ARGUMENTS
  171. SELECT NAME_CONST(a, '1') FROM t1;
  172. --error ER_WRONG_ARGUMENTS
  173. SET INSERT_ID= NAME_CONST(a, a);
  174. DROP TABLE t1;
  175. #
  176. # Bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
  177. #
  178. create table t1 (a int not null);
  179. insert into t1 values (-1), (-2);
  180. select min(a) from t1 group by inet_ntoa(a);
  181. drop table t1;
  182. #
  183. # BUG#34289 - Incorrect NAME_CONST substitution in stored procedures breaks
  184. # replication
  185. #
  186. SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
  187. #
  188. # Bug #35848: UUID() returns UUIDs with the wrong time
  189. #
  190. select @@session.time_zone into @save_tz;
  191. # make sure all times are UTC so the DayNr won't differ
  192. set @@session.time_zone='UTC';
  193. select uuid() into @my_uuid;
  194. # if version nibble isn't 1, the following calculations will be rubbish
  195. select mid(@my_uuid,15,1);
  196. select 24 * 60 * 60 * 1000 * 1000 * 10 into @my_uuid_one_day;
  197. select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate;
  198. select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date;
  199. select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic;
  200. # these should be identical; date part of UUID should be current date
  201. select @my_uuid_date - @my_uuid_synthetic;
  202. set @@session.time_zone=@save_tz;
  203. #
  204. # Bug#42014: Crash, name_const with collate
  205. #
  206. CREATE TABLE t1 (a DATE);
  207. SELECT * FROM t1 WHERE a = NAME_CONST('reportDate',
  208. _binary'2009-01-09' COLLATE 'binary');
  209. DROP TABLE t1;
  210. #
  211. # Bug#35515: Aliases of variables in binary log are ignored with NAME_CONST
  212. #
  213. select NAME_CONST('_id',1234) as id;
  214. --echo End of 5.0 tests
  215. #
  216. # Bug #30389: connection_id() always return 0 in embedded server
  217. #
  218. select connection_id() > 0;
  219. --echo #
  220. --echo # Bug #54461: crash with longblob and union or update with subquery
  221. --echo #
  222. CREATE TABLE t1 (a INT, b LONGBLOB);
  223. INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
  224. SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
  225. SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
  226. DROP TABLE t1;
  227. #
  228. # Bug #57283: inet_ntoa() crashes
  229. #
  230. SELECT INET_NTOA(0);
  231. SELECT '1' IN ('1', INET_NTOA(0));
  232. --echo #
  233. --echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465
  234. --echo #
  235. CREATE TABLE t1 (a SET('a'), b INT);
  236. INSERT INTO t1 VALUES ('', 0);
  237. SELECT COALESCE(a) = COALESCE(b) FROM t1;
  238. DROP TABLE t1;
  239. --echo #
  240. --echo # Bug #54461: crash with longblob and union or update with subquery
  241. --echo #
  242. CREATE TABLE t1 (a INT, b LONGBLOB);
  243. INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
  244. SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
  245. SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
  246. DROP TABLE t1;
  247. #
  248. # Bug #57283: inet_ntoa() crashes
  249. #
  250. SELECT INET_NTOA(0);
  251. SELECT '1' IN ('1', INET_NTOA(0));
  252. --echo #
  253. --echo # End of 5.1 tests
  254. --echo #
  255. --echo #
  256. --echo # Bug #58199: name_const in the having clause crashes
  257. --echo #
  258. CREATE TABLE t1 (a INT);
  259. # NAME_CONST() would seg.fault when used wrongly in a HAVING clause
  260. --error ER_WRONG_ARGUMENTS
  261. SELECT 1 from t1 HAVING NAME_CONST('', a);
  262. DROP TABLE t1;
  263. --echo #
  264. --echo # Test or correct maybe_null of last_value
  265. --echo #
  266. CREATE TABLE t1 (a char(2) not null );
  267. INSERT INTO t1 VALUES (4),(7),(1);
  268. set @optimizer_switch_save= @@optimizer_switch;
  269. set optimizer_switch='materialization=off';
  270. CREATE TABLE tv (e char(2) not null ) engine=mysql;
  271. INSERT INTO tv VALUES (1);
  272. CREATE ALGORITHM=MERGE VIEW v_merge AS SELECT * FROM tv;
  273. CREATE ALGORITHM=MERGE VIEW vm AS SELECT * FROM tv;
  274. explain extended
  275. select a from t1 left join v_merge on (a=e) where last_value(NULL,e) not in (select last_value(NULL,e) from vm);
  276. explain extended
  277. select a from t1 left join v_merge on (a=e) where e not in (select last_value(NULL,e) from vm);
  278. set optimizer_switch=@optimizer_switch_save;
  279. drop view v_merge, vm;
  280. drop table t1,tv;
  281. --echo #
  282. --echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
  283. --echo #
  284. --echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
  285. --echo # Note: IS_USED_LOCK returns NULL if the lock is unused
  286. select is_used_lock('test');
  287. select is_free_lock('test');
  288. --echo # GET_LOCK returns 1 if it manages to acquire a lock
  289. select get_lock('test', 0);
  290. --echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is acquired
  291. select is_free_lock('test');
  292. select is_used_lock('test') = connection_id();
  293. connect (con1,localhost,root,,);
  294. --echo # -> Switching to connection 'con1'
  295. connection con1;
  296. --echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is acquired in another
  297. --echo # connection
  298. select is_used_lock('test') = connection_id();
  299. select is_free_lock('test');
  300. --echo # GET_LOCK returns 0 if it can't acquire a lock (wait timeout)
  301. select get_lock('test', 0);
  302. --echo # RELEASE_LOCK returns 0 if the lock belongs to another connection
  303. select release_lock('test');
  304. --echo # -> Switching to connection 'default'
  305. connection default;
  306. --echo # RELEASE_LOCK returns 1 if it successfully releases a lock
  307. select release_lock('test');
  308. --echo # RELEASE_LOCK returns NULL if it doesn't release a lock and there is no such lock
  309. select release_lock('test');
  310. --echo # Test that get_lock() returns NULL if error.
  311. select get_lock('test', 0);
  312. --echo # -> Switching to connection 'con1'
  313. connection con1;
  314. create table t1 select connection_id() as id;
  315. send select get_lock('test', 7200);
  316. --echo # -> Switching to connection 'default'
  317. connection default;
  318. let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE info LIKE 'select%' AND state='User lock';
  319. source include/wait_condition.inc;
  320. select (@id := id) - id from t1;
  321. kill query @id;
  322. --echo # -> Switching to connection 'con1'
  323. connection con1;
  324. reap;
  325. --echo # -> Switching to connection 'default'
  326. connection default;
  327. --echo # GET_LOCK() works recursively
  328. select get_lock('test', 0);
  329. select get_lock('test', 0);
  330. select get_lock('test', 0);
  331. --echo # RELEASE_LOCK() needs to be called recursively then, too
  332. select release_lock('test');
  333. select release_lock('test');
  334. select release_lock('test');
  335. --echo # Once the last instance of the lock is released,
  336. --echo # the next call returns NULL
  337. select release_lock('test');
  338. --echo # Multiple locks in the same session are OK
  339. select get_lock('test1', 0);
  340. select get_lock('test2', 0);
  341. select get_lock('test3', 0);
  342. select release_lock('test1');
  343. select release_lock('test2');
  344. select release_lock('test3');
  345. --echo # Deadlocks are detected e.g. in case of a mutual wait
  346. select get_lock('test1', 0);
  347. --echo # -> Switching to connection 'con1'
  348. connection con1;
  349. select get_lock('test2', 0);
  350. send select get_lock('test1', 7200);
  351. --echo # -> Switching to connection 'default'
  352. connection default;
  353. let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE info LIKE 'select%' AND state='User lock';
  354. source include/wait_condition.inc;
  355. --error ER_LOCK_DEADLOCK
  356. select get_lock('test2', 7200);
  357. select release_lock('test1');
  358. --echo # -> Switching to connection 'con1'
  359. connection con1;
  360. reap;
  361. select release_lock('test2');
  362. select release_lock('test1');
  363. --echo # -> Switching to connection 'default'
  364. connection default;
  365. --echo # LOCK/UNLOCK TABLES works fine with a user lock.
  366. lock table t1 write;
  367. select get_lock('test', 0);
  368. unlock tables;
  369. commit;
  370. select release_lock('test');
  371. --echo # GLOBAL READ LOCK works with fine with user locks
  372. select get_lock('test1', 0);
  373. flush tables with read lock;
  374. select get_lock('test2', 0);
  375. unlock tables;
  376. commit;
  377. select release_lock('test1');
  378. select release_lock('test2');
  379. --echo # BEGIN/COMMIT/ROLLBACK don't unlock user locks.
  380. begin;
  381. select get_lock('test1', 0);
  382. select get_lock('test2', 0);
  383. select count(*) from t1;
  384. rollback;
  385. select release_lock('test1');
  386. select release_lock('test2');
  387. --echo # Deadlocks between user locks and LOCK TABLES locks
  388. --echo # are detected OK.
  389. select get_lock('test', 0);
  390. --echo # -> Switching to connection 'con1'
  391. connection con1;
  392. lock table t1 write;
  393. send select get_lock('test', 7200);
  394. --echo # -> Switching to connection 'default'
  395. connection default;
  396. let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE info LIKE 'select%' AND state = 'User lock';
  397. source include/wait_condition.inc;
  398. --error ER_LOCK_DEADLOCK
  399. lock table t1 read;
  400. select release_lock('test');
  401. --echo # -> Switching to connection 'con1'
  402. connection con1;
  403. reap;
  404. select release_lock('test');
  405. unlock tables;
  406. --echo # cleanup
  407. disconnect con1;
  408. connection default;
  409. drop table t1;
  410. --echo # check too long identifier names
  411. select get_lock(repeat('a', 192), 0);
  412. select is_used_lock(repeat('a', 192)) = connection_id();
  413. select is_free_lock(repeat('a', 192));
  414. select release_lock(repeat('a', 192));
  415. --error ER_TOO_LONG_IDENT
  416. select get_lock(repeat('a', 193), 0);
  417. --error ER_TOO_LONG_IDENT
  418. select is_used_lock(repeat('a', 193));
  419. --error ER_TOO_LONG_IDENT
  420. select is_free_lock(repeat('a', 193));
  421. --error ER_TOO_LONG_IDENT
  422. select release_lock(repeat('a', 193));
  423. --echo #
  424. --echo # End of 5.5 tests
  425. --echo #
  426. --echo #
  427. --echo # End of tests
  428. --echo #