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.

2295 lines
118 KiB

Changed mysql-test to print warnings for not existing table to DROP TABLE Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print() BitKeeper/deleted/.del-rpl000016-slave.opt~ef76f85ddcc13b87: Delete: mysql-test/t/rpl000016-slave.opt BitKeeper/deleted/.del-sel000001.test~9567c1646058cc: Delete: mysql-test/t/sel000001.test BitKeeper/deleted/.del-sel000002.test~9f500639572e18e1: Delete: mysql-test/t/sel000002.test BitKeeper/deleted/.del-sel000003.test~63a5512d18cd20a2: Delete: mysql-test/t/sel000003.test BitKeeper/deleted/.del-sel000001.result~383913ae4505ec86: Delete: mysql-test/r/sel000001.result BitKeeper/deleted/.del-sel000002.result~d1787e6fd5dbc1cc: Delete: mysql-test/r/sel000002.result BitKeeper/deleted/.del-sel000003.result~d7b657b1e3a286a7: Delete: mysql-test/r/sel000003.result BitKeeper/deleted/.del-sel000031.result~d49aeac63ad7db4d: Delete: mysql-test/r/sel000031.result BitKeeper/deleted/.del-sel000031.test~50a19a8e204e99bc: Delete: mysql-test/t/sel000031.test BitKeeper/deleted/.del-sel000032.result~6cb30e23cbca9fb0: Delete: mysql-test/r/sel000032.result BitKeeper/deleted/.del-sel000032.test~e32da7c3fc4b7ace: Delete: mysql-test/t/sel000032.test BitKeeper/deleted/.del-rpl000003.result~68d6ee00beaa011: Delete: mysql-test/r/rpl000003.result BitKeeper/deleted/.del-rpl000003.test~b7cfc4c5576fbafd: Delete: mysql-test/t/rpl000003.test client/mysql.cc: Don't yet print information about SQL help client/mysqltest.c: Added test options: --enable_warnings --disable_warnings --enable_info --disable_info configure.in: changed version number of shared libraries mysql-test/include/master-slave.inc: Don't write warnings on init mysql-test/r/backup.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/bigint.result: Updated results mysql-test/r/bool.result: Updated results mysql-test/r/create.result: Updated results mysql-test/r/delete.result: Updated results mysql-test/r/derived.result: Updated results mysql-test/r/distinct.result: Updated results mysql-test/r/drop.result: Updated results mysql-test/r/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/fulltext_multi.result: Updated results mysql-test/r/fulltext_order_by.result: Updated results mysql-test/r/func_equal.result: Updated results mysql-test/r/func_in.result: Updated results mysql-test/r/func_set.result: Updated results mysql-test/r/gcc296.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/innodb-deadlock.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_cache.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/isam.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/multi_update.result: Updated results mysql-test/r/myisam.result: Updated results mysql-test/r/null.result: Updated results mysql-test/r/null_key.result: Updated results mysql-test/r/odbc.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/rename.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000002.result: Updated results mysql-test/r/rpl000004.result: Updated results mysql-test/r/rpl000005.result: Updated results mysql-test/r/rpl000006.result: Updated results mysql-test/r/rpl000008.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl000010.result: Updated results mysql-test/r/rpl000011.result: Updated results mysql-test/r/rpl000012.result: Updated results mysql-test/r/rpl000013.result: Updated results mysql-test/r/rpl_alter.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_redirect.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/rpl_skip_error.result: Updated results mysql-test/r/rpl_temporary.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/type_date.result: Updated results mysql-test/r/type_float.result: Updated results mysql-test/r/union.result: Updated results mysql-test/r/update.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/r/varbinary.result: Updated results mysql-test/r/variables.result: Updated results mysql-test/r/warnings.result: Updated results mysql-test/t/alias.test: Don't write warnings when initializing test mysql-test/t/alter_table.test: Don't write warnings when initializing test mysql-test/t/analyse.test: Don't write warnings when initializing test mysql-test/t/auto_increment.test: Don't write warnings when initializing test mysql-test/t/backup.test: Don't write warnings when initializing test mysql-test/t/bdb-alter-table-1.test: Don't write warnings when initializing test mysql-test/t/bdb-crash.test: Don't write warnings when initializing test mysql-test/t/bdb-deadlock.test: Don't write warnings when initializing test mysql-test/t/bdb.test: Don't write warnings when initializing test cleaned up test mysql-test/t/bdb_cache.test: Don't write warnings when initializing test mysql-test/t/bench_count_distinct.test: Don't write warnings when initializing test mysql-test/t/bigint.test: Don't write warnings when initializing test mysql-test/t/binary.test: Don't write warnings when initializing test mysql-test/t/bool.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/bulk_replace.test: Don't write warnings when initializing test mysql-test/t/case.test: Don't write warnings when initializing test mysql-test/t/check.test: Don't write warnings when initializing test mysql-test/t/compare.test: Don't write warnings when initializing test mysql-test/t/connect.test: Removed empty line mysql-test/t/constraints.test: Don't write warnings when initializing test mysql-test/t/count_distinct.test: Don't write warnings when initializing test mysql-test/t/count_distinct2.test: Don't write warnings when initializing test mysql-test/t/create.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/ctype_latin1_de.test: Don't write warnings when initializing test mysql-test/t/ctype_many.test: Don't write warnings when initializing test mysql-test/t/delayed.test: Don't write warnings when initializing test mysql-test/t/delete.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/derived.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/dirty_close.test: Don't write warnings when initializing test mysql-test/t/distinct.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/drop.test: Don't write warnings when initializing test mysql-test/t/empty_table.test: Don't write warnings when initializing test mysql-test/t/err000001.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/explain.test: Don't write warnings when initializing test mysql-test/t/flush.test: Don't write warnings when initializing test mysql-test/t/foreign_key.test: Don't write warnings when initializing test mysql-test/t/fulltext.test: Don't write warnings when initializing test mysql-test/t/fulltext_cache.test: Don't write warnings when initializing test mysql-test/t/fulltext_distinct.test: Don't write warnings when initializing test mysql-test/t/fulltext_left_join.test: Don't write warnings when initializing test mysql-test/t/fulltext_multi.test: Don't write warnings when initializing test mysql-test/t/fulltext_order_by.test: Don't write warnings when initializing test mysql-test/t/fulltext_update.test: Don't write warnings when initializing test mysql-test/t/func_concat.test: Don't write warnings when initializing test mysql-test/t/func_date_add.test: Don't write warnings when initializing test mysql-test/t/func_encrypt.test: Don't write warnings when initializing test mysql-test/t/func_equal.test: Don't write warnings when initializing test mysql-test/t/func_group.test: Don't write warnings when initializing test mysql-test/t/func_if.test: Don't write warnings when initializing test mysql-test/t/func_in.test: Don't write warnings when initializing test mysql-test/t/func_isnull.test: Don't write warnings when initializing test mysql-test/t/func_like.test: Don't write warnings when initializing test mysql-test/t/func_regexp.test: Don't write warnings when initializing test mysql-test/t/func_set.test: Don't write warnings when initializing test Merged test with other tests mysql-test/t/func_str.test: Don't write warnings when initializing test mysql-test/t/func_time.test: Don't write warnings when initializing test mysql-test/t/func_timestamp.test: Don't write warnings when initializing test mysql-test/t/gcc296.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/grant_cache.test: Don't write warnings when initializing test mysql-test/t/group_by.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/handler.test: Don't write warnings when initializing test mysql-test/t/having.test: Don't write warnings when initializing test mysql-test/t/heap.test: Don't write warnings when initializing test mysql-test/t/heap_auto_increment.test: Don't write warnings when initializing test mysql-test/t/heap_btree.test: Don't write warnings when initializing test mysql-test/t/heap_hash.test: Don't write warnings when initializing test mysql-test/t/innodb-deadlock.test: Don't write warnings when initializing test mysql-test/t/innodb.test: Don't write warnings when initializing test mysql-test/t/innodb_cache.test: Don't write warnings when initializing test mysql-test/t/innodb_handler.test: Don't write warnings when initializing test mysql-test/t/ins000001.test: Don't write warnings when initializing test mysql-test/t/insert.test: Don't write warnings when initializing test cleaned up test. Changed to use standard database and table names mysql-test/t/insert_select.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/insert_update.test: Don't write warnings when initializing test mysql-test/t/isam.test: Don't write warnings when initializing test cleaned up test mysql-test/t/join.test: Don't write warnings when initializing test mysql-test/t/join_crash.test: Don't write warnings when initializing test mysql-test/t/join_outer.test: Don't write warnings when initializing test mysql-test/t/key.test: Don't write warnings when initializing test mysql-test/t/key_diff.test: Don't write warnings when initializing test mysql-test/t/key_primary.test: Don't write warnings when initializing test mysql-test/t/keywords.test: Don't write warnings when initializing test mysql-test/t/kill.test: Don't write warnings when initializing test mysql-test/t/limit.test: Don't write warnings when initializing test mysql-test/t/lock.test: Don't write warnings when initializing test mysql-test/t/lock_multi.test: Don't write warnings when initializing test mysql-test/t/lowercase_table.test: Don't write warnings when initializing test mysql-test/t/merge.test: Don't write warnings when initializing test cleaned up test mysql-test/t/multi_update.test: Don't write warnings when initializing test mysql-test/t/myisam.test: Don't write warnings when initializing test mysql-test/t/null.test: Don't write warnings when initializing test mysql-test/t/null_key.test: Don't write warnings when initializing test mysql-test/t/odbc.test: Don't write warnings when initializing test mysql-test/t/olap.test: Don't write warnings when initializing test mysql-test/t/order_by.test: Don't write warnings when initializing test mysql-test/t/order_fill_sortbuf.test: Don't write warnings when initializing test mysql-test/t/query_cache.test: Don't write warnings when initializing test mysql-test/t/raid.test: Don't write warnings when initializing test mysql-test/t/range.test: Don't write warnings when initializing test mysql-test/t/rename.test: Don't write warnings when initializing test mysql-test/t/repair.test: Don't write warnings when initializing test mysql-test/t/replace.test: Don't write warnings when initializing test mysql-test/t/rollback.test: Don't write warnings when initializing test mysql-test/t/row.test: Don't write warnings when initializing test mysql-test/t/rpl000001.test: Don't write warnings when initializing test mysql-test/t/rpl000002.test: Don't write warnings when initializing test mysql-test/t/rpl000004.test: Don't write warnings when initializing test mysql-test/t/rpl000005.test: Don't write warnings when initializing test mysql-test/t/rpl000006.test: Don't write warnings when initializing test mysql-test/t/rpl000008-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000008.test: Don't write warnings when initializing test mysql-test/t/rpl000009-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000009.test: Don't write warnings when initializing test mysql-test/t/rpl000010.test: Don't write warnings when initializing test mysql-test/t/rpl000011.test: Don't write warnings when initializing test mysql-test/t/rpl000012.test: Don't write warnings when initializing test mysql-test/t/rpl000013.test: Don't write warnings when initializing test mysql-test/t/rpl000015.test: Don't write warnings when initializing test mysql-test/t/rpl000017.test: Don't write warnings when initializing test mysql-test/t/rpl000018.test: Don't write warnings when initializing test mysql-test/t/rpl_alter.test: Don't write warnings when initializing test mysql-test/t/rpl_empty_master_crash.test: Don't write warnings when initializing test mysql-test/t/rpl_redirect.test: Don't write warnings when initializing test mysql-test/t/rpl_replicate_do.test: Don't write warnings when initializing test mysql-test/t/rpl_rotate_logs.test: Don't write warnings when initializing test mysql-test/t/rpl_skip_error.test: Don't write warnings when initializing test mysql-test/t/rpl_temporary.test: Don't write warnings when initializing test mysql-test/t/sel000033.test: Don't write warnings when initializing test mysql-test/t/sel000100.test: Don't write warnings when initializing test mysql-test/t/select.test: Don't write warnings when initializing test mysql-test/t/select_found.test: Don't write warnings when initializing test mysql-test/t/select_safe.test: Don't write warnings when initializing test mysql-test/t/show_check.test: Don't write warnings when initializing test mysql-test/t/status.test: Don't write warnings when initializing test mysql-test/t/subselect.test: Don't write warnings when initializing test mysql-test/t/symlink.test: Don't write warnings when initializing test mysql-test/t/tablelock.test: Don't write warnings when initializing test mysql-test/t/temp_table.test: Don't write warnings when initializing test mysql-test/t/truncate.test: Don't write warnings when initializing test mysql-test/t/type_blob.test: Don't write warnings when initializing test mysql-test/t/type_date.test: Don't write warnings when initializing test mysql-test/t/type_datetime.test: Don't write warnings when initializing test mysql-test/t/type_decimal.test: Don't write warnings when initializing test mysql-test/t/type_enum.test: Don't write warnings when initializing test mysql-test/t/type_float.test: Don't write warnings when initializing test mysql-test/t/type_ranges.test: Don't write warnings when initializing test mysql-test/t/type_set.test: Don't write warnings when initializing test mysql-test/t/type_time.test: Don't write warnings when initializing test mysql-test/t/type_timestamp.test: Don't write warnings when initializing test mysql-test/t/type_uint.test: Don't write warnings when initializing test mysql-test/t/type_year.test: Don't write warnings when initializing test mysql-test/t/union.test: Don't write warnings when initializing test mysql-test/t/update.test: Don't write warnings when initializing test mysql-test/t/user_var.test: Don't write warnings when initializing test mysql-test/t/varbinary.test: Don't write warnings when initializing test mysql-test/t/variables.test: Don't write warnings when initializing test mysql-test/t/warnings.test: Don't write warnings when initializing test mysys/my_vsnprintf.c: Safety fix readline/terminal.c: Removed compiler warnings sql/ha_berkeley.cc: Indentation changes sql/mysql_priv.h: Change store_warning -> push_warning_printf sql/sql_db.cc: Change store_warning -> push_warning_printf sql/sql_error.cc: Change store_warning -> push_warning_printf sql/sql_table.cc: Change store_warning -> push_warning_printf
23 years ago
Table definition cache, part 2 The table opening process now works the following way: - Create common TABLE_SHARE object - Read the .frm file and unpack it into the TABLE_SHARE object - Create a TABLE object based on the information in the TABLE_SHARE object and open a handler to the table object Other noteworthy changes: - In TABLE_SHARE the most common strings are now LEX_STRING's - Better error message when table is not found - Variable table_cache is now renamed 'table_open_cache' - New variable 'table_definition_cache' that is the number of table defintions that will be cached - strxnmov() calls are now fixed to avoid overflows - strxnmov() will now always add one end \0 to result - engine objects are now created with a TABLE_SHARE object instead of a TABLE object. - After creating a field object one must call field->init(table) before using it - For a busy system this change will give you: - Less memory usage for table object - Faster opening of tables (if it's has been in use or is in table definition cache) - Allow you to cache many table definitions objects - Faster drop of table mysql-test/mysql-test-run.sh: Fixed some problems with --gdb option Test both with socket and tcp/ip port that all old servers are killed mysql-test/r/flush_table.result: More tests with lock table with 2 threads + flush table mysql-test/r/information_schema.result: Removed old (now wrong) result mysql-test/r/innodb.result: Better error messages (thanks to TDC patch) mysql-test/r/merge.result: Extra flush table test mysql-test/r/ndb_bitfield.result: Better error messages (thanks to TDC patch) mysql-test/r/ndb_partition_error.result: Better error messages (thanks to TDC patch) mysql-test/r/query_cache.result: Remove tables left from old tests mysql-test/r/temp_table.result: Test truncate with temporary tables mysql-test/r/variables.result: Table_cache -> Table_open_cache mysql-test/t/flush_table.test: More tests with lock table with 2 threads + flush table mysql-test/t/merge.test: Extra flush table test mysql-test/t/multi_update.test: Added 'sleep' to make test predictable mysql-test/t/query_cache.test: Remove tables left from old tests mysql-test/t/temp_table.test: Test truncate with temporary tables mysql-test/t/variables.test: Table_cache -> Table_open_cache mysql-test/valgrind.supp: Remove warning that may happens becasue threads dies in different order mysys/hash.c: Fixed wrong DBUG_PRINT mysys/mf_dirname.c: More DBUG mysys/mf_pack.c: Better comment mysys/mf_tempdir.c: More DBUG Ensure that we call cleanup_dirname() on all temporary directory paths. If we don't do this, we will get a failure when comparing temporary table names as in some cases the temporary table name is run through convert_dirname()) mysys/my_alloc.c: Indentation fix sql/examples/ha_example.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_example.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_tina.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_tina.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/field.cc: Update for table definition cache: - Field creation now takes TABLE_SHARE instead of TABLE as argument (This is becasue field definitions are now cached in TABLE_SHARE) When a field is created, one now must call field->init(TABLE) before using it - Use s->db instead of s->table_cache_key - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE - make_field() takes TABLE_SHARE as argument instead of TABLE - move_field() -> move_field_offset() sql/field.h: Update for table definition cache: - Field creation now takes TABLE_SHARE instead of TABLE as argument (This is becasue field definitions are now cached in TABLE_SHARE) When a field is created, one now must call field->init(TABLE) before using it - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE - make_field() takes TABLE_SHARE as argument instead of TABLE - move_field() -> move_field_offset() sql/ha_archive.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_archive.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_berkeley.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Changed name of argument create() to not hide internal 'table' variable. table->s -> table_share sql/ha_berkeley.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_blackhole.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_blackhole.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_federated.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Fixed comments Remove index variable and replace with pointers (simple optimization) move_field() -> move_field_offset() Removed some strlen() calls sql/ha_federated.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_heap.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Simplify delete_table() and create() as the given file names are now without extension sql/ha_heap.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_innodb.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_innodb.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_myisam.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Remove not needed fn_format() Fixed for new table->s structure sql/ha_myisam.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_myisammrg.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Don't set 'is_view' for MERGE tables Use new interface to find_temporary_table() sql/ha_myisammrg.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers Added flag HA_NO_COPY_ON_ALTER sql/ha_ndbcluster.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Fixed wrong calls to strxnmov() Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed drop_table -> intern_drop_table() table->s -> table_share Move part_info to TABLE Fixed comments & DBUG print's New arguments to print_error() sql/ha_ndbcluster.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_partition.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers We can't set up or use part_info when creating handler as there is not yet any table object New ha_intialise() to work with TDC (Done by Mikael) sql/ha_partition.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers Got set_part_info() from Mikael sql/handler.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers ha_delete_table() now also takes database as an argument handler::ha_open() now takes TABLE as argument ha_open() now calls ha_allocate_read_write_set() Simplify ha_allocate_read_write_set() Remove ha_deallocate_read_write_set() Use table_share (Cached by table definition cache) sql/handler.h: New table flag: HA_NO_COPY_ON_ALTER (used by merge tables) Remove ha_deallocate_read_write_set() get_new_handler() now takes TABLE_SHARE as argument ha_delete_table() now gets database as argument sql/item.cc: table_name and db are now LEX_STRING objects When creating fields, we have now have to call field->init(table) move_field -> move_field_offset() sql/item.h: tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR instead of BLOB sql/item_cmpfunc.cc: Fixed call to tmp_table_field_from_field_type() sql/item_create.cc: Assert if new not handled cast type sql/item_func.cc: When creating fields, we have now have to call field->init(table) dummy_table used by 'sp' now needs a TABLE_SHARE object sql/item_subselect.cc: Trivial code cleanups sql/item_sum.cc: When creating fields, we have now have to call field->init(table) sql/item_timefunc.cc: Item_func_str_to_date::tmp_table_field() now replaced by call to tmp_table_field_from_field_type() (see item_timefunc.h) sql/item_timefunc.h: Simply tmp_table_field() sql/item_uniq.cc: When creating fields, we have now have to call field->init(table) sql/key.cc: Added 'KEY' argument to 'find_ref_key' to simplify code sql/lock.cc: More debugging Use create_table_def_key() to create key for table cache Allocate TABLE_SHARE properly when creating name lock Fix that locked_table_name doesn't test same table twice sql/mysql_priv.h: New functions for table definition cache New interfaces to a lot of functions. New faster interface to find_temporary_table() and close_temporary_table() sql/mysqld.cc: Added support for table definition cache of size 'table_def_size' Fixed som calls to strnmov() Changed name of 'table_cache' to 'table_open_cache' sql/opt_range.cc: Use new interfaces Fixed warnings from valgrind sql/parse_file.cc: Safer calls to strxnmov() Fixed typo sql/set_var.cc: Added variable 'table_definition_cache' Variable table_cache renamed to 'table_open_cache' sql/slave.cc: Use new interface sql/sp.cc: Proper use of TABLE_SHARE sql/sp_head.cc: Remove compiler warnings We have now to call field->init(table) sql/sp_head.h: Pointers to parsed strings are now const sql/sql_acl.cc: table_name is now a LEX_STRING sql/sql_base.cc: Main implementation of table definition cache (The #ifdef's are there for the future when table definition cache will replace open table cache) Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places Views are not yet cached; For the moment we only cache if a table is a view or not. Faster implementation of find_temorary_table() Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()' Drop table is slightly faster as we can use the table definition cache to know the type of the table sql/sql_cache.cc: table_cache_key and table_name are now LEX_STRING 'sDBUG print fixes sql/sql_class.cc: table_cache_key is now a LEX_STRING safer strxnmov() sql/sql_class.h: Added number of open table shares (table definitions) sql/sql_db.cc: safer strxnmov() sql/sql_delete.cc: Use new interface to find_temporary_table() sql/sql_derived.cc: table_name is now a LEX_STRING sql/sql_handler.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's sql/sql_insert.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's sql/sql_lex.cc: Make parsed string a const (to quickly find out if anything is trying to change the query string) sql/sql_lex.h: Make parsed string a const (to quickly find out if anything is trying to change the query string) sql/sql_load.cc: Safer strxnmov() sql/sql_parse.cc: Better error if wrong DB name sql/sql_partition.cc: part_info moved to TABLE from TABLE_SHARE Indentation changes sql/sql_select.cc: Indentation fixes Call field->init(TABLE) for new created fields Update create_tmp_table() to use TABLE_SHARE properly sql/sql_select.h: Call field->init(TABLE) for new created fields sql/sql_show.cc: table_name is now a LEX_STRING part_info moved to TABLE sql/sql_table.cc: Use table definition cache to speed up delete of tables Fixed calls to functions with new interfaces Don't use 'share_not_to_be_used' Instead of doing openfrm() when doing repair, we now have to call get_table_share() followed by open_table_from_share(). Replace some fn_format() with faster unpack_filename(). Safer strxnmov() part_info is now in TABLE Added Mikaels patch for partition and ALTER TABLE Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER sql/sql_test.cc: table_name and table_cache_key are now LEX_STRING's sql/sql_trigger.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's safer strxnmov() Removed compiler warnings sql/sql_update.cc: Call field->init(TABLE) after field is created sql/sql_view.cc: safer strxnmov() Create common TABLE_SHARE object for views to allow us to cache if table is a view sql/structs.h: Added SHOW_TABLE_DEFINITIONS sql/table.cc: Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects The table opening process now works the following way: - Create common TABLE_SHARE object - Read the .frm file and unpack it into the TABLE_SHARE object - Create a TABLE object based on the information in the TABLE_SHARE object and open a handler to the table object open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats sql/table.h: TABLE objects for the same database table now share a common TABLE_SHARE object In TABLE_SHARE the most common strings are now LEX_STRING's sql/unireg.cc: Changed arguments to rea_create_table() to have same order as other functions Call field->init(table) for new created fields sql/unireg.h: Added OPEN_VIEW strings/strxnmov.c: Change strxnmov() to always add end \0 This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
20 years ago
WorkLog#1323 Deprecate the use of TYPE=... Preferred syntax is ENGINE= include/mysqld_error.h: New warning for deprecated syntax sql/lex.h: Introduce ENGINE keyword Sort order of symbols sql/share/czech/errmsg.txt: New warning for deprecated syntax sql/share/danish/errmsg.txt: New warning for deprecated syntax sql/share/dutch/errmsg.txt: New warning for deprecated syntax sql/share/english/errmsg.txt: New warning for deprecated syntax sql/share/estonian/errmsg.txt: New warning for deprecated syntax sql/share/french/errmsg.txt: New warning for deprecated syntax sql/share/german/errmsg.txt: New warning for deprecated syntax sql/share/greek/errmsg.txt: New warning for deprecated syntax sql/share/hungarian/errmsg.txt: New warning for deprecated syntax sql/share/italian/errmsg.txt: New warning for deprecated syntax sql/share/japanese/errmsg.txt: New warning for deprecated syntax sql/share/korean/errmsg.txt: New warning for deprecated syntax sql/share/norwegian-ny/errmsg.txt: New warning for deprecated syntax sql/share/norwegian/errmsg.txt: New warning for deprecated syntax sql/share/polish/errmsg.txt: New warning for deprecated syntax sql/share/portuguese/errmsg.txt: New warning for deprecated syntax sql/share/romanian/errmsg.txt: New warning for deprecated syntax sql/share/russian/errmsg.txt: New warning for deprecated syntax sql/share/serbian/errmsg.txt: New warning for deprecated syntax sql/share/slovak/errmsg.txt: New warning for deprecated syntax sql/share/spanish/errmsg.txt: New warning for deprecated syntax sql/share/swedish/errmsg.txt: New warning for deprecated syntax sql/share/ukrainian/errmsg.txt: New warning for deprecated syntax sql/sql_show.cc: Change TYPE= with ENGINE= sql/sql_yacc.yy: Introduce ENGINE keyword, Deprecate TYPE= syntax, Introduce SHOW ENGINE syntax, Deprecate SHOW INNODB/BDB syntax. mysql-test/r/alias.result: Change occurances of TYPE= to ENGINE= mysql-test/r/alter_table.result: Change occurances of TYPE= to ENGINE= mysql-test/r/auto_increment.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-alter-table-1.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-crash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb-deadlock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/bdb_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/case.result: Change occurances of TYPE= to ENGINE= mysql-test/r/cast.result: Change occurances of TYPE= to ENGINE= mysql-test/r/constraints.result: Change occurances of TYPE= to ENGINE= mysql-test/r/create.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_collate.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_latin1_de.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_many.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_mb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_recoding.result: Change occurances of TYPE= to ENGINE= mysql-test/r/ctype_ucs.result: Change occurances of TYPE= to ENGINE= mysql-test/r/delete.result: Change occurances of TYPE= to ENGINE= mysql-test/r/distinct.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext2.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext_distinct.result: Change occurances of TYPE= to ENGINE= mysql-test/r/fulltext_left_join.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_compress.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_date_add.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_group.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_if.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_str.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_system.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_test.result: Change occurances of TYPE= to ENGINE= mysql-test/r/func_time.result: Change occurances of TYPE= to ENGINE= mysql-test/r/gis-rtree.result: Change occurances of TYPE= to ENGINE= mysql-test/r/group_by.result: Change occurances of TYPE= to ENGINE= mysql-test/r/handler.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_auto_increment.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_btree.result: Change occurances of TYPE= to ENGINE= mysql-test/r/heap_hash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/help.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb-deadlock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/innodb_handler.result: Change occurances of TYPE= to ENGINE= mysql-test/r/insert_select.result: Change occurances of TYPE= to ENGINE= mysql-test/r/isam.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join_crash.result: Change occurances of TYPE= to ENGINE= mysql-test/r/join_outer.result: Change occurances of TYPE= to ENGINE= mysql-test/r/key.result: Change occurances of TYPE= to ENGINE= mysql-test/r/lock.result: Change occurances of TYPE= to ENGINE= mysql-test/r/lock_tables_lost_commit.result: Change occurances of TYPE= to ENGINE= mysql-test/r/merge.result: Change occurances of TYPE= to ENGINE= mysql-test/r/mix_innodb_myisam_binlog.result: Change occurances of TYPE= to ENGINE= mysql-test/r/multi_update.result: Change occurances of TYPE= to ENGINE= mysql-test/r/myisam.result: Change occurances of TYPE= to ENGINE= mysql-test/r/null.result: Change occurances of TYPE= to ENGINE= mysql-test/r/null_key.result: Change occurances of TYPE= to ENGINE= mysql-test/r/order_by.result: Change occurances of TYPE= to ENGINE= mysql-test/r/query_cache.result: Change occurances of TYPE= to ENGINE= mysql-test/r/range.result: Change occurances of TYPE= to ENGINE= mysql-test/r/repair_part1.result: Change occurances of TYPE= to ENGINE= mysql-test/r/replace.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rollback.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl000006.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_flush_tables.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_insert_id.result: Change occurances of TYPE= to ENGINE= mysql-test/r/rpl_relayrotate.result: Change occurances of TYPE= to ENGINE= mysql-test/r/select.result: Change occurances of TYPE= to ENGINE= mysql-test/r/select_found.result: Change occurances of TYPE= to ENGINE= mysql-test/r/show_check.result: Change occurances of TYPE= to ENGINE= mysql-test/r/sql_mode.result: Change occurances of TYPE= to ENGINE= mysql-test/r/status.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect2.result: Change occurances of TYPE= to ENGINE= mysql-test/r/subselect_innodb.result: Change occurances of TYPE= to ENGINE= mysql-test/r/symlink.result: Change occurances of TYPE= to ENGINE= mysql-test/r/temp_table.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_blob.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_datetime.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_enum.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_nchar.result: Change occurances of TYPE= to ENGINE= mysql-test/r/type_set.result: Change occurances of TYPE= to ENGINE= mysql-test/r/union.result: Change occurances of TYPE= to ENGINE= mysql-test/r/update.result: Change occurances of TYPE= to ENGINE= mysql-test/r/warnings.result: Change occurances of TYPE= to ENGINE= mysql-test/t/alias.test: Change occurances of TYPE= to ENGINE= mysql-test/t/alter_table.test: Change occurances of TYPE= to ENGINE= mysql-test/t/auto_increment.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-alter-table-1.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-crash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb-deadlock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/bdb_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/create.test: Change occurances of TYPE= to ENGINE= mysql-test/t/ctype_ucs.test: Change occurances of TYPE= to ENGINE= mysql-test/t/delete.test: Change occurances of TYPE= to ENGINE= mysql-test/t/distinct.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext2.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext_distinct.test: Change occurances of TYPE= to ENGINE= mysql-test/t/fulltext_left_join.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_compress.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_date_add.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_group.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_if.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_str.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_test.test: Change occurances of TYPE= to ENGINE= mysql-test/t/func_time.test: Change occurances of TYPE= to ENGINE= mysql-test/t/gis-rtree.test: Change occurances of TYPE= to ENGINE= mysql-test/t/group_by.test: Change occurances of TYPE= to ENGINE= mysql-test/t/handler.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_auto_increment.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_btree.test: Change occurances of TYPE= to ENGINE= mysql-test/t/heap_hash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/help.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb-deadlock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/innodb_handler.test: Change occurances of TYPE= to ENGINE= mysql-test/t/insert_select.test: Change occurances of TYPE= to ENGINE= mysql-test/t/isam.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join_crash.test: Change occurances of TYPE= to ENGINE= mysql-test/t/join_outer.test: Change occurances of TYPE= to ENGINE= mysql-test/t/key.test: Change occurances of TYPE= to ENGINE= mysql-test/t/lock.test: Change occurances of TYPE= to ENGINE= mysql-test/t/lock_tables_lost_commit.test: Change occurances of TYPE= to ENGINE= mysql-test/t/merge.test: Change occurances of TYPE= to ENGINE= mysql-test/t/mix_innodb_myisam_binlog.test: Change occurances of TYPE= to ENGINE= mysql-test/t/multi_update.test: Change occurances of TYPE= to ENGINE= mysql-test/t/myisam.test: Change occurances of TYPE= to ENGINE= mysql-test/t/null.test: Change occurances of TYPE= to ENGINE= mysql-test/t/null_key.test: Change occurances of TYPE= to ENGINE= mysql-test/t/order_by.test: Change occurances of TYPE= to ENGINE= mysql-test/t/outfile.test: Change occurances of TYPE= to ENGINE= mysql-test/t/query_cache.test: Change occurances of TYPE= to ENGINE= mysql-test/t/query_cache_merge.test: Change occurances of TYPE= to ENGINE= mysql-test/t/range.test: Change occurances of TYPE= to ENGINE= mysql-test/t/repair_part1.test: Change occurances of TYPE= to ENGINE= mysql-test/t/replace.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rollback.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl000006.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_flush_tables.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_insert_id.test: Change occurances of TYPE= to ENGINE= mysql-test/t/rpl_relayrotate.test: Change occurances of TYPE= to ENGINE= mysql-test/t/select.test: Change occurances of TYPE= to ENGINE= mysql-test/t/select_found.test: Change occurances of TYPE= to ENGINE= mysql-test/t/show_check.test: Change occurances of TYPE= to ENGINE= mysql-test/t/sql_mode.test: Change occurances of TYPE= to ENGINE= mysql-test/t/status.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect2.test: Change occurances of TYPE= to ENGINE= mysql-test/t/subselect_innodb.test: Change occurances of TYPE= to ENGINE= mysql-test/t/symlink.test: Change occurances of TYPE= to ENGINE= mysql-test/t/temp_table.test: Change occurances of TYPE= to ENGINE= mysql-test/t/type_datetime.test: Change occurances of TYPE= to ENGINE= mysql-test/t/type_set.test: Change occurances of TYPE= to ENGINE= mysql-test/t/union.test: Change occurances of TYPE= to ENGINE= mysql-test/t/update.test: Change occurances of TYPE= to ENGINE= mysql-test/t/warnings.test: Change occurances of TYPE= to ENGINE= New test for deprecated syntax
22 years ago
New SET syntax & system variables. Made a some new buffers thread specific and changeable. Resize of key_buffer. AUTO_COMMIT -> AUTOCOMMIT Fixed mutex bug in DROP DATABASE Fixed bug when using auto_increment as second part of a key where first part could include NULL. Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers. Don't write message to error log when slave reconnects becasue of timeout. Fixed possible update problem when using DELETE/UPDATE on small tables (In some cases we used index even if table scanning would be better) A lot of minior code cleanups BitKeeper/deleted/.del-net.c~ef21d6402bb882f9: Delete: libmysql/net.c BitKeeper/etc/ignore: added libmysql/net.c Docs/manual.texi: New SET syntax & system variables. client/client_priv.h: moved order of include files client/mysql.cc: Removed compiler warning client/mysqladmin.c: Use new SHOW GLOBAL syntax (if server supports it) configure.in: version change include/Makefile.am: indentation cleanup include/my_getopt.h: Made some helper functions global include/my_sys.h: Removed not used code include/myisam.h: Added extra argument to ..._extra() include/myisammrg.h: Added extra argument to ..._extra() include/mysql_com.h: changed NET to be able to support changeable system variables include/mysql_embed.h: Added MYSQL_SERVER_SUFFIX include/mysql_version.h.in: Added check of multiple including (needed for embedded library) include/mysqld_error.h: New error messages innobase/dict/dict0dict.c: Remove compiler warnings innobase/include/ut0mem.h: Remove compiler warnings innobase/include/ut0mem.ic: Remove compiler warnings isam/isamchk.c: new init_key_cache() arguments isam/isamlog.c: new init_key_cache() arguments isam/test2.c: new init_key_cache() arguments isam/test3.c: new init_key_cache() arguments libmysql/Makefile.am: Removed net.c (Automaticly make it from net_serv.cc) libmysql/Makefile.shared: Removed net.c (Automaticly make it from net_serv.cc) libmysql/libmysql.c: Changeable system variables libmysqld/Makefile.am: Added set_var.cc file libmysqld/embedded_priv.h: Changed order of include fiels libmysqld/lib_sql.cc: merge with mysqld.cc (for changeable variables) libmysqld/libmysqld.c: New changeable system variables myisam/mi_check.c: Added extra argument to ..._extra() myisam/mi_extra.c: Added extra argument to ..._extra() myisam/mi_open.c: Removed not used variable myisam/mi_test1.c: Changed call to init_key_cache myisam/mi_test2.c: Added extra argument to ..._extra() myisam/mi_test3.c: Added extra argument to ..._extra() myisam/mi_write.c: Add cache size argument to bulk-insert-init myisam/myisamchk.c: Use new key cache myisam/myisamdef.h: new mi_init_bulk_insert() arguments myisam/myisamlog.c: Added extra argument to ..._extra() myisam/myisampack.c: Added extra argument to ..._extra() myisammrg/myrg_extra.c: Added extra argument to ..._extra() myisammrg/myrg_rrnd.c: Added extra argument to ..._extra() mysql-test/r/insert_select.result: New changeable system variables mysql-test/r/key.result: Test of bug in auto_increment mysql-test/r/query_cache.result: New changeable system variables mysql-test/r/rpl000001.result: New changeable system variables mysql-test/r/rpl000016.result: New changeable system variables mysql-test/r/union.result: New changeable system variables mysql-test/r/user_var.result: New changeable system variables mysql-test/r/variables.result: New changeable system variables mysql-test/t/key.test: Test of bug in auto_increment mysql-test/t/query_cache.test: New changeable system variables mysql-test/t/rpl000001.test: New changeable system variables mysql-test/t/rpl000009.test: New changeable system variables mysql-test/t/rpl000016.test: New changeable system variables mysql-test/t/rpl_compat.test: New changeable system variables mysql-test/t/union.test: New changeable system variables mysql-test/t/user_var.test: New changeable system variables mysql-test/t/variables.test: New changeable system variables mysys/default.c: Bigger default memory allocation mysys/mf_iocache.c: Removed compiler warning mysys/mf_keycache.c: Made key cache resizable on the fly Removed not needed extra argument to init_key_cache() mysys/my_getopt.c: Made some helper functions global sql/Makefile.am: Aded set_var.cc sql/convert.cc: Comment cleanup sql/field.cc: new changeable system variables sql/filesort.cc: new changeable system variables sql/ha_berkeley.cc: AUTO_COMMIT -> AUTOCOMMIT sql/ha_innodb.cc: new changeable system variables sql/ha_myisam.cc: Added extra argument to ..._extra() sql/ha_myisam.h: Added extra argument to ..._extra() sql/ha_myisammrg.cc: Added extra argument to ..._extra() sql/ha_myisammrg.h: Added extra argument to ..._extra() sql/handler.cc: Added extra argument to ..._extra() Added resize of key cache Change ha_table_typelib for use with new system variables sql/handler.h: Added extra argument to ..._extra() sql/item.cc: new changeable system variables sql/item.h: Added better support of Item_uint sql/item_func.cc: Added support for SET @@[global | session] system_variable sql/item_strfunc.cc: new changeable system variables sql/key.cc: Fixed bug in auto_increment on second part keys sql/lex.h: Removed not needed keywords sql/log.cc: new changeable system variables sql/log_event.cc: new changeable system variables sql/log_event.h: Removed not needed var reference sql/mini_client.cc: new changeable system variables code cleanup sql/mini_client.h: Indentation cleanup sql/mysql_priv.h: Changed order of include files & variables to make file more readable sql/mysqld.cc: Changed order of variables to make file more readable. Support for changeable variables Rename of system variables Moved init_vars to set_var.cc Changed output of --help sql/net_pkg.cc: Added my_net_local_init() to make it possible to set different defaults for network connection depending if you are a client, embedded library or server. sql/net_serv.cc: new changeable system variables To support this, some global variables had to be move to the NET structure. sql/records.cc: new changeable system variables use extra_opt() sql/repl_failsafe.cc: new changeable system variables minior code cleanups sql/repl_failsafe.h: removed not needed external var reference sql/share/czech/errmsg.txt: new changeable system variables sql/share/danish/errmsg.txt: new changeable system variables sql/share/dutch/errmsg.txt: new changeable system variables sql/share/english/errmsg.txt: new changeable system variables sql/share/estonian/errmsg.txt: new changeable system variables sql/share/french/errmsg.txt: new changeable system variables sql/share/german/errmsg.txt: new changeable system variables sql/share/greek/errmsg.txt: new changeable system variables sql/share/hungarian/errmsg.txt: new changeable system variables sql/share/italian/errmsg.txt: new changeable system variables sql/share/japanese/errmsg.txt: new changeable system variables sql/share/korean/errmsg.txt: new changeable system variables sql/share/norwegian-ny/errmsg.txt: new changeable system variables sql/share/norwegian/errmsg.txt: new changeable system variables sql/share/polish/errmsg.txt: new changeable system variables sql/share/portuguese/errmsg.txt: new changeable system variables sql/share/romanian/errmsg.txt: new changeable system variables sql/share/russian/errmsg.txt: new changeable system variables sql/share/slovak/errmsg.txt: new changeable system variables sql/share/spanish/errmsg.txt: new changeable system variables sql/share/swedish/errmsg.txt: new changeable system variables sql/share/ukrainian/errmsg.txt: new changeable system variables sql/slave.cc: new changeable system variables Added some suppression of error messages Initialize current_thd for all slave threads. sql/sql_acl.cc: Added checking of arguments for SET PASSWORD (for new SET defintion) sql/sql_acl.h: new prototypes sql/sql_base.cc: new changeable system variables sql/sql_cache.cc: new changeable system variables sql/sql_cache.h: Renamed some arguments to make code more readable sql/sql_class.cc: new changeable system variables sql/sql_class.h: New changeable system variables Code cleanup sql/sql_db.cc: Fixed bug in DROP DATABASE sql/sql_delete.cc: Usage of wrong define in test (possible speed problem) sql/sql_insert.cc: use extra_opt() Code cleanup sql/sql_lex.cc: Added support for SET @@[global | session] system_variable sql/sql_lex.h: Added support for SET @@[global | session] system_variable sql/sql_load.cc: Cleanup for embedded library Use extra_opt() sql/sql_parse.cc: Cleanup for embedded library New changeable system variables sql/sql_repl.cc: new changeable system variables sql/sql_repl.h: Fixed variable definitions sql/sql_select.cc: new changeable system variables sql/sql_show.cc: New changeable system variables sql/sql_table.cc: Fixed bug in DROP DATABASE sql/sql_union.cc: New changeable system variables sql/sql_update.cc: Usage of wrong define in test (possible speed problem) sql/sql_yacc.yy: New changeable system variables sql/structs.h: Added typedef for SHOW_VAR sql/table.cc: Fixed bug in auto_increment on second part keys sql/uniques.cc: Comment fix sql/unireg.h: A
24 years ago
New SET syntax & system variables. Made a some new buffers thread specific and changeable. Resize of key_buffer. AUTO_COMMIT -> AUTOCOMMIT Fixed mutex bug in DROP DATABASE Fixed bug when using auto_increment as second part of a key where first part could include NULL. Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers. Don't write message to error log when slave reconnects becasue of timeout. Fixed possible update problem when using DELETE/UPDATE on small tables (In some cases we used index even if table scanning would be better) A lot of minior code cleanups BitKeeper/deleted/.del-net.c~ef21d6402bb882f9: Delete: libmysql/net.c BitKeeper/etc/ignore: added libmysql/net.c Docs/manual.texi: New SET syntax & system variables. client/client_priv.h: moved order of include files client/mysql.cc: Removed compiler warning client/mysqladmin.c: Use new SHOW GLOBAL syntax (if server supports it) configure.in: version change include/Makefile.am: indentation cleanup include/my_getopt.h: Made some helper functions global include/my_sys.h: Removed not used code include/myisam.h: Added extra argument to ..._extra() include/myisammrg.h: Added extra argument to ..._extra() include/mysql_com.h: changed NET to be able to support changeable system variables include/mysql_embed.h: Added MYSQL_SERVER_SUFFIX include/mysql_version.h.in: Added check of multiple including (needed for embedded library) include/mysqld_error.h: New error messages innobase/dict/dict0dict.c: Remove compiler warnings innobase/include/ut0mem.h: Remove compiler warnings innobase/include/ut0mem.ic: Remove compiler warnings isam/isamchk.c: new init_key_cache() arguments isam/isamlog.c: new init_key_cache() arguments isam/test2.c: new init_key_cache() arguments isam/test3.c: new init_key_cache() arguments libmysql/Makefile.am: Removed net.c (Automaticly make it from net_serv.cc) libmysql/Makefile.shared: Removed net.c (Automaticly make it from net_serv.cc) libmysql/libmysql.c: Changeable system variables libmysqld/Makefile.am: Added set_var.cc file libmysqld/embedded_priv.h: Changed order of include fiels libmysqld/lib_sql.cc: merge with mysqld.cc (for changeable variables) libmysqld/libmysqld.c: New changeable system variables myisam/mi_check.c: Added extra argument to ..._extra() myisam/mi_extra.c: Added extra argument to ..._extra() myisam/mi_open.c: Removed not used variable myisam/mi_test1.c: Changed call to init_key_cache myisam/mi_test2.c: Added extra argument to ..._extra() myisam/mi_test3.c: Added extra argument to ..._extra() myisam/mi_write.c: Add cache size argument to bulk-insert-init myisam/myisamchk.c: Use new key cache myisam/myisamdef.h: new mi_init_bulk_insert() arguments myisam/myisamlog.c: Added extra argument to ..._extra() myisam/myisampack.c: Added extra argument to ..._extra() myisammrg/myrg_extra.c: Added extra argument to ..._extra() myisammrg/myrg_rrnd.c: Added extra argument to ..._extra() mysql-test/r/insert_select.result: New changeable system variables mysql-test/r/key.result: Test of bug in auto_increment mysql-test/r/query_cache.result: New changeable system variables mysql-test/r/rpl000001.result: New changeable system variables mysql-test/r/rpl000016.result: New changeable system variables mysql-test/r/union.result: New changeable system variables mysql-test/r/user_var.result: New changeable system variables mysql-test/r/variables.result: New changeable system variables mysql-test/t/key.test: Test of bug in auto_increment mysql-test/t/query_cache.test: New changeable system variables mysql-test/t/rpl000001.test: New changeable system variables mysql-test/t/rpl000009.test: New changeable system variables mysql-test/t/rpl000016.test: New changeable system variables mysql-test/t/rpl_compat.test: New changeable system variables mysql-test/t/union.test: New changeable system variables mysql-test/t/user_var.test: New changeable system variables mysql-test/t/variables.test: New changeable system variables mysys/default.c: Bigger default memory allocation mysys/mf_iocache.c: Removed compiler warning mysys/mf_keycache.c: Made key cache resizable on the fly Removed not needed extra argument to init_key_cache() mysys/my_getopt.c: Made some helper functions global sql/Makefile.am: Aded set_var.cc sql/convert.cc: Comment cleanup sql/field.cc: new changeable system variables sql/filesort.cc: new changeable system variables sql/ha_berkeley.cc: AUTO_COMMIT -> AUTOCOMMIT sql/ha_innodb.cc: new changeable system variables sql/ha_myisam.cc: Added extra argument to ..._extra() sql/ha_myisam.h: Added extra argument to ..._extra() sql/ha_myisammrg.cc: Added extra argument to ..._extra() sql/ha_myisammrg.h: Added extra argument to ..._extra() sql/handler.cc: Added extra argument to ..._extra() Added resize of key cache Change ha_table_typelib for use with new system variables sql/handler.h: Added extra argument to ..._extra() sql/item.cc: new changeable system variables sql/item.h: Added better support of Item_uint sql/item_func.cc: Added support for SET @@[global | session] system_variable sql/item_strfunc.cc: new changeable system variables sql/key.cc: Fixed bug in auto_increment on second part keys sql/lex.h: Removed not needed keywords sql/log.cc: new changeable system variables sql/log_event.cc: new changeable system variables sql/log_event.h: Removed not needed var reference sql/mini_client.cc: new changeable system variables code cleanup sql/mini_client.h: Indentation cleanup sql/mysql_priv.h: Changed order of include files & variables to make file more readable sql/mysqld.cc: Changed order of variables to make file more readable. Support for changeable variables Rename of system variables Moved init_vars to set_var.cc Changed output of --help sql/net_pkg.cc: Added my_net_local_init() to make it possible to set different defaults for network connection depending if you are a client, embedded library or server. sql/net_serv.cc: new changeable system variables To support this, some global variables had to be move to the NET structure. sql/records.cc: new changeable system variables use extra_opt() sql/repl_failsafe.cc: new changeable system variables minior code cleanups sql/repl_failsafe.h: removed not needed external var reference sql/share/czech/errmsg.txt: new changeable system variables sql/share/danish/errmsg.txt: new changeable system variables sql/share/dutch/errmsg.txt: new changeable system variables sql/share/english/errmsg.txt: new changeable system variables sql/share/estonian/errmsg.txt: new changeable system variables sql/share/french/errmsg.txt: new changeable system variables sql/share/german/errmsg.txt: new changeable system variables sql/share/greek/errmsg.txt: new changeable system variables sql/share/hungarian/errmsg.txt: new changeable system variables sql/share/italian/errmsg.txt: new changeable system variables sql/share/japanese/errmsg.txt: new changeable system variables sql/share/korean/errmsg.txt: new changeable system variables sql/share/norwegian-ny/errmsg.txt: new changeable system variables sql/share/norwegian/errmsg.txt: new changeable system variables sql/share/polish/errmsg.txt: new changeable system variables sql/share/portuguese/errmsg.txt: new changeable system variables sql/share/romanian/errmsg.txt: new changeable system variables sql/share/russian/errmsg.txt: new changeable system variables sql/share/slovak/errmsg.txt: new changeable system variables sql/share/spanish/errmsg.txt: new changeable system variables sql/share/swedish/errmsg.txt: new changeable system variables sql/share/ukrainian/errmsg.txt: new changeable system variables sql/slave.cc: new changeable system variables Added some suppression of error messages Initialize current_thd for all slave threads. sql/sql_acl.cc: Added checking of arguments for SET PASSWORD (for new SET defintion) sql/sql_acl.h: new prototypes sql/sql_base.cc: new changeable system variables sql/sql_cache.cc: new changeable system variables sql/sql_cache.h: Renamed some arguments to make code more readable sql/sql_class.cc: new changeable system variables sql/sql_class.h: New changeable system variables Code cleanup sql/sql_db.cc: Fixed bug in DROP DATABASE sql/sql_delete.cc: Usage of wrong define in test (possible speed problem) sql/sql_insert.cc: use extra_opt() Code cleanup sql/sql_lex.cc: Added support for SET @@[global | session] system_variable sql/sql_lex.h: Added support for SET @@[global | session] system_variable sql/sql_load.cc: Cleanup for embedded library Use extra_opt() sql/sql_parse.cc: Cleanup for embedded library New changeable system variables sql/sql_repl.cc: new changeable system variables sql/sql_repl.h: Fixed variable definitions sql/sql_select.cc: new changeable system variables sql/sql_show.cc: New changeable system variables sql/sql_table.cc: Fixed bug in DROP DATABASE sql/sql_union.cc: New changeable system variables sql/sql_update.cc: Usage of wrong define in test (possible speed problem) sql/sql_yacc.yy: New changeable system variables sql/structs.h: Added typedef for SHOW_VAR sql/table.cc: Fixed bug in auto_increment on second part keys sql/uniques.cc: Comment fix sql/unireg.h: A
24 years ago
Bug #29053 SQL_CACHE in UNION causes non-deterministic functions to be cached Changed code to enforce that SQL_CACHE only in the first SELECT is used to turn on caching(as documented), but any SQL_NO_CACHE will turn off caching (not documented, but a useful behaviour, especially for machine generated queries). Added test cases to explicitly test the documented caching behaviour and test cases for the reported bug. mysql-test/r/query_cache.result: Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query. Also added a bug specific test case to validate that the buggy behavior as reported has been fixed. mysql-test/t/query_cache.test: Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query. Also added a bug specific test case to validate that the buggy behavior as reported has been fixed. sql/sql_yacc.yy: Added an explicit check to make sure "SELECT SQL_CACHE" only works on the first select in a query. The parser will always hit the outermost SELECT first, and if the SQL_CACHE option is found it sets the safe_to_query flag in the lex. Then, if there are subseqent "uncachable" subqueries or functions, as it parses those elements it sets the safe_to_query to 0. However, this cause problems if nested SELECTs also used the SQL_CACHE option, because then it would set back safe_to_query to 1, even though there are uncacheable expressions previously parsed. By adding the check to ensure only the first SELECT can turn caching on, it means a subsequent SQL_CACHE option can't turn caching back on after a uncacheable subsequery was already encountered.
19 years ago
New SET syntax & system variables. Made a some new buffers thread specific and changeable. Resize of key_buffer. AUTO_COMMIT -> AUTOCOMMIT Fixed mutex bug in DROP DATABASE Fixed bug when using auto_increment as second part of a key where first part could include NULL. Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers. Don't write message to error log when slave reconnects becasue of timeout. Fixed possible update problem when using DELETE/UPDATE on small tables (In some cases we used index even if table scanning would be better) A lot of minior code cleanups BitKeeper/deleted/.del-net.c~ef21d6402bb882f9: Delete: libmysql/net.c BitKeeper/etc/ignore: added libmysql/net.c Docs/manual.texi: New SET syntax & system variables. client/client_priv.h: moved order of include files client/mysql.cc: Removed compiler warning client/mysqladmin.c: Use new SHOW GLOBAL syntax (if server supports it) configure.in: version change include/Makefile.am: indentation cleanup include/my_getopt.h: Made some helper functions global include/my_sys.h: Removed not used code include/myisam.h: Added extra argument to ..._extra() include/myisammrg.h: Added extra argument to ..._extra() include/mysql_com.h: changed NET to be able to support changeable system variables include/mysql_embed.h: Added MYSQL_SERVER_SUFFIX include/mysql_version.h.in: Added check of multiple including (needed for embedded library) include/mysqld_error.h: New error messages innobase/dict/dict0dict.c: Remove compiler warnings innobase/include/ut0mem.h: Remove compiler warnings innobase/include/ut0mem.ic: Remove compiler warnings isam/isamchk.c: new init_key_cache() arguments isam/isamlog.c: new init_key_cache() arguments isam/test2.c: new init_key_cache() arguments isam/test3.c: new init_key_cache() arguments libmysql/Makefile.am: Removed net.c (Automaticly make it from net_serv.cc) libmysql/Makefile.shared: Removed net.c (Automaticly make it from net_serv.cc) libmysql/libmysql.c: Changeable system variables libmysqld/Makefile.am: Added set_var.cc file libmysqld/embedded_priv.h: Changed order of include fiels libmysqld/lib_sql.cc: merge with mysqld.cc (for changeable variables) libmysqld/libmysqld.c: New changeable system variables myisam/mi_check.c: Added extra argument to ..._extra() myisam/mi_extra.c: Added extra argument to ..._extra() myisam/mi_open.c: Removed not used variable myisam/mi_test1.c: Changed call to init_key_cache myisam/mi_test2.c: Added extra argument to ..._extra() myisam/mi_test3.c: Added extra argument to ..._extra() myisam/mi_write.c: Add cache size argument to bulk-insert-init myisam/myisamchk.c: Use new key cache myisam/myisamdef.h: new mi_init_bulk_insert() arguments myisam/myisamlog.c: Added extra argument to ..._extra() myisam/myisampack.c: Added extra argument to ..._extra() myisammrg/myrg_extra.c: Added extra argument to ..._extra() myisammrg/myrg_rrnd.c: Added extra argument to ..._extra() mysql-test/r/insert_select.result: New changeable system variables mysql-test/r/key.result: Test of bug in auto_increment mysql-test/r/query_cache.result: New changeable system variables mysql-test/r/rpl000001.result: New changeable system variables mysql-test/r/rpl000016.result: New changeable system variables mysql-test/r/union.result: New changeable system variables mysql-test/r/user_var.result: New changeable system variables mysql-test/r/variables.result: New changeable system variables mysql-test/t/key.test: Test of bug in auto_increment mysql-test/t/query_cache.test: New changeable system variables mysql-test/t/rpl000001.test: New changeable system variables mysql-test/t/rpl000009.test: New changeable system variables mysql-test/t/rpl000016.test: New changeable system variables mysql-test/t/rpl_compat.test: New changeable system variables mysql-test/t/union.test: New changeable system variables mysql-test/t/user_var.test: New changeable system variables mysql-test/t/variables.test: New changeable system variables mysys/default.c: Bigger default memory allocation mysys/mf_iocache.c: Removed compiler warning mysys/mf_keycache.c: Made key cache resizable on the fly Removed not needed extra argument to init_key_cache() mysys/my_getopt.c: Made some helper functions global sql/Makefile.am: Aded set_var.cc sql/convert.cc: Comment cleanup sql/field.cc: new changeable system variables sql/filesort.cc: new changeable system variables sql/ha_berkeley.cc: AUTO_COMMIT -> AUTOCOMMIT sql/ha_innodb.cc: new changeable system variables sql/ha_myisam.cc: Added extra argument to ..._extra() sql/ha_myisam.h: Added extra argument to ..._extra() sql/ha_myisammrg.cc: Added extra argument to ..._extra() sql/ha_myisammrg.h: Added extra argument to ..._extra() sql/handler.cc: Added extra argument to ..._extra() Added resize of key cache Change ha_table_typelib for use with new system variables sql/handler.h: Added extra argument to ..._extra() sql/item.cc: new changeable system variables sql/item.h: Added better support of Item_uint sql/item_func.cc: Added support for SET @@[global | session] system_variable sql/item_strfunc.cc: new changeable system variables sql/key.cc: Fixed bug in auto_increment on second part keys sql/lex.h: Removed not needed keywords sql/log.cc: new changeable system variables sql/log_event.cc: new changeable system variables sql/log_event.h: Removed not needed var reference sql/mini_client.cc: new changeable system variables code cleanup sql/mini_client.h: Indentation cleanup sql/mysql_priv.h: Changed order of include files & variables to make file more readable sql/mysqld.cc: Changed order of variables to make file more readable. Support for changeable variables Rename of system variables Moved init_vars to set_var.cc Changed output of --help sql/net_pkg.cc: Added my_net_local_init() to make it possible to set different defaults for network connection depending if you are a client, embedded library or server. sql/net_serv.cc: new changeable system variables To support this, some global variables had to be move to the NET structure. sql/records.cc: new changeable system variables use extra_opt() sql/repl_failsafe.cc: new changeable system variables minior code cleanups sql/repl_failsafe.h: removed not needed external var reference sql/share/czech/errmsg.txt: new changeable system variables sql/share/danish/errmsg.txt: new changeable system variables sql/share/dutch/errmsg.txt: new changeable system variables sql/share/english/errmsg.txt: new changeable system variables sql/share/estonian/errmsg.txt: new changeable system variables sql/share/french/errmsg.txt: new changeable system variables sql/share/german/errmsg.txt: new changeable system variables sql/share/greek/errmsg.txt: new changeable system variables sql/share/hungarian/errmsg.txt: new changeable system variables sql/share/italian/errmsg.txt: new changeable system variables sql/share/japanese/errmsg.txt: new changeable system variables sql/share/korean/errmsg.txt: new changeable system variables sql/share/norwegian-ny/errmsg.txt: new changeable system variables sql/share/norwegian/errmsg.txt: new changeable system variables sql/share/polish/errmsg.txt: new changeable system variables sql/share/portuguese/errmsg.txt: new changeable system variables sql/share/romanian/errmsg.txt: new changeable system variables sql/share/russian/errmsg.txt: new changeable system variables sql/share/slovak/errmsg.txt: new changeable system variables sql/share/spanish/errmsg.txt: new changeable system variables sql/share/swedish/errmsg.txt: new changeable system variables sql/share/ukrainian/errmsg.txt: new changeable system variables sql/slave.cc: new changeable system variables Added some suppression of error messages Initialize current_thd for all slave threads. sql/sql_acl.cc: Added checking of arguments for SET PASSWORD (for new SET defintion) sql/sql_acl.h: new prototypes sql/sql_base.cc: new changeable system variables sql/sql_cache.cc: new changeable system variables sql/sql_cache.h: Renamed some arguments to make code more readable sql/sql_class.cc: new changeable system variables sql/sql_class.h: New changeable system variables Code cleanup sql/sql_db.cc: Fixed bug in DROP DATABASE sql/sql_delete.cc: Usage of wrong define in test (possible speed problem) sql/sql_insert.cc: use extra_opt() Code cleanup sql/sql_lex.cc: Added support for SET @@[global | session] system_variable sql/sql_lex.h: Added support for SET @@[global | session] system_variable sql/sql_load.cc: Cleanup for embedded library Use extra_opt() sql/sql_parse.cc: Cleanup for embedded library New changeable system variables sql/sql_repl.cc: new changeable system variables sql/sql_repl.h: Fixed variable definitions sql/sql_select.cc: new changeable system variables sql/sql_show.cc: New changeable system variables sql/sql_table.cc: Fixed bug in DROP DATABASE sql/sql_union.cc: New changeable system variables sql/sql_update.cc: Usage of wrong define in test (possible speed problem) sql/sql_yacc.yy: New changeable system variables sql/structs.h: Added typedef for SHOW_VAR sql/table.cc: Fixed bug in auto_increment on second part keys sql/uniques.cc: Comment fix sql/unireg.h: A
24 years ago
added code covarage for functions convert(), nullif(), crc32(), is_used_lock(), char_lengtrh(), bit_xor() added string length for more speed made code covarage for print() method of Item fixed printability of some items (SCRUM) (WL#1274) mysql-test/r/auto_increment.result: print() code coverage mysql-test/r/bench_count_distinct.result: print() code coverage mysql-test/r/case.result: print() code coverage mysql-test/r/cast.result: print() code coverage mysql-test/r/ctype_collate.result: print() code coverage mysql-test/r/ctype_many.result: convert with 3 arguments code covarage print() code coverage mysql-test/r/ctype_utf8.result: char_length code coverage mysql-test/r/date_formats.result: print() code coverage mysql-test/r/fulltext.result: print() code coverage mysql-test/r/func_compress.result: print() code coverage mysql-test/r/func_gconcat.result: print() code coverage mysql-test/r/func_group.result: bit_xor() code coverage print() code coverage mysql-test/r/func_if.result: nullif() code coverage print() code coverage mysql-test/r/func_in.result: print() code coverage mysql-test/r/func_math.result: print() code coverage mysql-test/r/func_op.result: print() code coverage mysql-test/r/func_regexp.result: print() code coverage mysql-test/r/func_set.result: print() code coverage mysql-test/r/func_str.result: crc32() code coverage print() code coverage mysql-test/r/func_system.result: print() code coverage mysql-test/r/func_test.result: print() code coverage mysql-test/r/func_time.result: print() code coverage mysql-test/r/group_by.result: print() code coverage mysql-test/r/having.result: print() code coverage mysql-test/r/insert_update.result: print() code coverage mysql-test/r/null.result: print() code coverage mysql-test/r/olap.result: print() code coverage mysql-test/r/query_cache.result: print() code coverage mysql-test/r/row.result: print() code coverage mysql-test/r/rpl000001.result: print() code coverage mysql-test/r/rpl_get_lock.result: print() code coverage mysql-test/r/rpl_master_pos_wait.result: print() code coverage mysql-test/r/select.result: print() code coverage mysql-test/r/subselect.result: print() code coverage mysql-test/r/type_blob.result: print() code coverage mysql-test/r/varbinary.result: print() code coverage mysql-test/r/variables.result: print() code coverage mysql-test/t/auto_increment.test: print() code coverage mysql-test/t/bench_count_distinct.test: print() code coverage mysql-test/t/case.test: print() code coverage mysql-test/t/cast.test: print() code coverage mysql-test/t/ctype_collate.test: print() code coverage mysql-test/t/ctype_many.test: convert with 3 arguments code covarage print() code coverage mysql-test/t/ctype_utf8.test: char_length code coverage mysql-test/t/date_formats.test: print() code coverage mysql-test/t/fulltext.test: print() code coverage mysql-test/t/func_compress.test: print() code coverage mysql-test/t/func_gconcat.test: print() code coverage mysql-test/t/func_group.test: bit_xor() code coverage print() code coverage mysql-test/t/func_if.test: nullif() code coverage print() code coverage mysql-test/t/func_in.test: print() code coverage mysql-test/t/func_math.test: print() code coverage mysql-test/t/func_op.test: print() code coverage mysql-test/t/func_regexp.test: print() code coverage mysql-test/t/func_set.test: print() code coverage mysql-test/t/func_str.test: crc32() code covarage print() code coverage mysql-test/t/func_system.test: print() code coverage mysql-test/t/func_test.test: print() code coverage mysql-test/t/func_time.test: print() code coverage mysql-test/t/group_by.test: print() code coverage mysql-test/t/having.test: print() code coverage mysql-test/t/insert_update.test: print() code coverage mysql-test/t/null.test: print() code coverage mysql-test/t/olap.test: print() code coverage mysql-test/t/query_cache.test: print() code coverage mysql-test/t/row.test: print() code coverage mysql-test/t/rpl000001.test: print() code coverage mysql-test/t/rpl_get_lock.test: print() code coverage mysql-test/t/rpl_master_pos_wait.test: print() code coverage mysql-test/t/select.test: print() code coverage mysql-test/t/type_blob.test: print() code coverage mysql-test/t/varbinary.test: print() code coverage mysql-test/t/variables.test: print() code coverage sql/item.cc: added string length for more speed layout fix fixed string printability sql/item.h: added string length for more speed sql/item_cmpfunc.cc: added string length for more speed sql/item_cmpfunc.h: fixed printability sql/item_create.cc: fixed printability sql/item_func.cc: fixed printability added string length for more speed sql/item_func.h: fixed printability sql/item_strfunc.cc: fixed printability added string length for more speed sql/item_strfunc.h: fixed printability sql/item_subselect.cc: added string length for more speed sql/item_sum.cc: added string length for more speed sql/item_timefunc.cc: added string length for more speed sql/item_timefunc.h: fixed printability sql/item_uniq.h: added string length for more speed sql/key.cc: added string length for more speed sql/sql_lex.cc: added string length for more speed sql/sql_parse.cc: after merge fix sql/sql_repl.cc: string changed with character for more speed sql/sql_select.cc: added string length for more speed sql/sql_show.cc: added string length for more speed
22 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
19 years ago
added code covarage for functions convert(), nullif(), crc32(), is_used_lock(), char_lengtrh(), bit_xor() added string length for more speed made code covarage for print() method of Item fixed printability of some items (SCRUM) (WL#1274) mysql-test/r/auto_increment.result: print() code coverage mysql-test/r/bench_count_distinct.result: print() code coverage mysql-test/r/case.result: print() code coverage mysql-test/r/cast.result: print() code coverage mysql-test/r/ctype_collate.result: print() code coverage mysql-test/r/ctype_many.result: convert with 3 arguments code covarage print() code coverage mysql-test/r/ctype_utf8.result: char_length code coverage mysql-test/r/date_formats.result: print() code coverage mysql-test/r/fulltext.result: print() code coverage mysql-test/r/func_compress.result: print() code coverage mysql-test/r/func_gconcat.result: print() code coverage mysql-test/r/func_group.result: bit_xor() code coverage print() code coverage mysql-test/r/func_if.result: nullif() code coverage print() code coverage mysql-test/r/func_in.result: print() code coverage mysql-test/r/func_math.result: print() code coverage mysql-test/r/func_op.result: print() code coverage mysql-test/r/func_regexp.result: print() code coverage mysql-test/r/func_set.result: print() code coverage mysql-test/r/func_str.result: crc32() code coverage print() code coverage mysql-test/r/func_system.result: print() code coverage mysql-test/r/func_test.result: print() code coverage mysql-test/r/func_time.result: print() code coverage mysql-test/r/group_by.result: print() code coverage mysql-test/r/having.result: print() code coverage mysql-test/r/insert_update.result: print() code coverage mysql-test/r/null.result: print() code coverage mysql-test/r/olap.result: print() code coverage mysql-test/r/query_cache.result: print() code coverage mysql-test/r/row.result: print() code coverage mysql-test/r/rpl000001.result: print() code coverage mysql-test/r/rpl_get_lock.result: print() code coverage mysql-test/r/rpl_master_pos_wait.result: print() code coverage mysql-test/r/select.result: print() code coverage mysql-test/r/subselect.result: print() code coverage mysql-test/r/type_blob.result: print() code coverage mysql-test/r/varbinary.result: print() code coverage mysql-test/r/variables.result: print() code coverage mysql-test/t/auto_increment.test: print() code coverage mysql-test/t/bench_count_distinct.test: print() code coverage mysql-test/t/case.test: print() code coverage mysql-test/t/cast.test: print() code coverage mysql-test/t/ctype_collate.test: print() code coverage mysql-test/t/ctype_many.test: convert with 3 arguments code covarage print() code coverage mysql-test/t/ctype_utf8.test: char_length code coverage mysql-test/t/date_formats.test: print() code coverage mysql-test/t/fulltext.test: print() code coverage mysql-test/t/func_compress.test: print() code coverage mysql-test/t/func_gconcat.test: print() code coverage mysql-test/t/func_group.test: bit_xor() code coverage print() code coverage mysql-test/t/func_if.test: nullif() code coverage print() code coverage mysql-test/t/func_in.test: print() code coverage mysql-test/t/func_math.test: print() code coverage mysql-test/t/func_op.test: print() code coverage mysql-test/t/func_regexp.test: print() code coverage mysql-test/t/func_set.test: print() code coverage mysql-test/t/func_str.test: crc32() code covarage print() code coverage mysql-test/t/func_system.test: print() code coverage mysql-test/t/func_test.test: print() code coverage mysql-test/t/func_time.test: print() code coverage mysql-test/t/group_by.test: print() code coverage mysql-test/t/having.test: print() code coverage mysql-test/t/insert_update.test: print() code coverage mysql-test/t/null.test: print() code coverage mysql-test/t/olap.test: print() code coverage mysql-test/t/query_cache.test: print() code coverage mysql-test/t/row.test: print() code coverage mysql-test/t/rpl000001.test: print() code coverage mysql-test/t/rpl_get_lock.test: print() code coverage mysql-test/t/rpl_master_pos_wait.test: print() code coverage mysql-test/t/select.test: print() code coverage mysql-test/t/type_blob.test: print() code coverage mysql-test/t/varbinary.test: print() code coverage mysql-test/t/variables.test: print() code coverage sql/item.cc: added string length for more speed layout fix fixed string printability sql/item.h: added string length for more speed sql/item_cmpfunc.cc: added string length for more speed sql/item_cmpfunc.h: fixed printability sql/item_create.cc: fixed printability sql/item_func.cc: fixed printability added string length for more speed sql/item_func.h: fixed printability sql/item_strfunc.cc: fixed printability added string length for more speed sql/item_strfunc.h: fixed printability sql/item_subselect.cc: added string length for more speed sql/item_sum.cc: added string length for more speed sql/item_timefunc.cc: added string length for more speed sql/item_timefunc.h: fixed printability sql/item_uniq.h: added string length for more speed sql/key.cc: added string length for more speed sql/sql_lex.cc: added string length for more speed sql/sql_parse.cc: after merge fix sql/sql_repl.cc: string changed with character for more speed sql/sql_select.cc: added string length for more speed sql/sql_show.cc: added string length for more speed
22 years ago
Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT statement from internal structures based on value set later at runtime, not the original value set by the user. The solution is to remember that original value. mysql-test/r/auto_increment.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_compress.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_math.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_system.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_time.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/information_schema.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/query_cache.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/rpl_get_lock.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/rpl_master_pos_wait.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/show_check.result: Add result for bug#17203. mysql-test/r/subselect.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/type_blob.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/variables.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/view.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/t/show_check.test: Add test case for bug#17203. sql/sql_lex.cc: Reset SELECT_LEX::sql_cache together with SELECT_LEX::options. sql/sql_lex.h: Add SELECT_LEX::sql_cache field to store original user setting. sql/sql_select.cc: Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting. sql/sql_yacc.yy: Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user. Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
20 years ago
Bug#41371 Select returns 1 row with condition "col is not null and col is null" For application compatibility reasons MySQL converts "<autoincrement_column> IS NULL" predicates to "<autoincrement_column> = LAST_INSERT_ID()" in the first SELECT following an INSERT regardless of whether they're top level predicates or not. This causes wrong and obscure results when these predicates are combined with others on the same columns. Fixed by only doing the transformation on a single top-level predicate if a special SQL mode is turned on (sql_auto_is_null). Also made sql_auto_is_null off by default. per-file comments: mysql-test/r/func_isnull.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" test result updated mysql-test/t/func_isnull.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test case added sql/mysqld.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" sql_auto_is_null now is OFF by default. sql/sql_select.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" remove_eq_conds() split in two parts - one only checks the upper condition, the req_remove_eq_conds() recursively checks all the condition tree. mysql-test/extra/rpl_tests/rpl_insert_id.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable) mysql-test/r/mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/mysqlbinlog2.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/odbc.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/query_cache.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/user_var-binlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_insert_id.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_sp.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/t/odbc.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable)
16 years ago
Bug#41371 Select returns 1 row with condition "col is not null and col is null" For application compatibility reasons MySQL converts "<autoincrement_column> IS NULL" predicates to "<autoincrement_column> = LAST_INSERT_ID()" in the first SELECT following an INSERT regardless of whether they're top level predicates or not. This causes wrong and obscure results when these predicates are combined with others on the same columns. Fixed by only doing the transformation on a single top-level predicate if a special SQL mode is turned on (sql_auto_is_null). Also made sql_auto_is_null off by default. per-file comments: mysql-test/r/func_isnull.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" test result updated mysql-test/t/func_isnull.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test case added sql/mysqld.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" sql_auto_is_null now is OFF by default. sql/sql_select.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" remove_eq_conds() split in two parts - one only checks the upper condition, the req_remove_eq_conds() recursively checks all the condition tree. mysql-test/extra/rpl_tests/rpl_insert_id.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable) mysql-test/r/mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/mysqlbinlog2.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/odbc.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/query_cache.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/user_var-binlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_insert_id.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_sp.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/t/odbc.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable)
16 years ago
Added macros for nice TIMESPEC usage. Fixes for building MySQL with gcc 3.0 Added SIGNED / UNSIGNED casts Fixed core dump bug in net_clear() with libmysqld. Back to using semaphores in query cache. Added 'Null' and 'Index_type' to SHOW INDEX. BUILD/FINISH.sh: Fixes for gcc 3.0 BUILD/SETUP.sh: Fixes for gcc 3.0 Docs/manual.texi: Changelog + SIGNED/UNSIGNED casts. Makefile.am: include BUILD scripts in source distribution. client/Makefile.am: Fixes for gcc 3.0 client/mysql.cc: Cleanup client/mysqldump.c: Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys' client/readline.cc: Cleanup configure.in: Include BUILD in source distrbution extra/my_print_defaults.c: Cleanup include/my_global.h: Fix for HPUX and setrlimit. Portability fix. Added macros for nice TIMESPEC usage. innobase/include/dyn0dyn.h: Fix for AIX libmysql/Makefile.shared: Added strxmov to libmysqld libmysqld/examples/Makefile.am: Fixes for gcc 3.0 libmysqld/lib_vio.c: Cleanup myisam/ft_dump.c: Portability fixes myisam/ftdefs.h: Portability fixes mysql-test/r/bdb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/bigint.result: New test for SIGNED/UNSIGNED mysql-test/r/fulltext.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/heap.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/innodb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/isam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/key.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/myisam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/query_cache.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/select.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/show_check.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/type_ranges.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/t/bigint.test: New test for SIGNED/UNSIGNED mysql-test/t/key.test: New test for SIGNED/UNSIGNED mysql-test/t/query_cache.test: Test for FOUND_ROWS() sql-bench/crash-me.sh: Safety fixes sql/derror.cc: Cleanup sql/ha_berkeley.h: New test for SIGNED/UNSIGNED sql/ha_heap.h: New test for SIGNED/UNSIGNED sql/ha_innobase.cc: New test for SIGNED/UNSIGNED sql/ha_innobase.h: New test for SIGNED/UNSIGNED sql/ha_isam.h: New test for SIGNED/UNSIGNED sql/ha_myisam.cc: New test for SIGNED/UNSIGNED sql/ha_myisam.h: New test for SIGNED/UNSIGNED sql/handler.h: New test for SIGNED/UNSIGNED sql/item_func.cc: Cleanup TIMESPEC usage sql/item_func.h: Added SIGNED / UNSIGNED casts sql/lex.h: Added SIGNED / UNSIGNED casts sql/mysqld.cc: Cleanup TIMESPEC usage sql/net_pkg.cc: Cleanup sql/net_serv.cc: Fixed core dump bug in net_clear() sql/slave.cc: Cleanup sql/sql_cache.cc: Back to using semaphores sql/sql_cache.h: Back to using semaphores sql/sql_insert.cc: Cleanup TIMESPEC usage sql/sql_manager.cc: Cleanup TIMESPEC usage sql/sql_parse.cc: Cleanup sql/sql_repl.cc: Cleanup TIMESPEC usage sql/sql_show.cc: Added 'Null' and 'Index_type' to SHOW INDEX. sql/sql_table.cc: Sort keys in table in a more logical order. sql/sql_yacc.yy: Support for SIGNED/UNSIGNED casts.
24 years ago
Added macros for nice TIMESPEC usage. Fixes for building MySQL with gcc 3.0 Added SIGNED / UNSIGNED casts Fixed core dump bug in net_clear() with libmysqld. Back to using semaphores in query cache. Added 'Null' and 'Index_type' to SHOW INDEX. BUILD/FINISH.sh: Fixes for gcc 3.0 BUILD/SETUP.sh: Fixes for gcc 3.0 Docs/manual.texi: Changelog + SIGNED/UNSIGNED casts. Makefile.am: include BUILD scripts in source distribution. client/Makefile.am: Fixes for gcc 3.0 client/mysql.cc: Cleanup client/mysqldump.c: Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys' client/readline.cc: Cleanup configure.in: Include BUILD in source distrbution extra/my_print_defaults.c: Cleanup include/my_global.h: Fix for HPUX and setrlimit. Portability fix. Added macros for nice TIMESPEC usage. innobase/include/dyn0dyn.h: Fix for AIX libmysql/Makefile.shared: Added strxmov to libmysqld libmysqld/examples/Makefile.am: Fixes for gcc 3.0 libmysqld/lib_vio.c: Cleanup myisam/ft_dump.c: Portability fixes myisam/ftdefs.h: Portability fixes mysql-test/r/bdb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/bigint.result: New test for SIGNED/UNSIGNED mysql-test/r/fulltext.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/heap.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/innodb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/isam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/key.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/myisam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/query_cache.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/select.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/show_check.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/type_ranges.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/t/bigint.test: New test for SIGNED/UNSIGNED mysql-test/t/key.test: New test for SIGNED/UNSIGNED mysql-test/t/query_cache.test: Test for FOUND_ROWS() sql-bench/crash-me.sh: Safety fixes sql/derror.cc: Cleanup sql/ha_berkeley.h: New test for SIGNED/UNSIGNED sql/ha_heap.h: New test for SIGNED/UNSIGNED sql/ha_innobase.cc: New test for SIGNED/UNSIGNED sql/ha_innobase.h: New test for SIGNED/UNSIGNED sql/ha_isam.h: New test for SIGNED/UNSIGNED sql/ha_myisam.cc: New test for SIGNED/UNSIGNED sql/ha_myisam.h: New test for SIGNED/UNSIGNED sql/handler.h: New test for SIGNED/UNSIGNED sql/item_func.cc: Cleanup TIMESPEC usage sql/item_func.h: Added SIGNED / UNSIGNED casts sql/lex.h: Added SIGNED / UNSIGNED casts sql/mysqld.cc: Cleanup TIMESPEC usage sql/net_pkg.cc: Cleanup sql/net_serv.cc: Fixed core dump bug in net_clear() sql/slave.cc: Cleanup sql/sql_cache.cc: Back to using semaphores sql/sql_cache.h: Back to using semaphores sql/sql_insert.cc: Cleanup TIMESPEC usage sql/sql_manager.cc: Cleanup TIMESPEC usage sql/sql_parse.cc: Cleanup sql/sql_repl.cc: Cleanup TIMESPEC usage sql/sql_show.cc: Added 'Null' and 'Index_type' to SHOW INDEX. sql/sql_table.cc: Sort keys in table in a more logical order. sql/sql_yacc.yy: Support for SIGNED/UNSIGNED casts.
24 years ago
Added macros for nice TIMESPEC usage. Fixes for building MySQL with gcc 3.0 Added SIGNED / UNSIGNED casts Fixed core dump bug in net_clear() with libmysqld. Back to using semaphores in query cache. Added 'Null' and 'Index_type' to SHOW INDEX. BUILD/FINISH.sh: Fixes for gcc 3.0 BUILD/SETUP.sh: Fixes for gcc 3.0 Docs/manual.texi: Changelog + SIGNED/UNSIGNED casts. Makefile.am: include BUILD scripts in source distribution. client/Makefile.am: Fixes for gcc 3.0 client/mysql.cc: Cleanup client/mysqldump.c: Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys' client/readline.cc: Cleanup configure.in: Include BUILD in source distrbution extra/my_print_defaults.c: Cleanup include/my_global.h: Fix for HPUX and setrlimit. Portability fix. Added macros for nice TIMESPEC usage. innobase/include/dyn0dyn.h: Fix for AIX libmysql/Makefile.shared: Added strxmov to libmysqld libmysqld/examples/Makefile.am: Fixes for gcc 3.0 libmysqld/lib_vio.c: Cleanup myisam/ft_dump.c: Portability fixes myisam/ftdefs.h: Portability fixes mysql-test/r/bdb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/bigint.result: New test for SIGNED/UNSIGNED mysql-test/r/fulltext.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/heap.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/innodb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/isam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/key.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/myisam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/query_cache.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/select.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/show_check.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/type_ranges.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/t/bigint.test: New test for SIGNED/UNSIGNED mysql-test/t/key.test: New test for SIGNED/UNSIGNED mysql-test/t/query_cache.test: Test for FOUND_ROWS() sql-bench/crash-me.sh: Safety fixes sql/derror.cc: Cleanup sql/ha_berkeley.h: New test for SIGNED/UNSIGNED sql/ha_heap.h: New test for SIGNED/UNSIGNED sql/ha_innobase.cc: New test for SIGNED/UNSIGNED sql/ha_innobase.h: New test for SIGNED/UNSIGNED sql/ha_isam.h: New test for SIGNED/UNSIGNED sql/ha_myisam.cc: New test for SIGNED/UNSIGNED sql/ha_myisam.h: New test for SIGNED/UNSIGNED sql/handler.h: New test for SIGNED/UNSIGNED sql/item_func.cc: Cleanup TIMESPEC usage sql/item_func.h: Added SIGNED / UNSIGNED casts sql/lex.h: Added SIGNED / UNSIGNED casts sql/mysqld.cc: Cleanup TIMESPEC usage sql/net_pkg.cc: Cleanup sql/net_serv.cc: Fixed core dump bug in net_clear() sql/slave.cc: Cleanup sql/sql_cache.cc: Back to using semaphores sql/sql_cache.h: Back to using semaphores sql/sql_insert.cc: Cleanup TIMESPEC usage sql/sql_manager.cc: Cleanup TIMESPEC usage sql/sql_parse.cc: Cleanup sql/sql_repl.cc: Cleanup TIMESPEC usage sql/sql_show.cc: Added 'Null' and 'Index_type' to SHOW INDEX. sql/sql_table.cc: Sort keys in table in a more logical order. sql/sql_yacc.yy: Support for SIGNED/UNSIGNED casts.
24 years ago
Added macros for nice TIMESPEC usage. Fixes for building MySQL with gcc 3.0 Added SIGNED / UNSIGNED casts Fixed core dump bug in net_clear() with libmysqld. Back to using semaphores in query cache. Added 'Null' and 'Index_type' to SHOW INDEX. BUILD/FINISH.sh: Fixes for gcc 3.0 BUILD/SETUP.sh: Fixes for gcc 3.0 Docs/manual.texi: Changelog + SIGNED/UNSIGNED casts. Makefile.am: include BUILD scripts in source distribution. client/Makefile.am: Fixes for gcc 3.0 client/mysql.cc: Cleanup client/mysqldump.c: Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys' client/readline.cc: Cleanup configure.in: Include BUILD in source distrbution extra/my_print_defaults.c: Cleanup include/my_global.h: Fix for HPUX and setrlimit. Portability fix. Added macros for nice TIMESPEC usage. innobase/include/dyn0dyn.h: Fix for AIX libmysql/Makefile.shared: Added strxmov to libmysqld libmysqld/examples/Makefile.am: Fixes for gcc 3.0 libmysqld/lib_vio.c: Cleanup myisam/ft_dump.c: Portability fixes myisam/ftdefs.h: Portability fixes mysql-test/r/bdb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/bigint.result: New test for SIGNED/UNSIGNED mysql-test/r/fulltext.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/heap.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/innodb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/isam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/key.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/myisam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/query_cache.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/select.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/show_check.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/type_ranges.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/t/bigint.test: New test for SIGNED/UNSIGNED mysql-test/t/key.test: New test for SIGNED/UNSIGNED mysql-test/t/query_cache.test: Test for FOUND_ROWS() sql-bench/crash-me.sh: Safety fixes sql/derror.cc: Cleanup sql/ha_berkeley.h: New test for SIGNED/UNSIGNED sql/ha_heap.h: New test for SIGNED/UNSIGNED sql/ha_innobase.cc: New test for SIGNED/UNSIGNED sql/ha_innobase.h: New test for SIGNED/UNSIGNED sql/ha_isam.h: New test for SIGNED/UNSIGNED sql/ha_myisam.cc: New test for SIGNED/UNSIGNED sql/ha_myisam.h: New test for SIGNED/UNSIGNED sql/handler.h: New test for SIGNED/UNSIGNED sql/item_func.cc: Cleanup TIMESPEC usage sql/item_func.h: Added SIGNED / UNSIGNED casts sql/lex.h: Added SIGNED / UNSIGNED casts sql/mysqld.cc: Cleanup TIMESPEC usage sql/net_pkg.cc: Cleanup sql/net_serv.cc: Fixed core dump bug in net_clear() sql/slave.cc: Cleanup sql/sql_cache.cc: Back to using semaphores sql/sql_cache.h: Back to using semaphores sql/sql_insert.cc: Cleanup TIMESPEC usage sql/sql_manager.cc: Cleanup TIMESPEC usage sql/sql_parse.cc: Cleanup sql/sql_repl.cc: Cleanup TIMESPEC usage sql/sql_show.cc: Added 'Null' and 'Index_type' to SHOW INDEX. sql/sql_table.cc: Sort keys in table in a more logical order. sql/sql_yacc.yy: Support for SIGNED/UNSIGNED casts.
24 years ago
Added macros for nice TIMESPEC usage. Fixes for building MySQL with gcc 3.0 Added SIGNED / UNSIGNED casts Fixed core dump bug in net_clear() with libmysqld. Back to using semaphores in query cache. Added 'Null' and 'Index_type' to SHOW INDEX. BUILD/FINISH.sh: Fixes for gcc 3.0 BUILD/SETUP.sh: Fixes for gcc 3.0 Docs/manual.texi: Changelog + SIGNED/UNSIGNED casts. Makefile.am: include BUILD scripts in source distribution. client/Makefile.am: Fixes for gcc 3.0 client/mysql.cc: Cleanup client/mysqldump.c: Changed 'K' to mean 'disable-keys' instead of 'no-disabled-keys' client/readline.cc: Cleanup configure.in: Include BUILD in source distrbution extra/my_print_defaults.c: Cleanup include/my_global.h: Fix for HPUX and setrlimit. Portability fix. Added macros for nice TIMESPEC usage. innobase/include/dyn0dyn.h: Fix for AIX libmysql/Makefile.shared: Added strxmov to libmysqld libmysqld/examples/Makefile.am: Fixes for gcc 3.0 libmysqld/lib_vio.c: Cleanup myisam/ft_dump.c: Portability fixes myisam/ftdefs.h: Portability fixes mysql-test/r/bdb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/bigint.result: New test for SIGNED/UNSIGNED mysql-test/r/fulltext.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/heap.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/innodb.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/isam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/key.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/myisam.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/query_cache.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/select.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/show_check.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/r/type_ranges.result: Cleanup results after adding 2 columns to SHOW KEYS mysql-test/t/bigint.test: New test for SIGNED/UNSIGNED mysql-test/t/key.test: New test for SIGNED/UNSIGNED mysql-test/t/query_cache.test: Test for FOUND_ROWS() sql-bench/crash-me.sh: Safety fixes sql/derror.cc: Cleanup sql/ha_berkeley.h: New test for SIGNED/UNSIGNED sql/ha_heap.h: New test for SIGNED/UNSIGNED sql/ha_innobase.cc: New test for SIGNED/UNSIGNED sql/ha_innobase.h: New test for SIGNED/UNSIGNED sql/ha_isam.h: New test for SIGNED/UNSIGNED sql/ha_myisam.cc: New test for SIGNED/UNSIGNED sql/ha_myisam.h: New test for SIGNED/UNSIGNED sql/handler.h: New test for SIGNED/UNSIGNED sql/item_func.cc: Cleanup TIMESPEC usage sql/item_func.h: Added SIGNED / UNSIGNED casts sql/lex.h: Added SIGNED / UNSIGNED casts sql/mysqld.cc: Cleanup TIMESPEC usage sql/net_pkg.cc: Cleanup sql/net_serv.cc: Fixed core dump bug in net_clear() sql/slave.cc: Cleanup sql/sql_cache.cc: Back to using semaphores sql/sql_cache.h: Back to using semaphores sql/sql_insert.cc: Cleanup TIMESPEC usage sql/sql_manager.cc: Cleanup TIMESPEC usage sql/sql_parse.cc: Cleanup sql/sql_repl.cc: Cleanup TIMESPEC usage sql/sql_show.cc: Added 'Null' and 'Index_type' to SHOW INDEX. sql/sql_table.cc: Sort keys in table in a more logical order. sql/sql_yacc.yy: Support for SIGNED/UNSIGNED casts.
24 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
Added SQLSTATE to client/server protocol bmove_allign -> bmove_align Added OLAP function ROLLUP Split mysql_fix_privilege_tables to a script and a .sql data file Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects. Added table_alias_charset, for easier --lower-case-table-name handling Better SQL_MODE handling (Setting complex options also sets sub options) New (faster) assembler string functions for x86 BitKeeper/etc/ignore: added libmysqld/sql_state.c client/mysql.cc: Added SQLSTATE to error messages Added new function put_error() to be able to clean up some old code. client/mysqltest.c: Write ERROR SQLSTATE for all errors dbug/dbug.c: Portability fixes include/m_string.h: Rename bmove_allign as bmove_align include/mysql.h: Added SQLSTATE (for embedded version) include/mysql_com.h: Send correct SQLSTATE for the error to the client libmysql/libmysql.c: Changed default error state to HY000 Applied code cleanup patch libmysqld/Makefile.am: Added sql_state.cc libmysqld/libmysqld.c: Added sqlstate mysql-test/r/analyse.result: Updated results mysql-test/r/ansi.result: Updated results mysql-test/r/auto_increment.result: Updated results mysql-test/r/bdb-deadlock.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/comments.result: Updated results mysql-test/r/create.result: Updated results mysql-test/r/ctype_collate.result: Updated results mysql-test/r/delayed.result: Updated results mysql-test/r/delete.result: Updated results mysql-test/r/derived.result: Updated results mysql-test/r/distinct.result: Updated results mysql-test/r/drop.result: Updated results mysql-test/r/err000001.result: Updated results mysql-test/r/explain.result: Updated results mysql-test/r/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/func_gconcat.result: Updated results mysql-test/r/func_system.result: Updated results mysql-test/r/grant_cache.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/handler.result: Updated results mysql-test/r/heap.result: Updated results mysql-test/r/heap_btree.result: Updated results mysql-test/r/heap_hash.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/insert_update.result: Updated results mysql-test/r/join.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.result: Updated results mysql-test/r/lock.result: Updated results mysql-test/r/lock_multi.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/multi_update.result: Updated results mysql-test/r/myisam.result: Updated results mysql-test/r/null.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/packet.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_log.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/select_safe.result: Updated results mysql-test/r/show_check.result: Updated results mysql-test/r/sql_mode.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/truncate.result: Updated results mysql-test/r/type_blob.result: Updated results mysql-test/r/type_decimal.result: Updated results mysql-test/r/type_float.result: Updated results mysql-test/r/type_ranges.result: Updated results mysql-test/r/union.result: Updated results mysql-test/r/update.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/r/varbinary.result: Updated results mysql-test/r/variables.result: Updated results mysql-test/t/ansi.test: Test of sql_mode mysql-test/t/derived.test: Updated results mysql-test/t/func_system.test: Make this independen of the MySQL server name mysql-test/t/lowercase_table.test: Cleanup mysql-test/t/olap.test: A lot of new tests mysql-test/t/sql_mode.test: More test for sql_mode mysql-test/t/subselect.test: Added a few new tests (to find a bug in the item_ref code) scripts/Makefile.am: Added mysql_fix_privilege_tables.sql scripts/mysql_fix_privilege_tables.sh: Totally new script. This bascily just pipes mysql_fix_privilege_tables.sql through 'mysql' to 'mysqld' sql/Makefile.am: Added sql_state.cc sql/item.cc: Extended Item_field::eq() to be able to better match GROUP BY fields on the command line. Needed for ROLLUP sql/item.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/item_sum.cc: Moved copy_or_same() and some reset() functions from item_sum.h Needed to be able to access thd->mem_root. sql/item_sum.h: Moved some functions to item_sum.cc Added make_unique() for ROLLUP sql/item_uniq.h: Fixed return value sql/mysql_priv.h: Updated MODE flags sql/mysqld.cc: Added ANSI as it's own mode Moved charset_info variables here Cleaned up handler_count handling (for NT) Added table_alias_charset, for easier --lower-case-table-name handling sql/net_serv.cc: New comment sql/protocol.cc: Send SQLSTATE to client sql/set_var.cc: Better SQL_MODE handling (Setting complex options also sets sub options) sql/set_var.h: Better SQL_MODE handling sql/sql_base.cc: Make alias depend on --lower-case-table-names Make find_item_in_list also check database name sql/sql_cache.cc: Indentation cleanup sql/sql_list.h: Added safety assert Addes support of alloc without current_thd() sql/sql_prepare.cc: Update after prototype change sql/sql_select.cc: Added ROLLUP sql/sql_select.h: structures for rollup sql/sql_show.cc: Easier SQL_MODE handling sql/sql_string.cc: Move CHARSET_INFO to mysqld (to be together with all other global variables) sql/sql_string.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/sql_table.cc: Simpler --lower-case-table-name handling sql/sql_union.cc: Update after prototype change sql/sql_yacc.yy: ROLLUP sql/unireg.h: bmove_allign ->bmove_align strings/Makefile.am: Fix to be able to compile str_test.c strings/ctype.c: Removed empty lines strings/str_test.c: Added test of bmove_align strings/strings-x86.s: Faster bmove_align, bmove_upp and strmake strings/strings.asm: move_allg
23 years ago
Added SQLSTATE to client/server protocol bmove_allign -> bmove_align Added OLAP function ROLLUP Split mysql_fix_privilege_tables to a script and a .sql data file Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects. Added table_alias_charset, for easier --lower-case-table-name handling Better SQL_MODE handling (Setting complex options also sets sub options) New (faster) assembler string functions for x86 BitKeeper/etc/ignore: added libmysqld/sql_state.c client/mysql.cc: Added SQLSTATE to error messages Added new function put_error() to be able to clean up some old code. client/mysqltest.c: Write ERROR SQLSTATE for all errors dbug/dbug.c: Portability fixes include/m_string.h: Rename bmove_allign as bmove_align include/mysql.h: Added SQLSTATE (for embedded version) include/mysql_com.h: Send correct SQLSTATE for the error to the client libmysql/libmysql.c: Changed default error state to HY000 Applied code cleanup patch libmysqld/Makefile.am: Added sql_state.cc libmysqld/libmysqld.c: Added sqlstate mysql-test/r/analyse.result: Updated results mysql-test/r/ansi.result: Updated results mysql-test/r/auto_increment.result: Updated results mysql-test/r/bdb-deadlock.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/comments.result: Updated results mysql-test/r/create.result: Updated results mysql-test/r/ctype_collate.result: Updated results mysql-test/r/delayed.result: Updated results mysql-test/r/delete.result: Updated results mysql-test/r/derived.result: Updated results mysql-test/r/distinct.result: Updated results mysql-test/r/drop.result: Updated results mysql-test/r/err000001.result: Updated results mysql-test/r/explain.result: Updated results mysql-test/r/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/func_gconcat.result: Updated results mysql-test/r/func_system.result: Updated results mysql-test/r/grant_cache.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/handler.result: Updated results mysql-test/r/heap.result: Updated results mysql-test/r/heap_btree.result: Updated results mysql-test/r/heap_hash.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/insert_update.result: Updated results mysql-test/r/join.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.result: Updated results mysql-test/r/lock.result: Updated results mysql-test/r/lock_multi.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/multi_update.result: Updated results mysql-test/r/myisam.result: Updated results mysql-test/r/null.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/packet.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_log.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/select_safe.result: Updated results mysql-test/r/show_check.result: Updated results mysql-test/r/sql_mode.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/truncate.result: Updated results mysql-test/r/type_blob.result: Updated results mysql-test/r/type_decimal.result: Updated results mysql-test/r/type_float.result: Updated results mysql-test/r/type_ranges.result: Updated results mysql-test/r/union.result: Updated results mysql-test/r/update.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/r/varbinary.result: Updated results mysql-test/r/variables.result: Updated results mysql-test/t/ansi.test: Test of sql_mode mysql-test/t/derived.test: Updated results mysql-test/t/func_system.test: Make this independen of the MySQL server name mysql-test/t/lowercase_table.test: Cleanup mysql-test/t/olap.test: A lot of new tests mysql-test/t/sql_mode.test: More test for sql_mode mysql-test/t/subselect.test: Added a few new tests (to find a bug in the item_ref code) scripts/Makefile.am: Added mysql_fix_privilege_tables.sql scripts/mysql_fix_privilege_tables.sh: Totally new script. This bascily just pipes mysql_fix_privilege_tables.sql through 'mysql' to 'mysqld' sql/Makefile.am: Added sql_state.cc sql/item.cc: Extended Item_field::eq() to be able to better match GROUP BY fields on the command line. Needed for ROLLUP sql/item.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/item_sum.cc: Moved copy_or_same() and some reset() functions from item_sum.h Needed to be able to access thd->mem_root. sql/item_sum.h: Moved some functions to item_sum.cc Added make_unique() for ROLLUP sql/item_uniq.h: Fixed return value sql/mysql_priv.h: Updated MODE flags sql/mysqld.cc: Added ANSI as it's own mode Moved charset_info variables here Cleaned up handler_count handling (for NT) Added table_alias_charset, for easier --lower-case-table-name handling sql/net_serv.cc: New comment sql/protocol.cc: Send SQLSTATE to client sql/set_var.cc: Better SQL_MODE handling (Setting complex options also sets sub options) sql/set_var.h: Better SQL_MODE handling sql/sql_base.cc: Make alias depend on --lower-case-table-names Make find_item_in_list also check database name sql/sql_cache.cc: Indentation cleanup sql/sql_list.h: Added safety assert Addes support of alloc without current_thd() sql/sql_prepare.cc: Update after prototype change sql/sql_select.cc: Added ROLLUP sql/sql_select.h: structures for rollup sql/sql_show.cc: Easier SQL_MODE handling sql/sql_string.cc: Move CHARSET_INFO to mysqld (to be together with all other global variables) sql/sql_string.h: Added function to be able to avoid calling current_thd() when doing new Item. sql/sql_table.cc: Simpler --lower-case-table-name handling sql/sql_union.cc: Update after prototype change sql/sql_yacc.yy: ROLLUP sql/unireg.h: bmove_allign ->bmove_align strings/Makefile.am: Fix to be able to compile str_test.c strings/ctype.c: Removed empty lines strings/str_test.c: Added test of bmove_align strings/strings-x86.s: Faster bmove_align, bmove_upp and strmake strings/strings.asm: move_allg
23 years ago
WL#4189 - dynamic configuration support - safe process - cleanups - create new suite for fedarated BitKeeper/deleted/.del-basic.test: Rename: mysql-test/ndb/basic.test -> BitKeeper/deleted/.del-basic.test BitKeeper/deleted/.del-basic_log.result: Rename: mysql-test/ndb/basic_log.result -> BitKeeper/deleted/.del-basic_log.result mysql-test/suite/federated/federated_transactions.result: Rename: mysql-test/r/federated_transactions.result -> mysql-test/suite/federated/federated_transactions.result BitKeeper/deleted/.del-have_bug25714.require: Rename: mysql-test/r/have_bug25714.require -> BitKeeper/deleted/.del-have_bug25714.require BitKeeper/deleted/.del-kill_master.sh: Rename: mysql-test/misc/kill_master.sh -> BitKeeper/deleted/.del-kill_master.sh BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a: Rename: mysql-test/ndb/ndb_config_4_node.ini -> BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a BitKeeper/deleted/.del-restart.result: Rename: mysql-test/ndb/restart.result -> BitKeeper/deleted/.del-restart.result mysql-test/suite/federated/federated_cleanup.inc: Rename: mysql-test/include/federated_cleanup.inc -> mysql-test/suite/federated/federated_cleanup.inc mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt: Rename: mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi -> mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt BitKeeper/deleted/.del-install_test_db.sh: Rename: mysql-test/install_test_db.sh -> BitKeeper/deleted/.del-install_test_db.sh BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16: Rename: mysql-test/ndb/ndb_config_1_node.ini -> BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16 BitKeeper/deleted/.del-mtr_timer.pl: Rename: mysql-test/lib/mtr_timer.pl -> BitKeeper/deleted/.del-mtr_timer.pl BitKeeper/deleted/.del-create-test-result: Rename: mysql-test/create-test-result -> BitKeeper/deleted/.del-create-test-result BitKeeper/deleted/.del-fix-result: Rename: mysql-test/fix-result -> BitKeeper/deleted/.del-fix-result BitKeeper/deleted/.del-mysql-test-run-shell.sh: Rename: mysql-test/mysql-test-run-shell.sh -> BitKeeper/deleted/.del-mysql-test-run-shell.sh BitKeeper/deleted/.del-mysql-test_V1.9.pl: Rename: mysql-test/misc/mysql-test_V1.9.pl -> BitKeeper/deleted/.del-mysql-test_V1.9.pl BitKeeper/deleted/.del-resolve-stack: Rename: mysql-test/resolve-stack -> BitKeeper/deleted/.del-resolve-stack BitKeeper/deleted/.del-restart_log.result: Rename: mysql-test/ndb/restart_log.result -> BitKeeper/deleted/.del-restart_log.result mysql-test/suite/rpl/t/rpl_000015-slave.opt: Rename: mysql-test/suite/rpl/t/rpl_000015.slave-mi -> mysql-test/suite/rpl/t/rpl_000015-slave.opt BitKeeper/deleted/.del-ndb_config_2_node.ini: Rename: mysql-test/ndb/ndb_config_2_node.ini -> BitKeeper/deleted/.del-ndb_config_2_node.ini BitKeeper/deleted/.del-ndbcluster.sh: Rename: mysql-test/ndb/ndbcluster.sh -> BitKeeper/deleted/.del-ndbcluster.sh BitKeeper/deleted/.del-basic.result: Rename: mysql-test/ndb/basic.result -> BitKeeper/deleted/.del-basic.result BitKeeper/deleted/.del-restart.test: Rename: mysql-test/ndb/restart.test -> BitKeeper/deleted/.del-restart.test BitKeeper/deleted/.del-have_bug25714.inc: Rename: mysql-test/include/have_bug25714.inc -> BitKeeper/deleted/.del-have_bug25714.inc BitKeeper/deleted/.del-mtr_diff.pl: Rename: mysql-test/lib/mtr_diff.pl -> BitKeeper/deleted/.del-mtr_diff.pl mysql-test/suite/federated/federated_transactions-slave.opt: Rename: mysql-test/t/federated_transactions-slave.opt -> mysql-test/suite/federated/federated_transactions-slave.opt BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b: Rename: mysql-test/ndb/Makefile.am -> BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949: Rename: mysql-test/lib/mtr_im.pl -> BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949 mysql-test/suite/federated/federated_innodb-slave.opt: Rename: mysql-test/t/federated_innodb-slave.opt -> mysql-test/suite/federated/federated_innodb-slave.opt client/mysqltest.c: Use current files path first when looking for include file configure.in: Remove mysql-test/nbd mysql-test/Makefile.am: Cleanup mysql-test/Makefile.am mysql-test/extra/binlog_tests/blackhole.test: Use new paths mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Use new paths mysql-test/mysql-test-run.pl: Dynamic configuration support Safe process mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test: Use new paths mysql-test/extra/rpl_tests/rpl_EE_err.test: Use new paths mysql-test/extra/rpl_tests/rpl_loaddata.test: Use new paths mysql-test/extra/rpl_tests/rpl_log.test: Use new paths mysql-test/extra/rpl_tests/rpl_row_001.test: Use new paths mysql-test/extra/rpl_tests/rpl_row_charset.test: Use new paths mysql-test/extra/rpl_tests/rpl_stm_000001.test: Use new paths mysql-test/extra/rpl_tests/rpl_stm_charset.test: Use new paths mysql-test/include/have_blackhole.inc: Use new paths mysql-test/include/have_ndbapi_examples.inc: Use new paths mysql-test/include/loaddata_autocom.inc: Use new paths mysql-test/include/mix1.inc: Use new paths mysql-test/include/ndb_backup.inc: Use new paths mysql-test/include/ndb_restore_master.inc: Use new paths mysql-test/include/ndb_restore_slave_eoption.inc: Use new paths mysql-test/include/testdb_only.inc: Use new paths mysql-test/lib/My/Config.pm: dynamic configuration safe process cleanups mysql-test/lib/mtr_cases.pm: dynamic configuration safe process cleanups mysql-test/lib/mtr_io.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_misc.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_process.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_report.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_stress.pl: dynamic configuration safe process cleanups mysql-test/r/backup.result: Use new paths mysql-test/r/ctype_big5.result: Use new paths mysql-test/r/gis.result: Use new paths mysql-test/r/loaddata.result: Use new paths mysql-test/r/loaddata_autocom_innodb.result: Use new paths mysql-test/r/mysqlbinlog.result: Use new paths mysql-test/r/mysqlbinlog_base64.result: Use new paths mysql-test/r/outfile.result: Use new paths mysql-test/r/partition_error.result: Use new paths mysql-test/r/partition_not_windows.result: Use new paths mysql-test/r/partition_symlink.result: Use new paths mysql-test/r/query_cache.result: Use new paths mysql-test/r/sp.result: Use new paths mysql-test/r/symlink.result: Use new paths mysql-test/r/system_mysql_db.result: Use new paths mysql-test/r/trigger.result: Use new paths mysql-test/r/type_blob.result: Use new paths mysql-test/r/view.result: Use new paths mysql-test/r/warnings.result: Use new paths mysql-test/suite/binlog/r/binlog_killed_simulate.result: Use new paths mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Use new paths mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Use new paths mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Use new paths mysql-test/suite/binlog/t/binlog_killed.test: Use new paths mysql-test/suite/binlog/t/binlog_killed_simulate.test: Use new paths mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Use new paths mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: Use new paths mysql-test/suite/federated/federated.inc: Use new paths mysql-test/suite/federated/federated.result: Use new paths mysql-test/suite/federated/federated.test: Use new paths mysql-test/suite/federated/federated_archive.result: Use new paths mysql-test/suite/federated/federated_archive.test: Use new paths mysql-test/suite/federated/federated_bug_13118.result: Use new paths mysql-test/suite/federated/federated_bug_13118.test: Use new paths mysql-test/suite/federated/federated_bug_25714.result: Use new paths mysql-test/suite/federated/federated_bug_25714.test: Use new paths mysql-test/suite/federated/federated_innodb.result: Use new paths mysql-test/suite/federated/federated_innodb.test: Use new paths mysql-test/suite/federated/federated_server.result: Use new paths mysql-test/suite/federated/federated_server.test: Use new paths mysql-test/suite/federated/federated_transactions.test: Use new paths mysql-test/suite/federated/have_federated_db.inc: Use new paths mysql-test/suite/ndb/r/loaddata_autocom_ndb.result: Use new paths mysql-test/suite/ndb/r/ndb_config.result: Use new paths mysql-test/suite/ndb/r/ndb_dd_backuprestore.result: Use new paths mysql-test/suite/ndb/r/ndb_load.result: Use new paths mysql-test/suite/ndb/r/ndb_loaddatalocal.result: Use new paths mysql-test/suite/ndb/r/ndb_replace.result: Use new paths mysql-test/suite/ndb/r/ndb_restore.result: Use new paths mysql-test/suite/ndb/r/ndb_restore_partition.result: Use new paths mysql-test/suite/ndb/r/ndb_restore_print.result: Use new paths mysql-test/suite/ndb/r/ndb_trigger.result: Use new paths mysql-test/suite/ndb/t/ndb_alter_table.test: Use new paths mysql-test/suite/ndb/t/ndb_config.test: Use new paths mysql-test/suite/ndb/t/ndb_load.test: Use new paths mysql-test/suite/ndb/t/ndb_loaddatalocal.test: Use new paths mysql-test/suite/ndb/t/ndb_replace.test: Use new paths mysql-test/suite/ndb/t/ndb_restore.test: Use new paths mysql-test/suite/ndb/t/ndb_single_user.test: Use new paths mysql-test/suite/ndb/t/ndb_trigger.test: Use new paths mysql-test/suite/ndb/t/ndbapi.test: Use new paths mysql-test/suite/rpl/include/rpl_mixed_dml.inc: Use new paths mysql-test/suite/rpl/r/rpl_LD_INFILE.result: Use new paths mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Use new paths mysql-test/suite/rpl/r/rpl_innodb.result: Use new paths mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Use new paths mysql-test/suite/rpl/r/rpl_load_table_from_master.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_charset.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_m.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_s.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_simple.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Use new paths mysql-test/suite/rpl/r/rpl_loadfile.result: Use new paths mysql-test/suite/rpl/r/rpl_misc_functions.result: Use new paths mysql-test/suite/rpl/r/rpl_replicate_do.result: Use new paths mysql-test/suite/rpl/r/rpl_rewrt_db.result: Use new paths mysql-test/suite/rpl/r/rpl_row_001.result: Use new paths mysql-test/suite/rpl/r/rpl_row_loaddata_m.result: Use new paths mysql-test/suite/rpl/r/rpl_row_log.result: Use new paths mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Use new paths mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: Use new paths mysql-test/suite/rpl/r/rpl_stm_000001.result: Use new paths mysql-test/suite/rpl/r/rpl_stm_log.result: Use new paths mysql-test/suite/rpl/r/rpl_timezone.result: Use new paths mysql-test/suite/rpl/t/disabled.def: Use new paths mysql-test/suite/rpl/t/rpl000017-slave.sh: Use new paths mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Use new paths mysql-test/suite/rpl/t/rpl_drop_db.test: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Use new paths mysql-test/suite/rpl/t/rpl_innodb.test: Use new paths mysql-test/suite/rpl/t/rpl_innodb_bug30919.test: Use new paths mysql-test/suite/rpl/t/rpl_load_from_master.test: Use new paths mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_m.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_s.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Use new paths mysql-test/suite/rpl/t/rpl_loadfile.test: Use new paths mysql-test/suite/rpl/t/rpl_misc_functions.test: Use new paths mysql-test/suite/rpl/t/rpl_replicate_do.test: Use new paths mysql-test/suite/rpl/t/rpl_rewrt_db.test: Use new paths mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt: Use new paths mysql-test/suite/rpl/t/rpl_rotate_logs.test: Use new paths mysql-test/suite/rpl/t/rpl_row_charset_innodb.test: Use new paths mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Use new paths mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Use new paths mysql-test/suite/rpl/t/rpl_timezone.test: Use new paths mysql-test/suite/rpl/t/rpl_trigger.test: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: Use new paths mysql-test/t/backup.test: Use new paths mysql-test/t/bootstrap.test: Use new paths mysql-test/t/crash_commit_before.test: Use new paths mysql-test/t/create_not_windows.test: Use new paths mysql-test/t/csv.test: Use new paths mysql-test/t/ctype_big5.test: Use new paths mysql-test/t/disabled.def: Use new paths mysql-test/t/distinct.test: Use new paths mysql-test/t/gis.test: Use new paths mysql-test/t/grant_cache_no_prot.test: Use new paths mysql-test/t/grant_cache_ps_prot.test: Use new paths mysql-test/t/information_schema_chmod.test: Use new paths mysql-test/t/loaddata.test: Use new paths mysql-test/t/log_state.test: Use new paths mysql-test/t/myisam-system.test: Use new paths mysql-test/t/mysql_upgrade.test: Use new paths mysql-test/t/mysqlbinlog-cp932.test: Use new paths mysql-test/t/mysqlbinlog.test: Use new paths mysql-test/t/mysqlbinlog2.test: Use new paths mysql-test/t/mysqlbinlog_base64.test: Use new paths mysql-test/t/mysqldump.test: Use new paths mysql-test/t/outfile.test: Use new paths mysql-test/t/partition.test: Use new paths mysql-test/t/partition_error.test: Use new paths mysql-test/t/partition_federated.test: Use new paths mysql-test/t/partition_mgm.test: Use new paths mysql-test/t/partition_not_windows.test: Use new paths mysql-test/t/partition_symlink.test: Use new paths mysql-test/t/query_cache.test: Use new paths mysql-test/t/repair.test: Use new paths mysql-test/t/show_check.test: Use new paths mysql-test/t/sp-destruct.test: Use new paths mysql-test/t/sp.test: Use new paths mysql-test/t/symlink.test: Use new paths mysql-test/t/system_mysql_db.test: Use new paths mysql-test/t/system_mysql_db_fix30020.test: Use new paths mysql-test/t/system_mysql_db_fix40123.test: Use new paths mysql-test/t/system_mysql_db_fix50030.test: Use new paths mysql-test/t/system_mysql_db_fix50117.test: Use new paths mysql-test/t/trigger-compat.test: Use new paths mysql-test/t/trigger-grant.test: Use new paths mysql-test/t/trigger.test: Use new paths mysql-test/t/type_blob.test: Use new paths mysql-test/t/type_varchar.test: Use new paths mysql-test/t/upgrade.test: Use new paths mysql-test/t/user_var-binlog.test: Use new paths mysql-test/t/varbinary.test: Use new paths mysql-test/t/view.test: Use new paths mysql-test/t/warnings.test: Use new paths mysql-test/lib/My/ConfigFactory.pm: Initial version mysql-test/lib/My/Find.pm: Initial version mysql-test/lib/My/SafeProcess.pm: Initial version mysql-test/std_data/ndb_config_config.ini: Add "old" style config.ini for ndb mysql-test/suite/federated/disabled.def: Move disabled federated to it's new suite mysql-test/suite/federated/my.cnf: Add config for federated mysql-test/suite/ndb/my.cnf: Add config for ndb mysql-test/suite/rpl/my.cnf: Add config for rpl mysql-test/suite/rpl/rpl_1slave_base.cnf: Add base config for rpl mysql-test/suite/rpl/t/rpl_000015-master.opt: Use new paths mysql-test/suite/rpl_ndb/my.cnf: Add config for rpl_ndb mysql-test/lib/My/File/Path.pm: Initial version mysql-test/lib/My/SafeProcess/Base.pm: Initial version mysql-test/lib/My/SafeProcess/safe_kill_win.cc: Initial version mysql-test/lib/My/SafeProcess/safe_process.pl: Initial version mysql-test/lib/My/SafeProcess/safe_process_win.cc: Initial version mysql-test/lib/t/Base.t: Initial version mysql-test/lib/t/Find.t: Initial version mysql-test/lib/t/SafeProcess.t: Initial version mysql-test/lib/t/SafeProcessStress.pl: Initial version mysql-test/lib/t/copytree.t: Initial version mysql-test/lib/t/dummyd.pl: Initial version mysql-test/lib/t/rmtree.t: Initial version mysql-test/lib/t/testMyConfig.t: Initial version mysql-test/lib/t/testMyConfigFactory.t: Initial version mysql-test/lib/t/test_child.pl: Initial version mysql-test/include/default_my.cnf: Add default config file used when no suite specific file is found mysql-test/include/default_mysqld.cnf: New BitKeeper file ``mysql-test/include/default_mysqld.cnf'' mysql-test/include/default_ndbd.cnf: Add default settings for all ndbds mysql-test/lib/mtr_settings.pl: Initial version
18 years ago
Added --compact to mysqlbinlog Fixed output from mysqlbinlog when using --skip-comments Fixed warnings from valgrind Fixed ref_length when used with HEAP tables More efficent need_conversion() Fixed error handling in UPDATE with not updateable tables Fixed bug in null handling in CAST to signed/unsigned client/client_priv.h: cleanup & added OPT_COMPACT client/mysqldump.c: Added option --compact to get a compact readable dump. Ensure that SET CHARACTER_SET_CLIENT is not done if we have not remembered the old character set Print optimization comments even if --skip-comments are given as these are not true comments. (Before these where only printed at end, which was a bug) mysql-test/r/cast.result: More cast tests mysql-test/r/derived.result: Removed warnings mysql-test/r/mysqldump.result: Update results after fixing mysqlbinlog mysql-test/r/query_cache.result: Make test usable with --extern more tests mysql-test/r/rpl_until.result: Make test repeatable under valgrind mysql-test/r/sql_mode.result: Fix test result mysql-test/r/subselect.result: Make test smaller. Update wrong results mysql-test/t/cast.test: More cast tests mysql-test/t/derived.test: Removed warnings mysql-test/t/query_cache.test: Make test usable with --extern more tests mysql-test/t/rpl_until.test: fix for valgrind. Becasue of unknown reason one got 'Slave_SQL_Running=yes' in this setup mysql-test/t/subselect.test: Make test case smaller sql/field.cc: Updated need_conversion() to use new arguments sql/ha_heap.cc: Moved initialization of ref_length to right place. This fixed problem that we had a ref_length of 8 for heap tables, which was not efficent. sql/item_func.cc: Cleanup sql/item_func.h: Fixed bug in null_handling for cast to signed/unsigned sql/item_strfunc.cc: Optimized/cleaned up Item_func_conv_charset3 sql/item_sum.cc: Cleanup. Ensure that some flag variables are cleared in cleanup() sql/item_sum.h: Fixed references to uninitialized memory sql/opt_range.cc: Fixed spelling error sql/sql_class.cc: Fixed wrong return code, which could case protocol problems sql/sql_class.h: After merge fix sql/sql_prepare.cc: Added comments sql/sql_show.cc: Cleanup sql/sql_string.cc: Optimzed usage of need_conversion(). - Removed not used argument - Save diff lenght in 'offset' to not have to recalculate length several times. Cleaned up comment Optimized copy_aligned() based on the knowledge that it's only called when you have wrong data sql/sql_string.h: Updated need_conversion() and copy_aligned() to use new arguments sql/sql_update.cc: Fixed error handling with non-updateable tables sql/sql_yacc.yy: Ensure that lex->lock_options are set correctly (to get rid of warnings from valgrind) Ensure that cast_type sets lex->charset and lex->length. Without these CONVERT() didn't work properly
22 years ago
Added --compact to mysqlbinlog Fixed output from mysqlbinlog when using --skip-comments Fixed warnings from valgrind Fixed ref_length when used with HEAP tables More efficent need_conversion() Fixed error handling in UPDATE with not updateable tables Fixed bug in null handling in CAST to signed/unsigned client/client_priv.h: cleanup & added OPT_COMPACT client/mysqldump.c: Added option --compact to get a compact readable dump. Ensure that SET CHARACTER_SET_CLIENT is not done if we have not remembered the old character set Print optimization comments even if --skip-comments are given as these are not true comments. (Before these where only printed at end, which was a bug) mysql-test/r/cast.result: More cast tests mysql-test/r/derived.result: Removed warnings mysql-test/r/mysqldump.result: Update results after fixing mysqlbinlog mysql-test/r/query_cache.result: Make test usable with --extern more tests mysql-test/r/rpl_until.result: Make test repeatable under valgrind mysql-test/r/sql_mode.result: Fix test result mysql-test/r/subselect.result: Make test smaller. Update wrong results mysql-test/t/cast.test: More cast tests mysql-test/t/derived.test: Removed warnings mysql-test/t/query_cache.test: Make test usable with --extern more tests mysql-test/t/rpl_until.test: fix for valgrind. Becasue of unknown reason one got 'Slave_SQL_Running=yes' in this setup mysql-test/t/subselect.test: Make test case smaller sql/field.cc: Updated need_conversion() to use new arguments sql/ha_heap.cc: Moved initialization of ref_length to right place. This fixed problem that we had a ref_length of 8 for heap tables, which was not efficent. sql/item_func.cc: Cleanup sql/item_func.h: Fixed bug in null_handling for cast to signed/unsigned sql/item_strfunc.cc: Optimized/cleaned up Item_func_conv_charset3 sql/item_sum.cc: Cleanup. Ensure that some flag variables are cleared in cleanup() sql/item_sum.h: Fixed references to uninitialized memory sql/opt_range.cc: Fixed spelling error sql/sql_class.cc: Fixed wrong return code, which could case protocol problems sql/sql_class.h: After merge fix sql/sql_prepare.cc: Added comments sql/sql_show.cc: Cleanup sql/sql_string.cc: Optimzed usage of need_conversion(). - Removed not used argument - Save diff lenght in 'offset' to not have to recalculate length several times. Cleaned up comment Optimized copy_aligned() based on the knowledge that it's only called when you have wrong data sql/sql_string.h: Updated need_conversion() and copy_aligned() to use new arguments sql/sql_update.cc: Fixed error handling with non-updateable tables sql/sql_yacc.yy: Ensure that lex->lock_options are set correctly (to get rid of warnings from valgrind) Ensure that cast_type sets lex->charset and lex->length. Without these CONVERT() didn't work properly
22 years ago
Added --compact to mysqlbinlog Fixed output from mysqlbinlog when using --skip-comments Fixed warnings from valgrind Fixed ref_length when used with HEAP tables More efficent need_conversion() Fixed error handling in UPDATE with not updateable tables Fixed bug in null handling in CAST to signed/unsigned client/client_priv.h: cleanup & added OPT_COMPACT client/mysqldump.c: Added option --compact to get a compact readable dump. Ensure that SET CHARACTER_SET_CLIENT is not done if we have not remembered the old character set Print optimization comments even if --skip-comments are given as these are not true comments. (Before these where only printed at end, which was a bug) mysql-test/r/cast.result: More cast tests mysql-test/r/derived.result: Removed warnings mysql-test/r/mysqldump.result: Update results after fixing mysqlbinlog mysql-test/r/query_cache.result: Make test usable with --extern more tests mysql-test/r/rpl_until.result: Make test repeatable under valgrind mysql-test/r/sql_mode.result: Fix test result mysql-test/r/subselect.result: Make test smaller. Update wrong results mysql-test/t/cast.test: More cast tests mysql-test/t/derived.test: Removed warnings mysql-test/t/query_cache.test: Make test usable with --extern more tests mysql-test/t/rpl_until.test: fix for valgrind. Becasue of unknown reason one got 'Slave_SQL_Running=yes' in this setup mysql-test/t/subselect.test: Make test case smaller sql/field.cc: Updated need_conversion() to use new arguments sql/ha_heap.cc: Moved initialization of ref_length to right place. This fixed problem that we had a ref_length of 8 for heap tables, which was not efficent. sql/item_func.cc: Cleanup sql/item_func.h: Fixed bug in null_handling for cast to signed/unsigned sql/item_strfunc.cc: Optimized/cleaned up Item_func_conv_charset3 sql/item_sum.cc: Cleanup. Ensure that some flag variables are cleared in cleanup() sql/item_sum.h: Fixed references to uninitialized memory sql/opt_range.cc: Fixed spelling error sql/sql_class.cc: Fixed wrong return code, which could case protocol problems sql/sql_class.h: After merge fix sql/sql_prepare.cc: Added comments sql/sql_show.cc: Cleanup sql/sql_string.cc: Optimzed usage of need_conversion(). - Removed not used argument - Save diff lenght in 'offset' to not have to recalculate length several times. Cleaned up comment Optimized copy_aligned() based on the knowledge that it's only called when you have wrong data sql/sql_string.h: Updated need_conversion() and copy_aligned() to use new arguments sql/sql_update.cc: Fixed error handling with non-updateable tables sql/sql_yacc.yy: Ensure that lex->lock_options are set correctly (to get rid of warnings from valgrind) Ensure that cast_type sets lex->charset and lex->length. Without these CONVERT() didn't work properly
22 years ago
fixes for test failures and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
13 years ago
fixes for test failures and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
13 years ago
Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES <list> WITH READ LOCK are incompatible" to be pushed as separate patch. Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. Also replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it more consistent with other thread state names. Updated test cases and their results according to these changes. Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. mysql-test/r/query_cache.result: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/t/query_cache.test: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysys/thr_lock.c: Replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it consistent with thread state names which are used while waiting for metadata locks and table flush. sql/mdl.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/mdl.h: To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/sql_base.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for table flush, with a more elaborate "Waiting for table flush".
15 years ago
Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES <list> WITH READ LOCK are incompatible" to be pushed as separate patch. Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. Also replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it more consistent with other thread state names. Updated test cases and their results according to these changes. Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. mysql-test/r/query_cache.result: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/t/query_cache.test: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysys/thr_lock.c: Replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it consistent with thread state names which are used while waiting for metadata locks and table flush. sql/mdl.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/mdl.h: To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/sql_base.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for table flush, with a more elaborate "Waiting for table flush".
15 years ago
22 years ago
Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES <list> WITH READ LOCK are incompatible" to be pushed as separate patch. Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. Also replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it more consistent with other thread state names. Updated test cases and their results according to these changes. Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. mysql-test/r/query_cache.result: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/t/query_cache.test: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysys/thr_lock.c: Replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it consistent with thread state names which are used while waiting for metadata locks and table flush. sql/mdl.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/mdl.h: To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/sql_base.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for table flush, with a more elaborate "Waiting for table flush".
15 years ago
22 years ago
Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES <list> WITH READ LOCK are incompatible" to be pushed as separate patch. Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. Also replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it more consistent with other thread state names. Updated test cases and their results according to these changes. Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. mysql-test/r/query_cache.result: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test: Fixed sys_vars.query_cache_wlock_invalidate_func test to not to wait for timeout of wait_condition.inc script. Reverted changes to test which introduced timeout and replaced waiting condition with a more appropriate one. Test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables was added to query_cache.test. mysql-test/t/query_cache.test: Added test coverage for query_cache_wlock_invalidate behavior for implicitly locked tables. mysys/thr_lock.c: Replaced "Table lock" thread state name, which was used by threads waiting on thr_lock.c table level lock, with more elaborate "Waiting for table level lock", to make it consistent with thread state names which are used while waiting for metadata locks and table flush. sql/mdl.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for a metadata lock or table flush, with a set of names which better reflect types of resources being waited for. To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/mdl.h: To implement this: - Adjusted MDL_wait::timed_wait() to take thread state name as parameter. - Introduced method of MDL_key class which allows to get thread state name to be used while waiting for resource corresponding to the key and changed code to use it. Added array translating namespaces to thread state names as part of this change. sql/sql_base.cc: Replaced thread state name "Waiting for table", which was used by threads waiting for table flush, with a more elaborate "Waiting for table flush".
15 years ago
22 years ago
14 years ago
14 years ago
SHOW STATUS does not anymore change local status variables (except com_show_status). Global status variables are still updated. SHOW STATUS are not anymore put in slow query log because of no index usage. Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command() This simplifies code and allows us to remove some if statements all over the code. Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands. This allowed some overall simplifaction when testing sql_command. Fixes bugs: Bug#10210: running SHOW STATUS increments counters it shouldn't Bug#19764: SHOW commands end up in the slow log as table scans mysql-test/r/grant_cache.result: Fixed results after SHOW STATUS doesn't anymore affect status variables mysql-test/r/information_schema.result: Added extra test to cover more code mysql-test/r/query_cache.result: Remove resuts from previous tests mysql-test/r/status.result: Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables. (Bug#10210) mysql-test/r/temp_table.result: Fixed results after SHOW STATUS doesn't anymore affect status variables mysql-test/r/union.result: Fixed results after SHOW STATUS is not logged to slow query log (Bug#19764) mysql-test/t/events_microsec.test: Disable warnings at init mysql-test/t/information_schema.test: Added extra test to cover more code mysql-test/t/query_cache.test: Remove resuts from previous tests mysql-test/t/status.test: Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables. (Bug #10210) sql/mysql_priv.h: Added 'sql_command_flags' sql/sql_class.cc: New function add_diff_to_status(), used to update global status variables when using SHOW STATUS sql/sql_class.h: New function 'fill_information_schema_tables()' (One could not anymore use fill_derived_tables() for this as only_view_structures() is not relevant for information schema tables) Added defines for bit flags in sql_command_flags[] sql/sql_lex.cc: Remove orig_sql_command sql/sql_lex.h: Remove orig_sql_command sql/sql_parse.cc: Rename uc_update_queries -> sql_command_flags. Enhanced 'sql_command_flags' to better classify SQL commands uc_update_queries[] != 0 is changed to (sql_command_flags[] & CF_CHANGES_DATA) lex->orig_sql_command == SQLCOM_END is changed to (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0) Simplify incrementing of thd->status_var.com_stat[] as we don't have to do special handling for SHOW commands. Split SQLCOM_SELECT handling in mysql_execute_command() to a separate function. Added special handling of SHOW STATUS commands in mysql_execute_command() and call common SQLCOM_SELECT handling. These changes allows us to easily fix that we save and restore status variables during execution of a SHOW STATUS command. Don't log SHOW STATUS commands to slow query log. This fixes Bug#10210 and Bug#19764 without adding additional 'if' code. (The new code is faster than the original as we now have fewer if's than before) sql/sql_prepare.cc: Clean up prepare-check handling of SQLCOM commands by using sql_command_flags[] This simplifes code and ensures that code works even if someone forgets to put a new status commands into the switch statement. sql/sql_select.cc: Remove special handling of SHOW STATUS. (This is now done in SQLCOM_SHOW_STATUS part in mysql_execute_command()) sql/sql_show.cc: Remove orig_sql_command Only change sql_command during 'open_normal_and_derived_tables()' (for views) and not for the full duration of generating data. Changed 'show status' to use thd->initial_status_var to ensure that the current statement is not affecting the to-be-used values. Use thd->fill_information_schema_tables() instead of 'thd->fill_derived_tables()' as the later wrongly checks the value of sql_command. sql/sql_yacc.yy: Remove usage of orig_sql_command. One side effect of this is that we need to test for cursors if the current command is a SELECT or a SHOW command. sql/structs.h: Updated comment
20 years ago
MDEV-16708: Unsupported commands for prepared statements Withing this task the following changes were made: - Added sending of metadata info in prepare phase for the admin related command (check table, checksum table, repair, optimize, analyze). - Refactored implmentation of HELP command to support its execution in PS mode - Added support for execution of LOAD INTO and XA- related statements in PS mode - Modified mysqltest.cc to run statements in PS mode unconditionally in case the option --ps-protocol is set. Formerly, only those statements were executed using PS protocol that matched the hard-coded regular expression - Fixed the following issues: The statement explain select (select 2) executed in regular and PS mode produces different results: MariaDB [test]> prepare stmt from "explain select (select 2)"; Query OK, 0 rows affected (0,000 sec) Statement prepared MariaDB [test]> execute stmt; +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | PRIMARY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | | 2 | SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 2 rows in set (0,000 sec) MariaDB [test]> explain select (select 2); +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 1 row in set, 1 warning (0,000 sec) In case the statement CREATE TABLE t1 SELECT * FROM (SELECT 1 AS a, (SELECT a+0)) a is run in PS mode it fails with the error ERROR 1054 (42S22): Unknown column 'a' in 'field list'. - Uniform handling of read-only variables both in case the SET var=val statement is executed as regular or prepared statememt. - Fixed assertion firing on handling LOAD DATA statement for temporary tables - Relaxed assert condition in the function lex_end_stage1() by adding the commands SQLCOM_ALTER_EVENT, SQLCOM_CREATE_PACKAGE, SQLCOM_CREATE_PACKAGE_BODY to a list of supported command - Removed raising of the error ER_UNSUPPORTED_PS in the function check_prepared_statement() for the ALTER VIEW command - Added initialization of the data memember st_select_lex_unit::last_procedure (assign NULL value) in the constructor Without this change the test case main.ctype_utf8 fails with the following report in case it is run with the optoin --ps-protocol. mysqltest: At line 2278: query 'VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin)' failed: 2013: Lost connection - The following bug reports were fixed: MDEV-24460: Multiple rows result set returned from stored routine over prepared statement binary protocol is handled incorrectly CONC-519: mariadb client library doesn't handle server_status and warnign_count fields received in the packet COM_STMT_EXECUTE_RESPONSE. Reasons for these bug reports have the same nature and caused by missing loop iteration on results sent by server in response to COM_STMT_EXECUTE packet. Enclosing of statements for processing of COM_STMT_EXECUTE response in the construct like do { ... } while (!mysql_stmt_next_result()); fixes the above mentioned bug reports.
5 years ago
MDEV-16708: Unsupported commands for prepared statements Withing this task the following changes were made: - Added sending of metadata info in prepare phase for the admin related command (check table, checksum table, repair, optimize, analyze). - Refactored implmentation of HELP command to support its execution in PS mode - Added support for execution of LOAD INTO and XA- related statements in PS mode - Modified mysqltest.cc to run statements in PS mode unconditionally in case the option --ps-protocol is set. Formerly, only those statements were executed using PS protocol that matched the hard-coded regular expression - Fixed the following issues: The statement explain select (select 2) executed in regular and PS mode produces different results: MariaDB [test]> prepare stmt from "explain select (select 2)"; Query OK, 0 rows affected (0,000 sec) Statement prepared MariaDB [test]> execute stmt; +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | PRIMARY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | | 2 | SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 2 rows in set (0,000 sec) MariaDB [test]> explain select (select 2); +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 1 row in set, 1 warning (0,000 sec) In case the statement CREATE TABLE t1 SELECT * FROM (SELECT 1 AS a, (SELECT a+0)) a is run in PS mode it fails with the error ERROR 1054 (42S22): Unknown column 'a' in 'field list'. - Uniform handling of read-only variables both in case the SET var=val statement is executed as regular or prepared statememt. - Fixed assertion firing on handling LOAD DATA statement for temporary tables - Relaxed assert condition in the function lex_end_stage1() by adding the commands SQLCOM_ALTER_EVENT, SQLCOM_CREATE_PACKAGE, SQLCOM_CREATE_PACKAGE_BODY to a list of supported command - Removed raising of the error ER_UNSUPPORTED_PS in the function check_prepared_statement() for the ALTER VIEW command - Added initialization of the data memember st_select_lex_unit::last_procedure (assign NULL value) in the constructor Without this change the test case main.ctype_utf8 fails with the following report in case it is run with the optoin --ps-protocol. mysqltest: At line 2278: query 'VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin)' failed: 2013: Lost connection - The following bug reports were fixed: MDEV-24460: Multiple rows result set returned from stored routine over prepared statement binary protocol is handled incorrectly CONC-519: mariadb client library doesn't handle server_status and warnign_count fields received in the packet COM_STMT_EXECUTE_RESPONSE. Reasons for these bug reports have the same nature and caused by missing loop iteration on results sent by server in response to COM_STMT_EXECUTE packet. Enclosing of statements for processing of COM_STMT_EXECUTE response in the construct like do { ... } while (!mysql_stmt_next_result()); fixes the above mentioned bug reports.
5 years ago
MDEV-16708: Unsupported commands for prepared statements Withing this task the following changes were made: - Added sending of metadata info in prepare phase for the admin related command (check table, checksum table, repair, optimize, analyze). - Refactored implmentation of HELP command to support its execution in PS mode - Added support for execution of LOAD INTO and XA- related statements in PS mode - Modified mysqltest.cc to run statements in PS mode unconditionally in case the option --ps-protocol is set. Formerly, only those statements were executed using PS protocol that matched the hard-coded regular expression - Fixed the following issues: The statement explain select (select 2) executed in regular and PS mode produces different results: MariaDB [test]> prepare stmt from "explain select (select 2)"; Query OK, 0 rows affected (0,000 sec) Statement prepared MariaDB [test]> execute stmt; +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | PRIMARY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | | 2 | SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 2 rows in set (0,000 sec) MariaDB [test]> explain select (select 2); +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ | 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used | +------+-------------+-------+------+---------------+------+---------+------+------+----------------+ 1 row in set, 1 warning (0,000 sec) In case the statement CREATE TABLE t1 SELECT * FROM (SELECT 1 AS a, (SELECT a+0)) a is run in PS mode it fails with the error ERROR 1054 (42S22): Unknown column 'a' in 'field list'. - Uniform handling of read-only variables both in case the SET var=val statement is executed as regular or prepared statememt. - Fixed assertion firing on handling LOAD DATA statement for temporary tables - Relaxed assert condition in the function lex_end_stage1() by adding the commands SQLCOM_ALTER_EVENT, SQLCOM_CREATE_PACKAGE, SQLCOM_CREATE_PACKAGE_BODY to a list of supported command - Removed raising of the error ER_UNSUPPORTED_PS in the function check_prepared_statement() for the ALTER VIEW command - Added initialization of the data memember st_select_lex_unit::last_procedure (assign NULL value) in the constructor Without this change the test case main.ctype_utf8 fails with the following report in case it is run with the optoin --ps-protocol. mysqltest: At line 2278: query 'VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin)' failed: 2013: Lost connection - The following bug reports were fixed: MDEV-24460: Multiple rows result set returned from stored routine over prepared statement binary protocol is handled incorrectly CONC-519: mariadb client library doesn't handle server_status and warnign_count fields received in the packet COM_STMT_EXECUTE_RESPONSE. Reasons for these bug reports have the same nature and caused by missing loop iteration on results sent by server in response to COM_STMT_EXECUTE packet. Enclosing of statements for processing of COM_STMT_EXECUTE response in the construct like do { ... } while (!mysql_stmt_next_result()); fixes the above mentioned bug reports.
5 years ago
Add new option "check-testcases" to mysql-test-run.pl Cleanup the sideeffects from most of the testcases with sideeffects. mysql-test/mysql-test-run.pl: Add option "check-testcases" to mysql-test-run.pl Will execute "include/check-testcase.test" once before each tescase and record the output into "var/tmp/check-testcase.result" After the teastcase it will run again and this time compare the output with previously recorded file. mysql-test/r/analyze.result: Drop table t1 at end of test mysql-test/r/create_select_tmp.result: Drop table t1 at end of test mysql-test/r/ctype_cp932.result: Drop table t1 at end of test mysql-test/r/ctype_recoding.result: Drop table t1 at end of test mysql-test/r/grant2.result: Drop user mysqltest_2 and mysqltest_A@'%' mysql-test/r/join_outer.result: Drop view v1 to cleanup mysql-test/r/ps_1general.result: Drop table t1 at end of test mysql-test/r/query_cache.result: Drop function "f1" mysql-test/r/read_only.result: Reset the "read_only" flag mysql-test/r/rpl000001.result: Remove user "blafasel2" mysql-test/r/rpl000017.result: Remove user "replicate" mysql-test/r/rpl_failed_optimize.result: Drop table t1 to cleanup mysql-test/r/rpl_flush_tables.result: Drop tables t3, t4, t5 mysql-test/r/rpl_ignore_revoke.result: Delete user "user_foo" mysql-test/r/rpl_insert_id.result: Drop table t1 to cleanup mysql-test/r/rpl_loaddata.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_m.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_s.result: Drop tyable t1 to cleanup mysql-test/r/rpl_misc_functions.result: Drop tyable t1 to cleanup mysql-test/r/rpl_multi_update3.result: Drop tyable t1 and t2 to cleanup mysql-test/r/rpl_replicate_do.result: Drop tyable t1 to cleanup mysql-test/r/rpl_skip_error.result: Drop tyable t1 to cleanup mysql-test/r/rpl_slave_status.result: Drop tyable t1 to cleanup mysql-test/r/sp-prelocking.result: Drop view v1 and tables t1, t2, t3 and t4 to cleanup mysql-test/r/sp-security.result: Delete users to cleanup Delete remaining traces in tables_priv and procs_priv mysql-test/r/subselect_innodb.result: Drop procedure p1 to cleanup mysql-test/r/trigger-compat.result: Drop trigger wl2818_trg1 and wl2818_trg2. Drop table t1, t2 Drop database mysqltest_db1 And the users "mysqltest_dfn@localhost" and "mysqltest_inv@localhost" mysql-test/r/type_bit.result: Drop tables t1 and t2 to cleanup mysql-test/r/variables.result: Set GLOBAL max_join_size to 10 as it originally was in variables-master.opt mysql-test/r/view_grant.result: Dop user "test@localhost" to cleanup mysql-test/t/analyze.test: Drop table t1 to cleanup mysql-test/t/create_select_tmp.test: Drop table t1 to cleanup mysql-test/t/ctype_cp932.test: Drop table t1 to cleanup mysql-test/t/ctype_recoding.test: Drop table t1 to cleanup mysql-test/t/fulltext_var.test: Restore the original ft_boolean_syntax mysql-test/t/grant2.test: Drop users "mysqltest_2" and "mysqltest_A@'%'" to cleanup mysql-test/t/innodb_cache.test: Reset query_cache_size to original value mysql-test/t/join_outer.test: Drop view v1 to cleanup mysql-test/t/ps_1general.test: Drop table t1 to cleanup mysql-test/t/query_cache.test: Drop function "f1" to cleanup mysql-test/t/read_only.test: Reset the readonly flag mysql-test/t/rpl000001.test: Delete user "blafasel2" to cleanup mysql-test/t/rpl000017.test: Delete user "replicate" to cleanup mysql-test/t/rpl_failed_optimize.test: Drop table t1 to cleanup mysql-test/t/rpl_flush_tables.test: Droip table t3, t4 and t5 to cleanup mysql-test/t/rpl_ignore_revoke.test: Delet user "user_foo" to cleanup mysql-test/t/rpl_insert_id.test: drop table t1 to cleanup mysql-test/t/rpl_loaddata.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_m.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_s.test: Drop table t1 to cleanup mysql-test/t/rpl_misc_functions.test: Drop table t1 to cleanup mysql-test/t/rpl_multi_update3.test: Drop table t1 and t2 to cleanup mysql-test/t/rpl_replicate_do.test: Drop table t1 to cleanup mysql-test/t/rpl_skip_error.test: Drop table t1 to cleanup mysql-test/t/rpl_slave_status.test: Drop table t1 to cleanup mysql-test/t/sp-prelocking.test: Drop table t1, t2 t3 and t4 to cleanup Drop view v1 mysql-test/t/sp-security.test: Delete test users from mysql.user, mysql.db, mysql.procs_priv and mysql.tables_priv Drop table t1 to cleanup mysql-test/t/subselect_innodb.test: Drop procedure p1 to cleanup mysql-test/t/trigger-compat.test: Drop trigger wl2818_trg1 and wl2818_trg2 to cleanup Drop table t1, t2 Drop users drop database mysqltest_db1 mysql-test/t/type_bit.test: drop table t1 and t2 to cleanup mysql-test/t/variables-master.opt: Increase max_join_size to 100. mysql-test/t/variables.test: Set max_join_size to 10, which was the original value in variables-master.opt mysql-test/t/view_grant.test: Drop the user "test@localhost" mysql-test/include/check-testcase.test: New BitKeeper file ``mysql-test/include/check-testcase.test''
20 years ago
Fix for BUG#735 "Prepared Statements: there is no support for Query Cache". WL#1569 "Prepared Statements: implement support of Query Cache". Prepared SELECTs did not look up in the query cache, and their results were not stored in the query cache. This made them slower than non-prepared SELECTs in some cases. The fix is to re-use the expanded query (the prepared query where "?" placeholders are replaced by their values, at execution time) for searching/storing in the query cache. It works fine for statements prepared via mysql_stmt_prepare(), which are the most commonly used and were the scope of this bugfix and WL. It works less fine for statements prepared via the SQL command PREPARE...FROM, which are still not using the query cache if they have at least one parameter (because then the expanded query contains names of user variables, and user variables don't work with the query cache, even in non-prepared queries). Note that results from prepared SELECTs, which are in the binary protocol, and results from normal SELECTs, which are in the text protocol, ignore each other in the query cache, because a result in the binary protocol should never be served to a SELECT expecting the text protocol and vice-versa. Note, after this patch, bug 25843 starts applying to query cache ("changing default database between PREPARE and EXECUTE of statement breaks binlog"), we need to fix it. mysql-test/include/have_query_cache.inc: Now prepared statements work with the query cache, so don't disable prep stmts by default when doing a query cache test. All tests which include this file will now be really tested against prepared statements (in particular, query_cache.test). mysql-test/r/query_cache.result: result update mysql-test/t/grant_cache.test: Cannot enable this test in ps-protocol, because in normal protocol, a SELECT failing due to insufficient privileges increments Qcache_not_cached, while in ps-protocol, no. In detail: in normal protocol, the "access denied" errors on SELECT are issued at (stack trace): mysql_parse/mysql_execute_command/execute_sqlcom_select/handle_select/ mysql_select/JOIN::prepare/setup_wild/insert_fields/ check_grant_all_columns/my_error/my_message_sql, which then calls push_warning/query_cache_abort: at this moment, query_cache_store_query() has been called, so query exists in cache, so thd->net.query_cache_query!=NULL, so query_cache_abort() removes the query from cache, which causes a query_cache.refused++ (thus, a Qcache_not_cached++). While in ps-protocol, the error is issued at prepare time; for this mysql_test_select() is called, not execute_sqlcom_select() (and that also leads to JOIN::prepare/etc). Thus, as query_cache_store_query() has not been called, thd->net.query_cache_query==NULL, so query_cache_abort() does nothing: Qcache_not_cached is not incremented. As this test prints Qcache_not_cached after SELECT failures, we cannot enable this test in ps-protocol. mysql-test/t/ndb_cache_multi2.test: The principle of this test is: two mysqlds connected to one cluster, both using their query cache. Queries are cached in server1 ("select a!=3 from t1", "select * from t1"), table t1 is modified in server2, we want to see that this invalidates the query cache of server1. Invalidation with NDB works like this: when a query is found in the query cache, NDB is asked if the tables have changed. In this test, ha_ndbcluster calls NDB every millisecond to collect change information about tables. Due to this millisecond delay, there is need for a loop ("while...") in this test, which waits until a query1 ("select a!=3 from t1") is invalidated (which is equivalent to it returning up-to-date results), and then expects query2 ("select * from t1") to have been invalidated (see up-to-date results). But when enabling --ps-protocol in this test, the logic breaks, because query1 is still done via mysql_real_query() (see mysqltest.c: eval_expr() always uses mysql_real_query()). So, query1 returning up-to-date results is not a sign of it being invalidated in the cache, because it was NOT in the cache ("select a!=3 from t1" on line 39 was done with prep stmts, while `select a!=3 from t1` is not, thus the second does not see the first in the cache). Thus, we may run query2 when cache still has not been invalidated. The solution is to make the initial "select a!=3 from t1" run as a normal query, this repairs the broken logic. But note, "select * from t1" is still using prepared statements which was the goal of this test with --ps-protocol. mysql-test/t/query_cache.test: now that prepared statements work with the query cache, we check that results in binary protocol (prepared statements) and in text protocol (normal queries) don't mix in the query cache even though the text of the statement/query are identical. sql/mysql_priv.h: In class Query_cache_flags, we add a bit to say if the result is in binary or text format (because, a result in binary format should never be served to a query expecting text format, and vice- versa). A macro to emphasize that we read the size of the query cache without mutex ("maybe" word). A macro which gives a first indication of if a query is cache-able (first indication - it does not consider the query cache's state). sql/protocol.cc: indentation. sql/protocol.h: Children classes of Protocol report their type (currently, text or binary). Query cache needs to know that. sql/sql_cache.cc: When we store a result in the query cache, we need to remember if it's in binary or text format. And when we search for a result in the query cache, we need to select only those results which are in the format which the current statement expects (binary or text). sql/sql_prepare.cc: Enabling use of the query cache by prepared statements. 1) Prep stmts are of two types: a) prepared via the mysql_stmt_prepare() API call b) prepared via the SQL PREPARE...FROM statement. 2) We already, when executing a prepared statement, sometimes built an "expanded" statement. For a), "?" placeholders were replaced by their values. For b), by names of the user variables containing the values. We did that only when we needed to write the query to logs. We now use this expanded query also for storing/searching in the query cache. Assume a query "SELECT * FROM T WHERE c=?", and the parameter is 10. For a), the expanded query is "SELECT * FROM T WHERE c=10", we look for "SELECT * FROM T WHERE c=10" in the query cache, and store that query's result in the query cache. For b), the expanded query is "SELECT * FROM T WHERE c=@somevar", and user variables don't work with the query cache (even inside non- prepared queries), so we don't enable query caching for SQL PREPARE'd statements if they have at least one parameter (see "if (stmt->param_count > 0)" in the patch). 3) If query cache is enabled and this is a SELECT, we build the expanded query (as an optimisation, we don't want to build this expanded query if the query cache is disabled or this is not a SELECT). As the decision of building the expanded query or not is taken at prepare time (setup_set_params()), if query cache is disabled at prepare time, we won't build the expanded query at all next executions, thus shouldn't use this query for query cacheing. To ensure that we don't, we set safe_to_cache_query to FALSE. Note that we read the size of the query cache without mutex, which is ok: if we see it 0 but that cache has just been enlarged, no big deal, just our statement will not use the query cache; if we see it >0 but that cache has just been made destroyed, we'll build the expanded query at all executions, but query_cache_store_query() and query_cache_send_result_to_client() will read the size with a mutex and so properly decide to cache or not cache. 4) Some functions in this file were named "withlog", others "with_log", now using "with_log" for all. tests/mysql_client_test.c: Testing of how prepared statements enter and hit the query cache. test_ps_query_cache() is inspired from test_ps_conj_select(). It creates data, a prepared SELECT statement, executes it once, then a second time with the same parameter value, to see that cache is hit, then a 3rd time with another parameter value to see that cache is not hit. Then, same from another connection, expecting hits. Then, tests border cases (enables query cache at prepare and disables at execute and vice-versa). It checks all results of SELECTs, cache hits and misses. mysql-test/r/query_cache_sql_prepare.result: result of new test: we see hits when there is no parameter, no hit when there is a parameter. mysql-test/t/query_cache_sql_prepare.test: new test to see if SQL PREPARE'd statements enter/hit the query cache: - if having at least one parameter, they should not - if having zero parameters, they should.
19 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
14 years ago
14 years ago
WL#4738 streamline/simplify @@variable creation process Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies CMakeLists.txt: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled client/mysql.cc: don't crash with --show-warnings when mysqld dies config/ac-macros/plugins.m4: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled include/my_getopt.h: comments include/my_pthread.h: fix double #define mysql-test/mysql-test-run.pl: run sys_vars suite by default properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0 escape gdb command line arguments mysql-test/suite/sys_vars/r/rpl_init_slave_func.result: init_slave+utf8 bug mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: init_slave+utf8 bug mysys/my_getopt.c: Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) mysys/typelib.c: support for flagset sql/ha_ndbcluster.cc: backport from telco tree sql/item_func.cc: Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters sql/sql_builtin.cc.in: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled sql/sql_plugin.cc: Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#32902 plugin variables don't know their names Bug#44797 plugins w/o command-line options have no disabling option in --help sql/sys_vars.cc: all server variables are defined here storage/myisam/ft_parser.c: remove unnecessary updates of param->quot storage/myisam/ha_myisam.cc: myisam_* variables belong here strings/my_vsnprintf.c: %o and %llx unittest/mysys/my_vsnprintf-t.c: %o and %llx tests vio/viosocket.c: bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
16 years ago
Fix multiple test suite failures in Buildbot due to races in the test cases or missing server features not properly checked mysql-test/r/func_misc.result: Move test that requires query cache from main.func_misc to main.query_cache. mysql-test/r/mysqltest.result: Fix test failure due to race. This test case creates > 300 connections in a tight loop, and depending on thread scheduling and load, even though each connection is immediately disconnected before connecting the next one, the server max connections may still be exceeded due to server not being able to free old connections as fast as new ones are made. mysql-test/r/query_cache.result: Move test that requires query cache from main.func_misc to main.query_cache. Move test that requires query cache from main.variables to main.query_cache. mysql-test/r/query_cache_notembedded.result: Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded. mysql-test/r/sp_notembedded.result: Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded. mysql-test/r/udf.result: Move test in main.udf that requires query cache to separate file. mysql-test/r/udf_query_cache.result: Move test in main.udf that requires query cache to separate file. mysql-test/r/variables.result: Move test that requires query cache from main.variables to main.query_cache. mysql-test/suite/funcs_1/datadict/processlist_val.inc: Fix race where result file may show state "cleaning up" in the small window between setting COMMAND to 'Sleep' and clearing STATE. mysql-test/suite/rpl/r/rpl_temporary.result: Fix race with suppression of warning message by fixing the test to not generate the warning message in the first place. Problem was a race between creating an anonymous account and resetting the slave. If the slave reset happens before replicating the account, the subsequest deletion of the account will fail to replicate correctly due to missing row. mysql-test/suite/rpl/t/rpl_temporary.test: Fix race with suppression of warning message by fixing the test to not generate the warning message in the first place. Problem was a race between creating an anonymous account and resetting the slave. If the slave reset happens before replicating the account, the subsequest deletion of the account will fail to replicate correctly due to missing row. mysql-test/t/func_misc.test: Move test that requires query cache from main.func_misc to main.query_cache. Move test that requires query cache from main.variables to main.query_cache. mysql-test/t/mysqltest.test: Fix test failure due to race. This test case creates > 300 connections in a tight loop, and depending on thread scheduling and load, even though each connection is immediately disconnected before connecting the next one, the server max connections may still be exceeded due to server not being able to free old connections as fast as new ones are made. mysql-test/t/query_cache.test: Move test that requires query cache to main.query_cache. mysql-test/t/query_cache_notembedded.test: Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded. mysql-test/t/sp_notembedded.test: Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded. mysql-test/t/udf.test: Move test in main.udf that requires query cache to separate file. mysql-test/t/udf_query_cache-master.opt: Move test in main.udf that requires query cache to separate file. mysql-test/t/udf_query_cache.test: Move test in main.udf that requires query cache to separate file. mysql-test/t/variables.test: Move test that requires query cache from main.variables to main.query_cache. tests/mysql_client_test.c: In tests that require query cache, skip the test if query cache not available. Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee that the server we run against was compiled with same preprocessor #define as the mysql_client_test program (and since it is trivial to check dynamically).
16 years ago
18 years ago
fixes for test failures and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
13 years ago
fixes for test failures and small collateral changes mysql-test/lib/My/Test.pm: somehow with "print" we get truncated writes sometimes mysql-test/suite/perfschema/r/digest_table_full.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/dml_handler.result: host table is not ported over yet mysql-test/suite/perfschema/r/information_schema.result: host table is not ported over yet mysql-test/suite/perfschema/r/nesting.result: this differs, because we don't rewrite general log queries, and multi-statement packets are logged as a one entry. this result file is identical to what mysql-5.6.5 produces with the --log-raw option. mysql-test/suite/perfschema/r/relaylog.result: MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB. mysql-test/suite/perfschema/r/server_init.result: MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup. mysql-test/suite/perfschema/r/stage_mdl_global.result: this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not do that, and this causes useless mutex locks and waits. mysql-test/suite/perfschema/r/statement_digest.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_consumers.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/perfschema/r/statement_digest_long_query.result: md5 hashes of statement digests differ, because yacc token codes are different in mariadb mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result: will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
13 years ago
MDEV-33861 main.query_cache fails with embedded after enabling WITH_PROTECT_STATEMENT_MEMROOT Synopsis: If SELECT returned answer from Query Cache it is not really executed. The reason for firing of assertion DBUG_ASSERT((mem_root->flags & ROOT_FLAG_READ_ONLY) == 0); is that in case the query_cache is on and the same query run by different stored routines the following use case can take place: First, lets say that bodies of routines used by the test case are the same and contains the only query 'SELECT * FROM t1'; call p1() -- a result set is stored in query cache for further use. call p2() -- the same query is run against the table t1, that result in not running the actual query but using its cached result. On finishing execution of this routine, its memory root is marked for read only since every SP instruction that this routine contains has been executed. INSERT INT t1 VALUE (1); -- force following invalidation of query cache call p2() -- query the table t1 will result in assertion failure since its execution would require allocation on the memory root that has been already marked as read only memory root The root cause of firing the assertion is that memory root of the stored routine 'p2' was marked as read only although actual execution of the query contained inside hadn't been performed. To fix the issue, mark a SP instruction as not yet run in case its execution doesn't result in real query processing and a result set got from query cache instead. Note that, this issue relates server built in debug mode AND with the protect statement memory root feature turned on. It doesn't affect server built in release mode.
2 years ago
  1. set @save_query_cache_size=@@query_cache_size;
  2. SET GLOBAL query_cache_type= Off;
  3. SET LOCAL query_cache_type= Off;
  4. SET LOCAL query_cache_type= 0;
  5. SET LOCAL query_cache_type= on;
  6. ERROR HY000: Query cache is globally disabled and you can't enable it only for this session
  7. SET LOCAL query_cache_type= 1;
  8. ERROR HY000: Query cache is globally disabled and you can't enable it only for this session
  9. set GLOBAL query_cache_size=1355776;
  10. SET GLOBAL query_cache_type= ON;
  11. SET LOCAL query_cache_type= ON;
  12. flush query cache;
  13. flush query cache;
  14. reset query cache;
  15. flush status;
  16. drop table if exists t1,t2,t3,t4,t11,t21,t1_1,t1_2,t9,t9_1,t9_2;
  17. drop database if exists mysqltest;
  18. drop table if exists ```a`;
  19. drop view if exists v1;
  20. create table t1 (a int not null);
  21. insert into t1 values (1),(2),(3);
  22. select * from t1;
  23. a
  24. 1
  25. 2
  26. 3
  27. select * from t1;
  28. a
  29. 1
  30. 2
  31. 3
  32. select sql_no_cache * from t1;
  33. a
  34. 1
  35. 2
  36. 3
  37. select length(now()) from t1;
  38. length(now())
  39. 19
  40. 19
  41. 19
  42. show status like "Qcache_queries_in_cache";
  43. Variable_name Value
  44. Qcache_queries_in_cache 1
  45. show status like "Qcache_inserts";
  46. Variable_name Value
  47. Qcache_inserts 1
  48. show status like "Qcache_hits";
  49. Variable_name Value
  50. Qcache_hits 1
  51. drop table t1;
  52. show status like "Qcache_queries_in_cache";
  53. Variable_name Value
  54. Qcache_queries_in_cache 0
  55. create table t1 (a int not null) ENGINE=MyISAM;
  56. insert into t1 values (1),(2),(3);
  57. create table t2 (a int not null) ENGINE=MyISAM;
  58. insert into t2 values (4),(5),(6);
  59. create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
  60. select * from t3;
  61. a
  62. 1
  63. 2
  64. 3
  65. 4
  66. 5
  67. 6
  68. select * from t3;
  69. a
  70. 1
  71. 2
  72. 3
  73. 4
  74. 5
  75. 6
  76. show status like "Qcache_hits";
  77. Variable_name Value
  78. Qcache_hits 2
  79. show status like "Qcache_queries_in_cache";
  80. Variable_name Value
  81. Qcache_queries_in_cache 1
  82. insert into t2 values (7);
  83. show status like "Qcache_queries_in_cache";
  84. Variable_name Value
  85. Qcache_queries_in_cache 0
  86. select * from t1;
  87. a
  88. 1
  89. 2
  90. 3
  91. select * from t1;
  92. a
  93. 1
  94. 2
  95. 3
  96. show status like "Qcache_hits";
  97. Variable_name Value
  98. Qcache_hits 3
  99. show status like "Qcache_queries_in_cache";
  100. Variable_name Value
  101. Qcache_queries_in_cache 1
  102. insert into t3 values (8);
  103. show status like "Qcache_queries_in_cache";
  104. Variable_name Value
  105. Qcache_queries_in_cache 0
  106. select * from t3;
  107. a
  108. 1
  109. 2
  110. 3
  111. 8
  112. 4
  113. 5
  114. 6
  115. 7
  116. show status like "Qcache_queries_in_cache";
  117. Variable_name Value
  118. Qcache_queries_in_cache 1
  119. update t2 set a=9 where a=7;
  120. show status like "Qcache_queries_in_cache";
  121. Variable_name Value
  122. Qcache_queries_in_cache 0
  123. select * from t1;
  124. a
  125. 1
  126. 2
  127. 3
  128. 8
  129. show status like "Qcache_queries_in_cache";
  130. Variable_name Value
  131. Qcache_queries_in_cache 1
  132. update t3 set a=10 where a=1;
  133. show status like "Qcache_queries_in_cache";
  134. Variable_name Value
  135. Qcache_queries_in_cache 0
  136. select * from t3;
  137. a
  138. 10
  139. 2
  140. 3
  141. 8
  142. 4
  143. 5
  144. 6
  145. 9
  146. show status like "Qcache_queries_in_cache";
  147. Variable_name Value
  148. Qcache_queries_in_cache 1
  149. delete from t2 where a=9;
  150. show status like "Qcache_queries_in_cache";
  151. Variable_name Value
  152. Qcache_queries_in_cache 0
  153. select * from t1;
  154. a
  155. 10
  156. 2
  157. 3
  158. 8
  159. show status like "Qcache_queries_in_cache";
  160. Variable_name Value
  161. Qcache_queries_in_cache 1
  162. delete from t3 where a=10;
  163. show status like "Qcache_queries_in_cache";
  164. Variable_name Value
  165. Qcache_queries_in_cache 0
  166. drop table t1, t2, t3;
  167. set query_cache_type=demand;
  168. create table t1 (a int not null);
  169. insert into t1 values (1),(2),(3);
  170. select * from t1;
  171. a
  172. 1
  173. 2
  174. 3
  175. show status like "Qcache_queries_in_cache";
  176. Variable_name Value
  177. Qcache_queries_in_cache 0
  178. select sql_cache * from t1 union select * from t1;
  179. a
  180. 1
  181. 2
  182. 3
  183. set query_cache_type=2;
  184. select sql_cache * from t1 union select * from t1;
  185. a
  186. 1
  187. 2
  188. 3
  189. show status like "Qcache_hits";
  190. Variable_name Value
  191. Qcache_hits 4
  192. show status like "Qcache_queries_in_cache";
  193. Variable_name Value
  194. Qcache_queries_in_cache 1
  195. set query_cache_type=on;
  196. reset query cache;
  197. show status like "Qcache_queries_in_cache";
  198. Variable_name Value
  199. Qcache_queries_in_cache 0
  200. select sql_no_cache * from t1;
  201. a
  202. 1
  203. 2
  204. 3
  205. show status like "Qcache_queries_in_cache";
  206. Variable_name Value
  207. Qcache_queries_in_cache 0
  208. drop table t1;
  209. create table t1 (a text not null);
  210. select CONNECTION_ID() from t1;
  211. CONNECTION_ID()
  212. select FOUND_ROWS();
  213. FOUND_ROWS()
  214. 0
  215. select NOW() from t1;
  216. NOW()
  217. select CURDATE() from t1;
  218. CURDATE()
  219. select CURTIME() from t1;
  220. CURTIME()
  221. select DATABASE() from t1;
  222. DATABASE()
  223. select ENCRYPT("test") from t1;
  224. ENCRYPT("test")
  225. select LAST_INSERT_ID() from t1;
  226. LAST_INSERT_ID()
  227. select RAND() from t1;
  228. RAND()
  229. select UNIX_TIMESTAMP() from t1;
  230. UNIX_TIMESTAMP()
  231. select USER() from t1;
  232. USER()
  233. select CURRENT_USER() from t1;
  234. CURRENT_USER()
  235. select benchmark(1,1) from t1;
  236. benchmark(1,1)
  237. explain extended select benchmark(1,1) from t1;
  238. id select_type table type possible_keys key key_len ref rows filtered Extra
  239. 1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found
  240. Warnings:
  241. Note 1003 select benchmark(1,1) AS `benchmark(1,1)` from `test`.`t1`
  242. show status like "Qcache_queries_in_cache";
  243. Variable_name Value
  244. Qcache_queries_in_cache 0
  245. create table t2 (a text not null);
  246. insert into t1 values("1111111111111111111111111111111111111111111111111111");
  247. insert into t2 select * from t1;
  248. insert into t1 select * from t2;
  249. insert into t2 select * from t1;
  250. insert into t1 select * from t2;
  251. insert into t2 select * from t1;
  252. insert into t1 select * from t2;
  253. insert into t2 select * from t1;
  254. insert into t1 select * from t2;
  255. insert into t2 select * from t1;
  256. insert into t1 select * from t2;
  257. insert into t2 select * from t1;
  258. insert into t1 select * from t2;
  259. insert into t2 select * from t1;
  260. insert into t1 select * from t2;
  261. insert into t2 select * from t1;
  262. insert into t1 select * from t2;
  263. insert into t2 select * from t1;
  264. insert into t1 select * from t2;
  265. show status like "Qcache_hits";
  266. Variable_name Value
  267. Qcache_hits 4
  268. show status like "Qcache_lowmem_prunes";
  269. Variable_name Value
  270. Qcache_lowmem_prunes 0
  271. select a as a1, a as a2 from t1;
  272. select a as a2, a as a3 from t1;
  273. select a as a3, a as a4 from t1;
  274. select a as a1, a as a2 from t1;
  275. show status like "Qcache_hits";
  276. Variable_name Value
  277. Qcache_hits 4
  278. show status like "Qcache_queries_in_cache";
  279. Variable_name Value
  280. Qcache_queries_in_cache 2
  281. show status like "Qcache_lowmem_prunes";
  282. Variable_name Value
  283. Qcache_lowmem_prunes 2
  284. reset query cache;
  285. insert into t2 select * from t1;
  286. insert into t1 select * from t2;
  287. insert into t2 select * from t1;
  288. insert into t1 select * from t2;
  289. insert into t2 select * from t1;
  290. insert into t1 select * from t2;
  291. insert into t2 select * from t1;
  292. insert into t1 select * from t2;
  293. insert into t2 select * from t1;
  294. insert into t1 select * from t2;
  295. select * from t1;
  296. show status like "Qcache_queries_in_cache";
  297. Variable_name Value
  298. Qcache_queries_in_cache 0
  299. drop table t1,t2;
  300. create database mysqltest;
  301. create table mysqltest.t1 (i int not null auto_increment, a int, primary key (i));
  302. insert into mysqltest.t1 (a) values (1);
  303. select * from mysqltest.t1 where i is null;
  304. i a
  305. create table t1(a int);
  306. select * from t1;
  307. a
  308. show status like "Qcache_queries_in_cache";
  309. Variable_name Value
  310. Qcache_queries_in_cache 2
  311. select * from mysqltest.t1;
  312. i a
  313. 1 1
  314. show status like "Qcache_queries_in_cache";
  315. Variable_name Value
  316. Qcache_queries_in_cache 3
  317. drop database mysqltest;
  318. show status like "Qcache_queries_in_cache";
  319. Variable_name Value
  320. Qcache_queries_in_cache 1
  321. drop table t1;
  322. create table t1 (a char(1) not null collate koi8r_general_ci);
  323. insert into t1 values(_koi8r"�");
  324. set CHARACTER SET koi8r;
  325. select * from t1;
  326. a
  327. set CHARACTER SET cp1251_koi8;
  328. select * from t1;
  329. a
  330. set CHARACTER SET DEFAULT;
  331. show status like "Qcache_queries_in_cache";
  332. Variable_name Value
  333. Qcache_queries_in_cache 2
  334. show status like "Qcache_hits";
  335. Variable_name Value
  336. Qcache_hits 4
  337. drop table t1;
  338. create database if not exists mysqltest;
  339. create table mysqltest.t1 (i int not null);
  340. create table t1 (i int not null);
  341. insert into mysqltest.t1 (i) values (1);
  342. insert into t1 (i) values (2);
  343. select * from t1;
  344. i
  345. 2
  346. use mysqltest;
  347. select * from t1;
  348. i
  349. 1
  350. select * from t1;
  351. i
  352. 1
  353. use test;
  354. select * from t1;
  355. i
  356. 2
  357. show status like "Qcache_queries_in_cache";
  358. Variable_name Value
  359. Qcache_queries_in_cache 2
  360. show status like "Qcache_hits";
  361. Variable_name Value
  362. Qcache_hits 6
  363. drop database mysqltest;
  364. drop table t1;
  365. create table t1 (i int not null);
  366. insert into t1 (i) values (1),(2),(3),(4);
  367. select SQL_CALC_FOUND_ROWS * from t1 limit 2;
  368. i
  369. 1
  370. 2
  371. select FOUND_ROWS();
  372. FOUND_ROWS()
  373. 4
  374. show status like "Qcache_hits";
  375. Variable_name Value
  376. Qcache_hits 6
  377. show status like "Qcache_queries_in_cache";
  378. Variable_name Value
  379. Qcache_queries_in_cache 1
  380. select * from t1 where i=1;
  381. i
  382. 1
  383. select FOUND_ROWS();
  384. FOUND_ROWS()
  385. 1
  386. show status like "Qcache_hits";
  387. Variable_name Value
  388. Qcache_hits 6
  389. show status like "Qcache_queries_in_cache";
  390. Variable_name Value
  391. Qcache_queries_in_cache 2
  392. select SQL_CALC_FOUND_ROWS * from t1 limit 2;
  393. i
  394. 1
  395. 2
  396. select FOUND_ROWS();
  397. FOUND_ROWS()
  398. 4
  399. show status like "Qcache_hits";
  400. Variable_name Value
  401. Qcache_hits 7
  402. show status like "Qcache_queries_in_cache";
  403. Variable_name Value
  404. Qcache_queries_in_cache 2
  405. select * from t1 where i=1;
  406. i
  407. 1
  408. select FOUND_ROWS();
  409. FOUND_ROWS()
  410. 1
  411. show status like "Qcache_hits";
  412. Variable_name Value
  413. Qcache_hits 8
  414. show status like "Qcache_queries_in_cache";
  415. Variable_name Value
  416. Qcache_queries_in_cache 2
  417. drop table t1;
  418. flush query cache;
  419. reset query cache;
  420. create table t1 (a int not null) ENGINE=MyISAM;
  421. insert into t1 values (1),(2),(3);
  422. select * from t1;
  423. a
  424. 1
  425. 2
  426. 3
  427. select * from t1;
  428. a
  429. 1
  430. 2
  431. 3
  432. show status like "Qcache_queries_in_cache";
  433. Variable_name Value
  434. Qcache_queries_in_cache 1
  435. insert delayed into t1 values (4);
  436. select a from t1;
  437. a
  438. 1
  439. 2
  440. 3
  441. 4
  442. show status like "Qcache_queries_in_cache";
  443. Variable_name Value
  444. Qcache_queries_in_cache 1
  445. drop table t1;
  446. show status like "Qcache_queries_in_cache";
  447. Variable_name Value
  448. Qcache_queries_in_cache 0
  449. show global variables like "query_cache_min_res_unit";
  450. Variable_name Value
  451. query_cache_min_res_unit 4096
  452. set GLOBAL query_cache_min_res_unit=1001;
  453. Warnings:
  454. Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1001'
  455. show global variables like "query_cache_min_res_unit";
  456. Variable_name Value
  457. query_cache_min_res_unit 1000
  458. create table t1 (a int not null);
  459. insert into t1 values (1),(2),(3);
  460. create table t2 (a int not null);
  461. insert into t2 values (1),(2),(3);
  462. select * from t1;
  463. a
  464. 1
  465. 2
  466. 3
  467. select * from t1;
  468. a
  469. 1
  470. 2
  471. 3
  472. select * from t2;
  473. a
  474. 1
  475. 2
  476. 3
  477. select * from t2;
  478. a
  479. 1
  480. 2
  481. 3
  482. show status like "Qcache_hits";
  483. Variable_name Value
  484. Qcache_hits 11
  485. show status like "Qcache_queries_in_cache";
  486. Variable_name Value
  487. Qcache_queries_in_cache 2
  488. drop table t1;
  489. select a from t2;
  490. a
  491. 1
  492. 2
  493. 3
  494. select a from t2;
  495. a
  496. 1
  497. 2
  498. 3
  499. show status like "Qcache_hits";
  500. Variable_name Value
  501. Qcache_hits 12
  502. show status like "Qcache_queries_in_cache";
  503. Variable_name Value
  504. Qcache_queries_in_cache 2
  505. drop table t2;
  506. set GLOBAL query_cache_min_res_unit=default;
  507. show global variables like "query_cache_min_res_unit";
  508. Variable_name Value
  509. query_cache_min_res_unit 4096
  510. create table t1 (a int not null);
  511. insert into t1 values (1);
  512. select "aaa" from t1;
  513. aaa
  514. aaa
  515. select "AAA" from t1;
  516. AAA
  517. AAA
  518. drop table t1;
  519. create table t1 (a int);
  520. set GLOBAL query_cache_size=1000;
  521. Warnings:
  522. Warning 1292 Truncated incorrect query_cache_size value: '1000'
  523. show global variables like "query_cache_size";
  524. Variable_name Value
  525. query_cache_size 0
  526. select * from t1;
  527. a
  528. set GLOBAL query_cache_size=1024;
  529. Warnings:
  530. Warning 1282 Query cache failed to set size 1024; new query cache size is 0
  531. show global variables like "query_cache_size";
  532. Variable_name Value
  533. query_cache_size 0
  534. select * from t1;
  535. a
  536. set GLOBAL query_cache_size=10240;
  537. Warnings:
  538. Warning 1282 Query cache failed to set size 10240; new query cache size is 0
  539. show global variables like "query_cache_size";
  540. Variable_name Value
  541. query_cache_size 0
  542. select * from t1;
  543. a
  544. set GLOBAL query_cache_size=20480;
  545. Warnings:
  546. Warning 1282 Query cache failed to set size 20480; new query cache size is 0
  547. show global variables like "query_cache_size";
  548. Variable_name Value
  549. query_cache_size 0
  550. select * from t1;
  551. a
  552. set GLOBAL query_cache_size=40960;
  553. Warnings:
  554. Warning 1282 Query cache failed to set size 40960; new query cache size is 0
  555. show global variables like "query_cache_size";
  556. Variable_name Value
  557. query_cache_size 0
  558. select * from t1;
  559. a
  560. set GLOBAL query_cache_size=51200;
  561. show global variables like "query_cache_size";
  562. Variable_name Value
  563. query_cache_size 51200
  564. select * from t1;
  565. a
  566. set GLOBAL query_cache_size=61440;
  567. show global variables like "query_cache_size";
  568. Variable_name Value
  569. query_cache_size 61440
  570. select * from t1;
  571. a
  572. set GLOBAL query_cache_size=81920;
  573. show global variables like "query_cache_size";
  574. Variable_name Value
  575. query_cache_size 81920
  576. select * from t1;
  577. a
  578. set GLOBAL query_cache_size=102400;
  579. show global variables like "query_cache_size";
  580. Variable_name Value
  581. query_cache_size 102400
  582. select * from t1;
  583. a
  584. drop table t1;
  585. set GLOBAL query_cache_size=1048576;
  586. create table t1 (i int not null);
  587. create table t2 (i int not null);
  588. select * from t1;
  589. i
  590. show status like "Qcache_queries_in_cache";
  591. Variable_name Value
  592. Qcache_queries_in_cache 1
  593. create temporary table t3 (i int not null);
  594. select * from t2;
  595. i
  596. show status like "Qcache_queries_in_cache";
  597. Variable_name Value
  598. Qcache_queries_in_cache 2
  599. select * from t3;
  600. i
  601. show status like "Qcache_queries_in_cache";
  602. Variable_name Value
  603. Qcache_queries_in_cache 2
  604. update t1 set i=(select distinct 1 from (select * from t2) a);
  605. drop table t1, t2, t3;
  606. use mysql;
  607. select * from db;
  608. show status like "Qcache_queries_in_cache";
  609. Variable_name Value
  610. Qcache_queries_in_cache 0
  611. use test;
  612. select * from mysql.db;
  613. show status like "Qcache_queries_in_cache";
  614. Variable_name Value
  615. Qcache_queries_in_cache 0
  616. create table t1(id int auto_increment primary key);
  617. insert into t1 values (NULL), (NULL), (NULL);
  618. select * from t1 where id=2;
  619. id
  620. 2
  621. alter table t1 rename to t2;
  622. select * from t1 where id=2;
  623. ERROR 42S02: Table 'test.t1' doesn't exist
  624. drop table t2;
  625. select * from t1 where id=2;
  626. ERROR 42S02: Table 'test.t1' doesn't exist
  627. create table t1 (word char(20) not null);
  628. select * from t1;
  629. word
  630. show status like "Qcache_queries_in_cache";
  631. Variable_name Value
  632. Qcache_queries_in_cache 1
  633. load data infile 'MYSQLTEST_VARDIR/std_data/words.dat' into table t1;
  634. show status like "Qcache_queries_in_cache";
  635. Variable_name Value
  636. Qcache_queries_in_cache 0
  637. select count(*) from t1;
  638. count(*)
  639. 70
  640. drop table t1;
  641. create table t1 (a int);
  642. insert into t1 values (1),(2),(3);
  643. show status like "Qcache_queries_in_cache";
  644. Variable_name Value
  645. Qcache_queries_in_cache 0
  646. select * from t1 into outfile "query_cache.out.file";
  647. Warnings:
  648. Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
  649. select * from t1 into outfile "query_cache.out.file";
  650. ERROR HY000: File 'query_cache.out.file' already exists
  651. select * from t1 limit 1 into dumpfile "query_cache.dump.file";
  652. Warnings:
  653. Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
  654. show status like "Qcache_queries_in_cache";
  655. Variable_name Value
  656. Qcache_queries_in_cache 0
  657. drop table t1;
  658. create table t1 (a int);
  659. insert into t1 values (1),(2);
  660. show status like "Qcache_queries_in_cache";
  661. Variable_name Value
  662. Qcache_queries_in_cache 0
  663. select * from t1;
  664. a
  665. 1
  666. 2
  667. SET SQL_SELECT_LIMIT=1;
  668. select * from t1;
  669. a
  670. 1
  671. show status like "Qcache_queries_in_cache";
  672. Variable_name Value
  673. Qcache_queries_in_cache 2
  674. SET SQL_SELECT_LIMIT=DEFAULT;
  675. drop table t1;
  676. flush query cache;
  677. reset query cache;
  678. flush status;
  679. set GLOBAL query_cache_size=1048576;
  680. create table t1 (a int not null);
  681. insert into t1 values (1),(2),(3);
  682. create table t2 (a text not null);
  683. create table t3 (a text not null);
  684. insert into t3 values("1111111111111111111111111111111111111111111111111111");
  685. insert into t2 select * from t3;
  686. insert into t3 select * from t2;
  687. insert into t2 select * from t3;
  688. insert into t3 select * from t2;
  689. insert into t2 select * from t3;
  690. insert into t3 select * from t2;
  691. insert into t2 select * from t3;
  692. insert into t3 select * from t2;
  693. insert into t2 select * from t3;
  694. insert into t3 select * from t2;
  695. drop table t2;
  696. create table t2 (a int not null);
  697. insert into t2 values (1),(2),(3);
  698. create table t4 (a int not null);
  699. insert into t4 values (1),(2),(3);
  700. select * from t4;
  701. select * from t2;
  702. select * from t1 as tt, t1 as ttt where tt.a=1 and ttt.a=2;
  703. select * from t2;
  704. select * from t4;
  705. select * from t1 as tt, t1 as ttt where tt.a=1 and ttt.a=2;
  706. select * from t2;
  707. select * from t4;
  708. select * from t1 as tt, t1 as ttt where tt.a=1 and ttt.a=2;
  709. delete from t2 where a=1;
  710. flush query cache;
  711. select * from t3;
  712. delete from t4 where a=1;
  713. flush query cache;
  714. drop table t1,t2,t3,t4;
  715. set query_cache_wlock_invalidate=1;
  716. create table t1 (a int not null);
  717. create table t2 (a int not null);
  718. create view v1 as select * from t1;
  719. select * from t1;
  720. a
  721. select * from t2;
  722. a
  723. show status like "Qcache_queries_in_cache";
  724. Variable_name Value
  725. Qcache_queries_in_cache 2
  726. lock table t1 write, t2 read;
  727. show status like "Qcache_queries_in_cache";
  728. Variable_name Value
  729. Qcache_queries_in_cache 1
  730. unlock table;
  731. select * from t1;
  732. a
  733. show status like "Qcache_queries_in_cache";
  734. Variable_name Value
  735. Qcache_queries_in_cache 2
  736. lock table v1 write;
  737. show status like "Qcache_queries_in_cache";
  738. Variable_name Value
  739. Qcache_queries_in_cache 2
  740. unlock table;
  741. drop view v1;
  742. drop table t1,t2;
  743. set query_cache_wlock_invalidate=default;
  744. CREATE TABLE t1 (id INT PRIMARY KEY);
  745. insert into t1 values (1),(2),(3);
  746. select * from t1;
  747. id
  748. 1
  749. 2
  750. 3
  751. create temporary table t1 (a int not null auto_increment
  752. primary key);
  753. select * from t1;
  754. a
  755. drop table t1;
  756. drop table t1;
  757. SET NAMES koi8r;
  758. CREATE TABLE t1 (a char(1) character set koi8r);
  759. INSERT INTO t1 VALUES (_koi8r'�'),(_koi8r'�');
  760. SELECT a,'�','�'='�' FROM t1;
  761. a � '�'='�'
  762. � � 1
  763. � � 1
  764. show status like "Qcache_hits";
  765. Variable_name Value
  766. Qcache_hits 6
  767. show status like "Qcache_queries_in_cache";
  768. Variable_name Value
  769. Qcache_queries_in_cache 1
  770. set collation_connection=koi8r_bin;
  771. SELECT a,'�','�'='�' FROM t1;
  772. a � '�'='�'
  773. � � 0
  774. � � 0
  775. show status like "Qcache_hits";
  776. Variable_name Value
  777. Qcache_hits 6
  778. show status like "Qcache_queries_in_cache";
  779. Variable_name Value
  780. Qcache_queries_in_cache 2
  781. set character_set_client=cp1251;
  782. SELECT a,'�','�'='�' FROM t1;
  783. a � '�'='�'
  784. � � 0
  785. � � 0
  786. show status like "Qcache_hits";
  787. Variable_name Value
  788. Qcache_hits 6
  789. show status like "Qcache_queries_in_cache";
  790. Variable_name Value
  791. Qcache_queries_in_cache 3
  792. set character_set_results=cp1251;
  793. SELECT a,'�','�'='�' FROM t1;
  794. a � '�'='�'
  795. � � 0
  796. � � 0
  797. show status like "Qcache_hits";
  798. Variable_name Value
  799. Qcache_hits 6
  800. show status like "Qcache_queries_in_cache";
  801. Variable_name Value
  802. Qcache_queries_in_cache 4
  803. SET NAMES default;
  804. DROP TABLE t1;
  805. CREATE TABLE t1 (a int(1));
  806. CREATE DATABASE mysqltest;
  807. USE mysqltest;
  808. DROP DATABASE mysqltest;
  809. SELECT * FROM test.t1;
  810. a
  811. USE test;
  812. DROP TABLE t1;
  813. set character_set_results=null;
  814. select @@character_set_results;
  815. @@character_set_results
  816. NULL
  817. set character_set_results=default;
  818. set GLOBAL query_cache_size=1355776;
  819. create table t1 (id int auto_increment primary key, c char(65));
  820. insert into t1 set c = repeat('x',24);
  821. insert into t1 set c = concat(repeat('x',64),'x');
  822. insert into t1 set c = concat(repeat('x',64),'w');
  823. insert into t1 set c = concat(repeat('x',64),'y');
  824. set max_sort_length=200;
  825. select c from t1 order by c, id;
  826. c
  827. xxxxxxxxxxxxxxxxxxxxxxxx
  828. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxw
  829. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  830. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxy
  831. reset query cache;
  832. set max_sort_length=64;
  833. select c from t1 order by c, id;
  834. c
  835. xxxxxxxxxxxxxxxxxxxxxxxx
  836. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  837. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxw
  838. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxy
  839. set max_sort_length=200;
  840. select c from t1 order by c, id;
  841. c
  842. xxxxxxxxxxxxxxxxxxxxxxxx
  843. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxw
  844. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  845. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxy
  846. set max_sort_length=default;
  847. select '1' || '3' from t1;
  848. '1' || '3'
  849. 1
  850. 1
  851. 1
  852. 1
  853. set SQL_MODE=oracle;
  854. select '1' || '3' from t1;
  855. '1' || '3'
  856. 13
  857. 13
  858. 13
  859. 13
  860. set SQL_MODE=default;
  861. drop table t1;
  862. create table t1 (a varchar(20), b int);
  863. insert into t1 values ('12345678901234567890', 1);
  864. set group_concat_max_len=10;
  865. select group_concat(a) FROM t1 group by b;
  866. group_concat(a)
  867. 1234567890
  868. Warnings:
  869. Warning 1260 Row 1 was cut by GROUP_CONCAT()
  870. set group_concat_max_len=1024;
  871. select group_concat(a) FROM t1 group by b;
  872. group_concat(a)
  873. 12345678901234567890
  874. set group_concat_max_len=default;
  875. drop table t1;
  876. create table t1 (a int);
  877. show status like "Qcache_queries_in_cache";
  878. Variable_name Value
  879. Qcache_queries_in_cache 0
  880. show status like "Qcache_inserts";
  881. Variable_name Value
  882. Qcache_inserts 19
  883. show status like "Qcache_hits";
  884. Variable_name Value
  885. Qcache_hits 6
  886. /**/ select * from t1;
  887. a
  888. /**/ select * from t1;
  889. a
  890. show status like "Qcache_queries_in_cache";
  891. Variable_name Value
  892. Qcache_queries_in_cache 1
  893. show status like "Qcache_inserts";
  894. Variable_name Value
  895. Qcache_inserts 20
  896. show status like "Qcache_hits";
  897. Variable_name Value
  898. Qcache_hits 7
  899. DROP TABLE t1;
  900. SET GLOBAL query_cache_size=0;
  901. SET SESSION query_cache_type = 2;
  902. create table t1(a int);
  903. select table_name from information_schema.tables
  904. where table_schema="test";
  905. table_name
  906. t1
  907. drop table t1;
  908. select table_name from information_schema.tables
  909. where table_schema="test";
  910. table_name
  911. SET SESSION query_cache_type = 1;
  912. set global query_cache_size=1024*1024;
  913. flush query cache;
  914. create table t1 ( a int );
  915. insert into t1 values (1);
  916. select a from t1;
  917. a
  918. 1
  919. select a from t1;
  920. a
  921. 1
  922. show status like 'qcache_queries_in_cache';
  923. Variable_name Value
  924. Qcache_queries_in_cache 1
  925. repair table t1;
  926. Table Op Msg_type Msg_text
  927. test.t1 repair status OK
  928. show status like 'qcache_queries_in_cache';
  929. Variable_name Value
  930. Qcache_queries_in_cache 0
  931. drop table t1;
  932. set GLOBAL query_cache_size=64*1024;
  933. create table t1 (a text);
  934. insert into t1 values (repeat('abcdefghijklmnopqrstuvwxyz', 550));
  935. create table t2 (a text);
  936. insert into t2 values (repeat('ijklmnopqrstuvwxyzabcdefgh', 550));
  937. select a from t1;
  938. select a from t2;
  939. show status like 'Qcache_%_blocks';
  940. Variable_name Value
  941. Qcache_free_blocks 1
  942. Qcache_total_blocks 7
  943. insert into t1 select reverse(a) from t1;
  944. show status like 'Qcache_%_blocks';
  945. Variable_name Value
  946. Qcache_free_blocks 2
  947. Qcache_total_blocks 5
  948. select a from t1;
  949. show status like 'Qcache_%_blocks';
  950. Variable_name Value
  951. Qcache_free_blocks 1
  952. Qcache_total_blocks 8
  953. select a from t1;
  954. a
  955. abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm
  956. zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqpon
  957. flush query cache;
  958. drop table t1, t2;
  959. set GLOBAL query_cache_size=1355776;
  960. flush status;
  961. CREATE TABLE t1 (
  962. `date` datetime NOT NULL default '0000-00-00 00:00:00',
  963. KEY `date` (`date`)
  964. ) ENGINE=MyISAM;
  965. INSERT INTO t1 VALUES ('20050326');
  966. INSERT INTO t1 VALUES ('20050325');
  967. SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
  968. COUNT(*)
  969. 1
  970. Warnings:
  971. Warning 1292 Truncated incorrect date value: '20050327 invalid'
  972. SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
  973. COUNT(*)
  974. 1
  975. Warnings:
  976. Warning 1292 Truncated incorrect date value: '20050328 invalid'
  977. SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
  978. COUNT(*)
  979. 1
  980. Warnings:
  981. Warning 1292 Truncated incorrect date value: '20050327 invalid'
  982. show status like "Qcache_queries_in_cache";
  983. Variable_name Value
  984. Qcache_queries_in_cache 0
  985. show status like "Qcache_inserts";
  986. Variable_name Value
  987. Qcache_inserts 0
  988. show status like "Qcache_hits";
  989. Variable_name Value
  990. Qcache_hits 0
  991. drop table t1;
  992. create table t1 (a int);
  993. insert into t1 values (1);
  994. reset query cache;
  995. flush status;
  996. select * from (select * from t1) a;
  997. a
  998. 1
  999. show status like "Qcache_queries_in_cache";
  1000. Variable_name Value
  1001. Qcache_queries_in_cache 1
  1002. show status like "Qcache_inserts";
  1003. Variable_name Value
  1004. Qcache_inserts 1
  1005. show status like "Qcache_hits";
  1006. Variable_name Value
  1007. Qcache_hits 0
  1008. select * from (select * from t1) a;
  1009. a
  1010. 1
  1011. show status like "Qcache_queries_in_cache";
  1012. Variable_name Value
  1013. Qcache_queries_in_cache 1
  1014. show status like "Qcache_inserts";
  1015. Variable_name Value
  1016. Qcache_inserts 1
  1017. show status like "Qcache_hits";
  1018. Variable_name Value
  1019. Qcache_hits 1
  1020. insert into t1 values (2);
  1021. show status like "Qcache_queries_in_cache";
  1022. Variable_name Value
  1023. Qcache_queries_in_cache 0
  1024. show status like "Qcache_inserts";
  1025. Variable_name Value
  1026. Qcache_inserts 1
  1027. show status like "Qcache_hits";
  1028. Variable_name Value
  1029. Qcache_hits 1
  1030. select * from (select * from t1) a;
  1031. a
  1032. 1
  1033. 2
  1034. show status like "Qcache_queries_in_cache";
  1035. Variable_name Value
  1036. Qcache_queries_in_cache 1
  1037. show status like "Qcache_inserts";
  1038. Variable_name Value
  1039. Qcache_inserts 2
  1040. show status like "Qcache_hits";
  1041. Variable_name Value
  1042. Qcache_hits 1
  1043. drop table t1;
  1044. create table t1 (a int);
  1045. flush status;
  1046. (select a from t1) union (select a from t1);
  1047. a
  1048. show status like "Qcache_queries_in_cache";
  1049. Variable_name Value
  1050. Qcache_queries_in_cache 1
  1051. show status like "Qcache_inserts";
  1052. Variable_name Value
  1053. Qcache_inserts 1
  1054. show status like "Qcache_hits";
  1055. Variable_name Value
  1056. Qcache_hits 0
  1057. (select a from t1) union (select a from t1);
  1058. a
  1059. show status like "Qcache_queries_in_cache";
  1060. Variable_name Value
  1061. Qcache_queries_in_cache 1
  1062. show status like "Qcache_inserts";
  1063. Variable_name Value
  1064. Qcache_inserts 1
  1065. show status like "Qcache_hits";
  1066. Variable_name Value
  1067. Qcache_hits 1
  1068. set query_cache_strip_comments=1;
  1069. (select a from t1) union (select a from t1);
  1070. a
  1071. (select a from t1) /* */union (select a from t1);
  1072. a
  1073. set query_cache_strip_comments=0;
  1074. (select a from t1) union (select a from t1);
  1075. a
  1076. show status like "Qcache_queries_in_cache";
  1077. Variable_name Value
  1078. Qcache_queries_in_cache 1
  1079. show status like "Qcache_inserts";
  1080. Variable_name Value
  1081. Qcache_inserts 1
  1082. show status like "Qcache_hits";
  1083. Variable_name Value
  1084. Qcache_hits 4
  1085. drop table t1;
  1086. create table t1 (a int);
  1087. insert into t1 values (1),(2);
  1088. drop procedure if exists p1;
  1089. CREATE PROCEDURE `p1`()
  1090. begin
  1091. Declare c1 cursor for select a from t1;
  1092. open c1;
  1093. select * from t1;
  1094. end//
  1095. call p1()//
  1096. a
  1097. 1
  1098. 2
  1099. drop procedure p1//
  1100. create function f1() returns int
  1101. begin
  1102. Declare var1 int;
  1103. select max(a) from t1 into var1;
  1104. return var1;
  1105. end//
  1106. Warnings:
  1107. Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
  1108. create procedure `p1`()
  1109. begin
  1110. select a, f1() from t1;
  1111. end//
  1112. SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators//
  1113. SET GLOBAL log_bin_trust_function_creators = 1//
  1114. call p1()//
  1115. a f1()
  1116. 1 2
  1117. 2 2
  1118. SET GLOBAL log_bin_trust_function_creators = @old_log_bin_trust_function_creators//
  1119. drop procedure p1//
  1120. drop function f1//
  1121. drop table t1//
  1122. flush query cache;
  1123. reset query cache;
  1124. flush status;
  1125. create table t1 (s1 int)//
  1126. create procedure f1 () begin
  1127. select sql_cache * from t1;
  1128. select sql_cache * from t1;
  1129. select sql_cache * from t1;
  1130. end;//
  1131. create procedure f2 () begin
  1132. select sql_cache * from t1 where s1=1;
  1133. select sql_cache * from t1;
  1134. end;//
  1135. create procedure f3 () begin
  1136. select sql_cache * from t1;
  1137. select sql_cache * from t1 where s1=1;
  1138. end;//
  1139. create procedure f4 () begin
  1140. select sql_cache * from t1;
  1141. select sql_cache * from t1 where s1=1;
  1142. select sql_cache * from t1;
  1143. select sql_cache * from t1 where s1=1;
  1144. select sql_cache * from t1 where s1=1;
  1145. end;//
  1146. call f1();
  1147. s1
  1148. s1
  1149. s1
  1150. call f1();
  1151. s1
  1152. s1
  1153. s1
  1154. call f1();
  1155. s1
  1156. s1
  1157. s1
  1158. select sql_cache * from t1;
  1159. s1
  1160. insert into t1 values (1);
  1161. select sql_cache * from t1;
  1162. s1
  1163. 1
  1164. call f1();
  1165. s1
  1166. 1
  1167. s1
  1168. 1
  1169. s1
  1170. 1
  1171. call f1();
  1172. s1
  1173. 1
  1174. s1
  1175. 1
  1176. s1
  1177. 1
  1178. select sql_cache * from t1;
  1179. s1
  1180. 1
  1181. flush query cache;
  1182. reset query cache;
  1183. flush status;
  1184. select sql_cache * from t1;
  1185. s1
  1186. 1
  1187. select sql_cache * from t1 where s1=1;
  1188. s1
  1189. 1
  1190. call f1();
  1191. s1
  1192. 1
  1193. s1
  1194. 1
  1195. s1
  1196. 1
  1197. call f2();
  1198. s1
  1199. 1
  1200. s1
  1201. 1
  1202. call f3();
  1203. s1
  1204. 1
  1205. s1
  1206. 1
  1207. call f4();
  1208. s1
  1209. 1
  1210. s1
  1211. 1
  1212. s1
  1213. 1
  1214. s1
  1215. 1
  1216. s1
  1217. 1
  1218. call f4();
  1219. s1
  1220. 1
  1221. s1
  1222. 1
  1223. s1
  1224. 1
  1225. s1
  1226. 1
  1227. s1
  1228. 1
  1229. call f3();
  1230. s1
  1231. 1
  1232. s1
  1233. 1
  1234. call f2();
  1235. s1
  1236. 1
  1237. s1
  1238. 1
  1239. select sql_cache * from t1 where s1=1;
  1240. s1
  1241. 1
  1242. insert into t1 values (2);
  1243. call f1();
  1244. s1
  1245. 1
  1246. 2
  1247. s1
  1248. 1
  1249. 2
  1250. s1
  1251. 1
  1252. 2
  1253. select sql_cache * from t1 where s1=1;
  1254. s1
  1255. 1
  1256. select sql_cache * from t1;
  1257. s1
  1258. 1
  1259. 2
  1260. call f1();
  1261. s1
  1262. 1
  1263. 2
  1264. s1
  1265. 1
  1266. 2
  1267. s1
  1268. 1
  1269. 2
  1270. call f3();
  1271. s1
  1272. 1
  1273. 2
  1274. s1
  1275. 1
  1276. call f3();
  1277. s1
  1278. 1
  1279. 2
  1280. s1
  1281. 1
  1282. call f1();
  1283. s1
  1284. 1
  1285. 2
  1286. s1
  1287. 1
  1288. 2
  1289. s1
  1290. 1
  1291. 2
  1292. drop procedure f1;
  1293. drop procedure f2;
  1294. drop procedure f3;
  1295. drop procedure f4;
  1296. drop table t1;
  1297. set GLOBAL query_cache_size=0;
  1298. End of 4.1 tests
  1299. SET GLOBAL query_cache_size=102400;
  1300. create table t1(a int);
  1301. insert into t1 values(0), (1), (4), (5);
  1302. select * from t1 where a > 3;
  1303. a
  1304. 4
  1305. 5
  1306. select * from t1 where a > 3;
  1307. a
  1308. 4
  1309. 5
  1310. show status like 'last_query_cost';
  1311. Variable_name Value
  1312. Last_query_cost 0.000000
  1313. drop table t1;
  1314. SET GLOBAL query_cache_size=0;
  1315. set global query_cache_size=1024*1024;
  1316. flush status;
  1317. create table t1 (a int);
  1318. insert into t1 (a) values (1), (2), (3);
  1319. select * from t1;
  1320. a
  1321. 1
  1322. 2
  1323. 3
  1324. show status like 'Qcache_hits';
  1325. Variable_name Value
  1326. Qcache_hits 0
  1327. select * from t1;
  1328. a
  1329. 1
  1330. 2
  1331. 3
  1332. show status like 'Qcache_hits';
  1333. Variable_name Value
  1334. Qcache_hits 1
  1335. create table t2 like t1;
  1336. select * from t1;
  1337. a
  1338. 1
  1339. 2
  1340. 3
  1341. show status like 'Qcache_hits';
  1342. Variable_name Value
  1343. Qcache_hits 2
  1344. insert into t2 select * from t1;
  1345. select * from t1;
  1346. a
  1347. 1
  1348. 2
  1349. 3
  1350. show status like 'Qcache_hits';
  1351. Variable_name Value
  1352. Qcache_hits 3
  1353. drop table t1, t2;
  1354. create table t1(c1 int);
  1355. create table t2(c1 int);
  1356. create table t3(c1 int);
  1357. create view v1 as select t3.c1 as c1 from t3,t2 where t3.c1 = t2.c1;
  1358. start transaction;
  1359. insert into t1(c1) select c1 from v1;
  1360. drop table t1, t2, t3;
  1361. drop view v1;
  1362. create table t1(c1 int);
  1363. insert into t1 values(1),(10),(100);
  1364. select * from t1;
  1365. c1
  1366. 1
  1367. 10
  1368. 100
  1369. select * from t1;
  1370. c1
  1371. 1
  1372. 10
  1373. 100
  1374. select * from t1;
  1375. c1
  1376. 1
  1377. 10
  1378. 100
  1379. select * from t1;
  1380. c1
  1381. 1
  1382. 10
  1383. 100
  1384. drop table t1;
  1385. set global query_cache_size=0;
  1386. create table t1 (a int);
  1387. insert into t1 values (1),(2),(3);
  1388. set GLOBAL query_cache_type=1;
  1389. set GLOBAL query_cache_limit=10240;
  1390. set GLOBAL query_cache_min_res_unit=0;
  1391. set GLOBAL query_cache_size= 102400;
  1392. reset query cache;
  1393. set LOCAL default_week_format = 0;
  1394. select week('2007-01-04');
  1395. week('2007-01-04')
  1396. 0
  1397. select week('2007-01-04') from t1;
  1398. week('2007-01-04')
  1399. 0
  1400. 0
  1401. 0
  1402. select extract(WEEK FROM '2007-01-04') from t1;
  1403. extract(WEEK FROM '2007-01-04')
  1404. 0
  1405. 0
  1406. 0
  1407. set LOCAL default_week_format = 2;
  1408. select week('2007-01-04');
  1409. week('2007-01-04')
  1410. 53
  1411. select week('2007-01-04') from t1;
  1412. week('2007-01-04')
  1413. 53
  1414. 53
  1415. 53
  1416. select extract(WEEK FROM '2007-01-04') from t1;
  1417. extract(WEEK FROM '2007-01-04')
  1418. 53
  1419. 53
  1420. 53
  1421. reset query cache;
  1422. set LOCAL div_precision_increment=2;
  1423. select 1/7;
  1424. 1/7
  1425. 0.14
  1426. select 1/7 from t1;
  1427. 1/7
  1428. 0.14
  1429. 0.14
  1430. 0.14
  1431. set LOCAL div_precision_increment=4;
  1432. select 1/7;
  1433. 1/7
  1434. 0.1429
  1435. select 1/7 from t1;
  1436. 1/7
  1437. 0.1429
  1438. 0.1429
  1439. 0.1429
  1440. drop table t1;
  1441. CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
  1442. INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
  1443. ('Full-text indexes', 'are called collections'),
  1444. ('Only MyISAM tables','support collections'),
  1445. ('Function MATCH ... AGAINST()','is used to do a search'),
  1446. ('Full-text search in MySQL', 'implements vector space model');
  1447. set GLOBAL ft_boolean_syntax='+ -><()~*:""&|';
  1448. select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1;
  1449. a b x
  1450. MySQL has now support for full-text search 0
  1451. Full-text indexes are called collections 1
  1452. Only MyISAM tables support collections 0
  1453. Function MATCH ... AGAINST() is used to do a search 0
  1454. Full-text search in MySQL implements vector space model 0
  1455. set GLOBAL ft_boolean_syntax='- +><()~*:""&|';
  1456. select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1;
  1457. a b x
  1458. MySQL has now support for full-text search 0
  1459. Full-text indexes are called collections 0
  1460. Only MyISAM tables support collections 0
  1461. Function MATCH ... AGAINST() is used to do a search 0
  1462. Full-text search in MySQL implements vector space model 0
  1463. create function change_global() returns integer deterministic
  1464. begin
  1465. set global ft_boolean_syntax='+ -><()~*:""&|';
  1466. return 1;
  1467. end|
  1468. select *, change_global() from t1;
  1469. a b change_global()
  1470. MySQL has now support for full-text search 1
  1471. Full-text indexes are called collections 1
  1472. Only MyISAM tables support collections 1
  1473. Function MATCH ... AGAINST() is used to do a search 1
  1474. Full-text search in MySQL implements vector space model 1
  1475. drop function change_global;
  1476. drop table t1;
  1477. set GLOBAL query_cache_type=default;
  1478. set GLOBAL query_cache_limit=default;
  1479. set GLOBAL query_cache_min_res_unit=default;
  1480. set GLOBAL query_cache_size= default;
  1481. set GLOBAL query_cache_size=1024000;
  1482. create table t1 (a char);
  1483. insert into t1 values ('c');
  1484. a
  1485. drop table t1;
  1486. set GLOBAL query_cache_size= default;
  1487. SET GLOBAL query_cache_size=64*1024*1024;
  1488. CREATE TABLE t1 (id INT);
  1489. CREATE PROCEDURE proc29856(IN theUPC TEXT)
  1490. BEGIN
  1491. SET @stmtStr := '';
  1492. SELECT CONCAT("SELECT id FROM t1 WHERE id IN (",theUPC,")") INTO @stmtStr;
  1493. PREPARE stmt FROM @stmtStr;
  1494. EXECUTE stmt;
  1495. END |
  1496. CALL proc29856('1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
  1497. 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,
  1498. 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,
  1499. 77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,
  1500. 102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,
  1501. 121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,
  1502. 140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,
  1503. 159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,
  1504. 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
  1505. 197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,
  1506. 216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,
  1507. 235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,
  1508. 254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,
  1509. 273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,
  1510. 292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,
  1511. 311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,
  1512. 330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,
  1513. 349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,
  1514. 368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,
  1515. 387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,
  1516. 406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,
  1517. 425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,
  1518. 444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,
  1519. 463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,
  1520. 482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,
  1521. 501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,
  1522. 520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,
  1523. 539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,
  1524. 558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,
  1525. 577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,
  1526. 596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,
  1527. 615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,
  1528. 634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,
  1529. 653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,
  1530. 672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,
  1531. 691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,
  1532. 710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,
  1533. 729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,
  1534. 748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,
  1535. 767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,
  1536. 786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,
  1537. 805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,
  1538. 824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,
  1539. 843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,
  1540. 862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,
  1541. 881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,
  1542. 900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,
  1543. 919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,
  1544. 938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,
  1545. 957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,
  1546. 976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,
  1547. 995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,
  1548. 1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,
  1549. 1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,
  1550. 1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,
  1551. 1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,
  1552. 1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,
  1553. 1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,
  1554. 1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,
  1555. 1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,
  1556. 1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,
  1557. 1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,
  1558. 1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,
  1559. 1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,
  1560. 1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,
  1561. 1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,
  1562. 1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,
  1563. 1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,
  1564. 1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,
  1565. 1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,
  1566. 1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,
  1567. 1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,
  1568. 1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,
  1569. 1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,
  1570. 1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,
  1571. 1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,
  1572. 1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,
  1573. 1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,
  1574. 1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,
  1575. 1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,
  1576. 1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,
  1577. 1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,
  1578. 1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,
  1579. 1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,
  1580. 1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,
  1581. 1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,
  1582. 1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,
  1583. 1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,
  1584. 1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,
  1585. 1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,
  1586. 1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,
  1587. 1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,
  1588. 1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,
  1589. 1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,
  1590. 1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,
  1591. 1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,
  1592. 1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,
  1593. 1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,
  1594. 1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,
  1595. 1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,
  1596. 1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,
  1597. 1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,
  1598. 1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,
  1599. 1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,
  1600. 1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,
  1601. 1806,1807,1808,1809,1810,1811');
  1602. id
  1603. DROP PROCEDURE proc29856;
  1604. DROP TABLE t1;
  1605. SET GLOBAL query_cache_size= default;
  1606. #
  1607. # Bug#25132 disabled query cache: Qcache_free_blocks = 1
  1608. #
  1609. set global query_cache_size=102400;
  1610. set global query_cache_size=0;
  1611. set global query_cache_type=0;
  1612. show status like 'Qcache_free_blocks';
  1613. Variable_name Value
  1614. Qcache_free_blocks 0
  1615. set global query_cache_size=102400;
  1616. show status like 'Qcache_free_blocks';
  1617. Variable_name Value
  1618. Qcache_free_blocks 1
  1619. set global query_cache_type=on;
  1620. set session query_cache_type=on;
  1621. Restore default values.
  1622. drop database if exists db1;
  1623. drop database if exists db2;
  1624. set GLOBAL query_cache_size=15*1024*1024;
  1625. create database db1;
  1626. use db1;
  1627. create table t1(c1 int)engine=myisam;
  1628. insert into t1(c1) values (1);
  1629. select * from db1.t1 f;
  1630. c1
  1631. 1
  1632. show status like 'Qcache_queries_in_cache';
  1633. Variable_name Value
  1634. Qcache_queries_in_cache 1
  1635. create database db2;
  1636. rename table db1.t1 to db2.t2;
  1637. drop database db1;
  1638. show status like 'Qcache_queries_in_cache';
  1639. Variable_name Value
  1640. Qcache_queries_in_cache 0
  1641. drop database db2;
  1642. set global query_cache_size=@save_query_cache_size;
  1643. drop database if exists db1;
  1644. drop database if exists db3;
  1645. set GLOBAL query_cache_size=15*1024*1024;
  1646. create database db1;
  1647. create database db3;
  1648. use db1;
  1649. create table t1(c1 int) engine=myisam;
  1650. use db3;
  1651. create table t1(c1 int) engine=myisam;
  1652. use db1;
  1653. insert into t1(c1) values (1);
  1654. use test;
  1655. select * from db1.t1;
  1656. c1
  1657. 1
  1658. select c1+1 from db1.t1;
  1659. c1+1
  1660. 2
  1661. select * from db3.t1;
  1662. c1
  1663. show status like 'Qcache_queries_in_cache';
  1664. Variable_name Value
  1665. Qcache_queries_in_cache 3
  1666. create database db2;
  1667. rename table db1.t1 to db2.t2;
  1668. drop database db1;
  1669. show status like 'Qcache_queries_in_cache';
  1670. Variable_name Value
  1671. Qcache_queries_in_cache 1
  1672. drop database db2;
  1673. drop database db3;
  1674. set GLOBAL query_cache_type=default;
  1675. set GLOBAL query_cache_limit=default;
  1676. set GLOBAL query_cache_min_res_unit=default;
  1677. set GLOBAL query_cache_size=@save_query_cache_size;
  1678. set local query_cache_type=default;
  1679. set GLOBAL query_cache_type=on;
  1680. set local query_cache_type=on;
  1681. FLUSH STATUS;
  1682. SET GLOBAL query_cache_size=10*1024*1024;
  1683. SET @save_concurrent_insert= @@concurrent_insert;
  1684. SET GLOBAL concurrent_insert= 0;
  1685. CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=MyISAM;
  1686. INSERT INTO t1 (c1) VALUES (1), (2);
  1687. SHOW GLOBAL VARIABLES LIKE 'concurrent_insert';
  1688. Variable_name Value
  1689. concurrent_insert NEVER
  1690. SHOW STATUS LIKE 'Qcache_hits';
  1691. Variable_name Value
  1692. Qcache_hits 0
  1693. SELECT * FROM t1;
  1694. c1
  1695. 1
  1696. 2
  1697. SELECT * FROM t1;
  1698. c1
  1699. 1
  1700. 2
  1701. SHOW STATUS LIKE 'Qcache_hits';
  1702. Variable_name Value
  1703. Qcache_hits 1
  1704. DROP TABLE t1;
  1705. SET GLOBAL concurrent_insert= @save_concurrent_insert;
  1706. SET GLOBAL query_cache_size= default;
  1707. DROP TABLE IF EXISTS t1;
  1708. FLUSH STATUS;
  1709. SET GLOBAL query_cache_size=1048576;
  1710. CREATE TABLE t1 (a INT);
  1711. INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
  1712. SHOW STATUS LIKE 'Qcache_queries_in_cache';
  1713. Variable_name Value
  1714. Qcache_queries_in_cache 0
  1715. SELECT * FROM t1;
  1716. a
  1717. 1
  1718. 2
  1719. 3
  1720. 4
  1721. 5
  1722. BEGIN;
  1723. SELECT * FROM t1;
  1724. a
  1725. 1
  1726. 2
  1727. 3
  1728. 4
  1729. 5
  1730. COMMIT;
  1731. SHOW STATUS LIKE 'Qcache_queries_in_cache';
  1732. Variable_name Value
  1733. Qcache_queries_in_cache 2
  1734. SHOW STATUS LIKE "Qcache_hits";
  1735. Variable_name Value
  1736. Qcache_hits 0
  1737. SELECT * FROM t1;
  1738. a
  1739. 1
  1740. 2
  1741. 3
  1742. 4
  1743. 5
  1744. BEGIN;
  1745. SELECT * FROM t1;
  1746. a
  1747. 1
  1748. 2
  1749. 3
  1750. 4
  1751. 5
  1752. COMMIT;
  1753. SHOW STATUS LIKE "Qcache_hits";
  1754. Variable_name Value
  1755. Qcache_hits 2
  1756. DROP TABLE t1;
  1757. SET GLOBAL query_cache_size= default;
  1758. #------------------------------------------------------------------------
  1759. # Tests for Bug#6760 and Bug#12689
  1760. SET @row_count = 4;
  1761. SET @sleep_time_per_result_row = 1;
  1762. SET @max_acceptable_delay = 2;
  1763. SET @@global.query_cache_size = 1024 * 64;
  1764. DROP TEMPORARY TABLE IF EXISTS t_history;
  1765. DROP TABLE IF EXISTS t1;
  1766. CREATE TEMPORARY TABLE t_history (attempt SMALLINT,
  1767. start_ts DATETIME, end_ts DATETIME,
  1768. start_cached INTEGER, end_cached INTEGER);
  1769. CREATE TABLE t1 (f1 BIGINT);
  1770. INSERT INTO t_history
  1771. SET attempt = 4 - 4 + 1, start_ts = NOW(),
  1772. start_cached = 0;
  1773. SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1;
  1774. f1 SLEEP(@sleep_time_per_result_row)
  1775. 1 0
  1776. 1 0
  1777. 1 0
  1778. 1 0
  1779. UPDATE t_history SET end_ts = NOW()
  1780. WHERE attempt = 4 - 4 + 1;
  1781. UPDATE t_history SET end_cached = 0
  1782. WHERE attempt = 4 - 4 + 1;
  1783. INSERT INTO t_history
  1784. SET attempt = 4 - 3 + 1, start_ts = NOW(),
  1785. start_cached = 0;
  1786. SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1;
  1787. f1 SLEEP(@sleep_time_per_result_row)
  1788. 1 0
  1789. 1 0
  1790. 1 0
  1791. 1 0
  1792. UPDATE t_history SET end_ts = NOW()
  1793. WHERE attempt = 4 - 3 + 1;
  1794. UPDATE t_history SET end_cached = 0
  1795. WHERE attempt = 4 - 3 + 1;
  1796. INSERT INTO t_history
  1797. SET attempt = 4 - 2 + 1, start_ts = NOW(),
  1798. start_cached = 0;
  1799. SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1;
  1800. f1 SLEEP(@sleep_time_per_result_row)
  1801. 1 0
  1802. 1 0
  1803. 1 0
  1804. 1 0
  1805. UPDATE t_history SET end_ts = NOW()
  1806. WHERE attempt = 4 - 2 + 1;
  1807. UPDATE t_history SET end_cached = 0
  1808. WHERE attempt = 4 - 2 + 1;
  1809. INSERT INTO t_history
  1810. SET attempt = 4 - 1 + 1, start_ts = NOW(),
  1811. start_cached = 0;
  1812. SELECT *, SLEEP(@sleep_time_per_result_row) FROM t1;
  1813. f1 SLEEP(@sleep_time_per_result_row)
  1814. 1 0
  1815. 1 0
  1816. 1 0
  1817. 1 0
  1818. UPDATE t_history SET end_ts = NOW()
  1819. WHERE attempt = 4 - 1 + 1;
  1820. UPDATE t_history SET end_cached = 0
  1821. WHERE attempt = 4 - 1 + 1;
  1822. # Test 1: Does the query with SLEEP need a reasonable time?
  1823. SELECT COUNT(*) >= 4 - 1 INTO @aux1 FROM t_history
  1824. WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count
  1825. BETWEEN 0 AND @max_acceptable_delay;
  1826. SELECT @aux1 AS "Expect 1";
  1827. Expect 1
  1828. 1
  1829. # Test 2: Does the query with SLEEP need a reasonable time even in case
  1830. # of the non first execution?
  1831. SELECT COUNT(*) >= 4 - 1 - 1 INTO @aux2 FROM t_history
  1832. WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count
  1833. BETWEEN 0 AND @max_acceptable_delay
  1834. AND attempt > 1;
  1835. SELECT @aux2 AS "Expect 1";
  1836. Expect 1
  1837. 1
  1838. # Test 3: The query with SLEEP must be not cached.
  1839. SELECT COUNT(*) = 4 INTO @aux3 FROM t_history
  1840. WHERE end_cached = start_cached;
  1841. SELECT @aux3 AS "Expect 1";
  1842. Expect 1
  1843. 1
  1844. DROP TABLE t1;
  1845. DROP TEMPORARY TABLE t_history;
  1846. SET @@global.query_cache_size = default;
  1847. End of 5.0 tests
  1848. SET GLOBAL query_cache_size=1024*1024*512;
  1849. CREATE TABLE t1 (a ENUM('rainbow'));
  1850. INSERT INTO t1 VALUES (),(),(),(),();
  1851. SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
  1852. 1
  1853. 1
  1854. DROP TABLE t1;
  1855. CREATE TABLE t1 (a LONGBLOB);
  1856. INSERT INTO t1 SET a = 'aaaa';
  1857. INSERT INTO t1 SET a = 'aaaa';
  1858. SELECT 1 FROM t1 GROUP BY
  1859. (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1);
  1860. 1
  1861. 1
  1862. DROP TABLE t1;
  1863. SET GLOBAL query_cache_size= default;
  1864. CREATE TABLE t1( a INT );
  1865. SET @v = ( SELECT SQL_CACHE 1 );
  1866. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1867. SET @v = ( SELECT SQL_NO_CACHE 1 );
  1868. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1869. SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE a FROM t1 );
  1870. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1871. SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 );
  1872. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1873. SELECT ( SELECT SQL_CACHE a FROM t1 );
  1874. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1875. SELECT ( SELECT SQL_NO_CACHE a FROM t1 );
  1876. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1877. SELECT SQL_CACHE * FROM t1;
  1878. a
  1879. SELECT SQL_NO_CACHE * FROM t1;
  1880. a
  1881. SELECT * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
  1882. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1883. SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
  1884. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1885. SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1);
  1886. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1887. SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1);
  1888. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1889. SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
  1890. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1891. SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1);
  1892. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1893. SELECT * FROM t1 WHERE a IN
  1894. (SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
  1895. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1896. SELECT SQL_CACHE SQL_NO_CACHE * FROM t1;
  1897. ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
  1898. SELECT SQL_NO_CACHE SQL_CACHE * FROM t1;
  1899. ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
  1900. SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
  1901. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1902. SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
  1903. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1904. SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
  1905. ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
  1906. SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
  1907. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1908. SELECT SQL_CACHE * FROM t1 WHERE a IN
  1909. (SELECT SQL_NO_CACHE a FROM t1);
  1910. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1911. SELECT SQL_CACHE * FROM t1 WHERE a IN
  1912. (SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
  1913. ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
  1914. DROP TABLE t1;
  1915. End of 5.1 tests
  1916. #
  1917. # Bug#51336 Assert in reload_acl_and_cache during RESET QUERY CACHE
  1918. #
  1919. DROP TABLE IF EXISTS t1;
  1920. CREATE TABLE t1(id INT);
  1921. START TRANSACTION;
  1922. SELECT * FROM t1;
  1923. id
  1924. RESET QUERY CACHE;
  1925. COMMIT;
  1926. DROP TABLE t1;
  1927. New query cache switching OFF mechanism test
  1928. set global query_cache_size=1024*1024*20;
  1929. set global query_cache_type=on;
  1930. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1931. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1932. 20971520 ON ON
  1933. set global query_cache_size=0;
  1934. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1935. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1936. 0 ON ON
  1937. set global query_cache_size=1024*1024*20;
  1938. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1939. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1940. 20971520 ON ON
  1941. set global query_cache_type=off;
  1942. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1943. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1944. 20971520 OFF OFF
  1945. set global query_cache_type=on;
  1946. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1947. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1948. 20971520 ON OFF
  1949. set local query_cache_type= on;
  1950. select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
  1951. @@query_cache_size @@global.query_cache_type @@local.query_cache_type
  1952. 20971520 ON ON
  1953. #
  1954. # MDEV-4981: Account for queries handled by query-cache in
  1955. # USER_STATISTICS (and in HOST_STATISTICS)
  1956. #
  1957. set @save_userstat=@@global.userstat;
  1958. SET GLOBAL userstat=1;
  1959. set GLOBAL query_cache_size=1355776;
  1960. FLUSH USER_STATISTICS;
  1961. FLUSH CLIENT_STATISTICS;
  1962. reset query cache;
  1963. flush status;
  1964. create table t1 (a int);
  1965. insert into t1 values (1);
  1966. select * from t1;
  1967. a
  1968. 1
  1969. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  1970. where CLIENT="localhost";
  1971. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  1972. 1 1 0
  1973. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  1974. where USER="root";
  1975. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  1976. 2 2 0
  1977. show status like "Qcache_hits";
  1978. Variable_name Value
  1979. Qcache_hits 0
  1980. select * from t1;
  1981. a
  1982. 1
  1983. select * from t1;
  1984. a
  1985. 1
  1986. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  1987. where CLIENT="localhost";
  1988. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  1989. 5 5 0
  1990. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  1991. where USER="root";
  1992. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  1993. 6 6 0
  1994. show status like "Qcache_hits";
  1995. Variable_name Value
  1996. Qcache_hits 2
  1997. drop table t1;
  1998. FLUSH USER_STATISTICS;
  1999. FLUSH CLIENT_STATISTICS;
  2000. flush status;
  2001. create table t1 (a int);
  2002. select * from t1;
  2003. a
  2004. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2005. where CLIENT="localhost";
  2006. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2007. 1 0 1
  2008. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2009. where USER="root";
  2010. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2011. 2 1 1
  2012. show status like "Qcache_hits";
  2013. Variable_name Value
  2014. Qcache_hits 0
  2015. select * from t1;
  2016. a
  2017. select * from t1;
  2018. a
  2019. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2020. where CLIENT="localhost";
  2021. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2022. 5 2 3
  2023. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2024. where USER="root";
  2025. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2026. 6 3 3
  2027. show status like "Qcache_hits";
  2028. Variable_name Value
  2029. Qcache_hits 2
  2030. FLUSH USER_STATISTICS;
  2031. FLUSH CLIENT_STATISTICS;
  2032. flush status;
  2033. create procedure p1()
  2034. select * from t1;
  2035. call p1;
  2036. a
  2037. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2038. where CLIENT="localhost";
  2039. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2040. 1 0 1
  2041. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2042. where USER="root";
  2043. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2044. 2 1 1
  2045. show status like "Qcache_hits";
  2046. Variable_name Value
  2047. Qcache_hits 0
  2048. call p1;
  2049. a
  2050. call p1;
  2051. a
  2052. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2053. where CLIENT="localhost";
  2054. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2055. 5 2 3
  2056. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2057. where USER="root";
  2058. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2059. 6 3 3
  2060. show status like "Qcache_hits";
  2061. Variable_name Value
  2062. Qcache_hits 2
  2063. FLUSH USER_STATISTICS;
  2064. FLUSH CLIENT_STATISTICS;
  2065. flush status;
  2066. SET GLOBAL query_cache_size= 0;
  2067. call p1;
  2068. a
  2069. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2070. where CLIENT="localhost";
  2071. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2072. 1 0 1
  2073. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2074. where USER="root";
  2075. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2076. 2 1 1
  2077. show status like "Qcache_hits";
  2078. Variable_name Value
  2079. Qcache_hits 0
  2080. call p1;
  2081. a
  2082. call p1;
  2083. a
  2084. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS
  2085. where CLIENT="localhost";
  2086. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2087. 5 2 3
  2088. select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS
  2089. where USER="root";
  2090. SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES
  2091. 6 3 3
  2092. show status like "Qcache_hits";
  2093. Variable_name Value
  2094. Qcache_hits 0
  2095. drop procedure p1;
  2096. drop table t1;
  2097. set GLOBAL query_cache_size=1355776;
  2098. SET GLOBAL userstat=@save_userstat;
  2099. #
  2100. # MDEV-5924: MariaDB could crash after changing the query_cache size
  2101. #
  2102. SET GLOBAL query_cache_size= 50*1024;
  2103. SET GLOBAL query_cache_type= 1;
  2104. SET query_cache_type= 1;
  2105. CREATE TABLE t1 (pk INT);
  2106. CREATE VIEW v1 AS SELECT * FROM t1;
  2107. SELECT * FROM v1 WHERE pk IN (5178922,5178924,6911605,6584899,1754348,7735031,9583206,8377182,6309967,3110885,7197937,5582397,9811721,8310302,7001831,3687942,8454635,8743988,9524703,3313583,1376007,5276565,7238861,5307189,2242691,2052764,8160476,7668014,5891525,9070968,1989181,3014068,5365005,2974655,6877822,7813446,6188705,1028564,6426696,6098205,7231857,2749710,4996963,9879425,2995803,8160614,1934799,1981216,3673522,2135299,4803054,8515609,1825485,5805694,8211425,3712249,8013259,3496368,4339706,2326187,3236816,8158416,5749801,6339492,2517486,1769729,2576400,8177368,5471847,4670669,5694046,5155990,1219314,1304321,7951736,2381942,1467330,3329376,6069503,3821151,8118179,4575775,5291671,4757186,6241302,9809112,5388351,3356292,5753921,8776535,7101943,8558868,6655212,5498901,1629516,8016143,1156005,1280700,9236450,8289703,4549957,5404968,3594833,3034667,3167602,7983322,3939941,8382949,9258422,6927947,9639236,3246566,3144943,5516067,5266540,3760726,6491516,9515090,7776229,1582824,4031951,3336517,5871612,4268432,2600433,6188018,6158355,6442214,7808502,7692871,9180969,3982238,9212692,9944381,3932525,5937118,6315460,2464477,1933151,3393646,4244674,7036026,1470764,3015029,2453765,9876129,2097534,3467391,4287658,8120651,4975540,4454101,7758102,6087905,2167022,7575454,5370086,8289703,7460235,8734512,7346801,6660293,5826843,4305511,8093597,8970031,9104476,1784973,9245925,6893890,4996414,3144393,1145568,2702056,4984878,5602859,7088073,2044113,5248275,6037094,2185287,1791564,3180374,8750991,9187011,6411453,9600372,4819671,3105667,2837051,1252548,3729003,7986618,8305633,5684432,4528808,8670104,4132202,2101516,5218475,6885513,4886413,1288803,9584167,6524475,3943649,6195846,4204986,5435592,8877334,9276275,8848358,3583435,6662216,7178298,1973526,5917205,9156387,8877334,4559432,2792144,9831634,8846710,6979858,5287277,2220718,9358123,4140029,1263122,8049789,9508361,3597030,8504348,4525924,9062866,1880691,9788375,4746612,7711822,9735366,9227523,9701721,2832519,4498870,3725021,4836151,2351181,7339935,9890686,7641098,1797607,1571838,3258377,6244186,5147476,6760543,9151580,2465576,2545776,6846237,4037582,8310440,2503616,1998245,1716445,2364913,4665039,8420440,1187728,1065917,1734710,5826705,8538681,8311950,4662017,7804519,7696853,7385116,8674362,2787612,2393341,1652313,2254364,3852737,4177108,7013641,8654037,9062728,7826629,2569396,1039138,2572692,9001892,3470550,4859359,5218887,6479568,1424621,3535644,7808639,7817291,8825149,6060302,2830047,7787765,5971313,9603256,1800491,3429214,9350021,8716796,1972564,6054946,6445510,9234802,5616729,6064559,2048233,9458511,1597244,3902862,2530120,5723846,3463821,9008346,3055130,2941696,8774337,3095367,2195037,6208480,9869262,3615295,9916641,1078002,1815597,7737228,1412261,6588607,9740173,6696411,7740386,1641326,9269546,3848754,7745193,6819458,5297164,1280975,1224395,5247589,7793533,5314743,8814025,2579010,7882659,6753128,9558349,8710067,7898727,4209106,2634902,7311233,1644897,8363449,6201339,1770828,3572174,5493408,8835449,5644332,5096115,7116088,1534484,3204544,1772064,2091903,6744476,9183166,5546005,1030075,7387725,1300888,5799789,7340209,7356552,7677627,9410995,5775894,9442581,5718353,6544937,9809524,7171569,4565475,1397293,6687759,1509353,3715682,8607208,3506118,3910827,1890167,1559341,4150329,9679336,9756927,1292373,3445419,2105361,6594238,4234237,8359466,7352432,1492462,9482818,1601226,8561614,4186584,5849365,1460189,9139495,3113357,8384460,7229660,8701553,7786254,4606399,2057708,1638992,1083221,8147293,9569198,4776550,2539871,8040039,7104141,8090713,7242568,2361480,6913940,7958053,1414596,3451461,9160644,7901473,8289703,5428588,3063232,2302291,5366378,8216918,8033447,8048965,8636322,7807952,7146026,6589569,2882644,1971328,7786392,5357864,4637985,2137222,9819961,9039932,8900680,1666732,8126968,1652999,7199035,8229003,7845581,8902328,8100051,9506164,8168579,8786560,4753890,6941268,5035552,2919860,9570983,4751968,4566574,7540023,1621963,7924270,7578750,6669494,5857192,6409805,2030792,4401779,5737991,8241088,4739746,2776901,7373718,8786697,9211593,6219741,1758331,3863586,6932754,5006164,8200302,5925033,1
  2108. pk
  2109. DROP VIEW v1;
  2110. DROP TABLE t1;
  2111. End of 5.5 tests
  2112. #
  2113. # Bug#12977203: SERVER CRASH ON A DERIVED TABLE WITH QUERY CACHE ENABLED
  2114. #
  2115. SET @qc= @@query_cache_size;
  2116. SET GLOBAL query_cache_size=1355776;
  2117. CREATE TABLE t1 (f1 blob);
  2118. SELECT COUNT(*) FROM (SELECT * FROM t1 ) tt;
  2119. COUNT(*)
  2120. 0
  2121. DROP TABLE t1;
  2122. SET GLOBAL query_cache_size= @qc;
  2123. #
  2124. # MDEV-617 LP:671189 - Query cache is not used for tables or
  2125. # databases with dots in their names
  2126. #
  2127. CREATE DATABASE `foo.bar`;
  2128. use `foo.bar`;
  2129. flush status;
  2130. CREATE TABLE moocow (a int);
  2131. INSERT INTO moocow VALUES (1), (2), (3);
  2132. SHOW STATUS LIKE 'Qcache_inserts';
  2133. Variable_name Value
  2134. Qcache_inserts 0
  2135. SELECT * FROM moocow;
  2136. a
  2137. 1
  2138. 2
  2139. 3
  2140. SHOW STATUS LIKE 'Qcache_inserts';
  2141. Variable_name Value
  2142. Qcache_inserts 1
  2143. SHOW STATUS LIKE 'Qcache_hits';
  2144. Variable_name Value
  2145. Qcache_hits 0
  2146. SELECT * FROM moocow;
  2147. a
  2148. 1
  2149. 2
  2150. 3
  2151. SHOW STATUS LIKE 'Qcache_hits';
  2152. Variable_name Value
  2153. Qcache_hits 1
  2154. use test;
  2155. drop database `foo.bar`;
  2156. End of 10.0 tests
  2157. #
  2158. # MDEV-10766 Queries which start with WITH clause do not get
  2159. # inserted into query cache
  2160. #
  2161. flush status;
  2162. show status like "Qcache_inserts";
  2163. Variable_name Value
  2164. Qcache_inserts 0
  2165. create table t1 (i int);
  2166. with cte as (select * from t1) select * from cte;
  2167. i
  2168. show status like "Qcache_queries_in_cache";
  2169. Variable_name Value
  2170. Qcache_queries_in_cache 1
  2171. show status like "Qcache_inserts";
  2172. Variable_name Value
  2173. Qcache_inserts 1
  2174. show status like "Qcache_hits";
  2175. Variable_name Value
  2176. Qcache_hits 0
  2177. with cte as (select * from t1) select * from cte;
  2178. i
  2179. show status like "Qcache_queries_in_cache";
  2180. Variable_name Value
  2181. Qcache_queries_in_cache 1
  2182. show status like "Qcache_inserts";
  2183. Variable_name Value
  2184. Qcache_inserts 1
  2185. show status like "Qcache_hits";
  2186. Variable_name Value
  2187. Qcache_hits 1
  2188. drop table t1;
  2189. #
  2190. # MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
  2191. # LAST_INSERT_ID ()
  2192. # (part 2, part 1 is in sp.test)
  2193. #
  2194. create table t1 (a int);
  2195. insert into t1 values (1);
  2196. CREATE FUNCTION foo (i INT UNSIGNED ) RETURNS int deterministic RETURN 1;
  2197. show status like "Qcache_queries_in_cache";
  2198. Variable_name Value
  2199. Qcache_queries_in_cache 0
  2200. SELECT foo( LAST_INSERT_ID() ) from t1;
  2201. foo( LAST_INSERT_ID() )
  2202. 1
  2203. show status like "Qcache_queries_in_cache";
  2204. Variable_name Value
  2205. Qcache_queries_in_cache 0
  2206. DROP FUNCTION foo;
  2207. drop table t1;
  2208. #
  2209. # MDEV-33861: main.query_cache fails with embedded after
  2210. # enabling WITH_PROTECT_STATEMENT_MEMROOT
  2211. #
  2212. create table t1 (s1 int);
  2213. create procedure f3 () begin
  2214. select * from t1;
  2215. end;
  2216. //
  2217. create procedure f4 () begin
  2218. select * from t1;
  2219. end;
  2220. //
  2221. Call f4();
  2222. s1
  2223. cAll f3();
  2224. s1
  2225. insert into t1 values (2);
  2226. caLl f3();
  2227. s1
  2228. 2
  2229. drop procedure f3;
  2230. drop procedure f4;
  2231. drop table t1;
  2232. #
  2233. # End of 10.4 tests
  2234. #
  2235. #
  2236. # MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
  2237. #
  2238. SET @qc= @@query_cache_size;
  2239. set global Query_cache_size=18446744073709547520;
  2240. SET GLOBAL query_cache_size= @qc;
  2241. #
  2242. # MDEV-34075 corruption when query cache cannot allocate block
  2243. #
  2244. set global query_cache_type=1;
  2245. create table t1 (c1 smallint null, c2 binary (25) not null, c3 tinyint(4) null, c4 binary (15) not null primary key, c5 smallint not null unique key,c6 decimal(10,8) not null default 3.141592) engine=innodb;
  2246. set global query_cache_size=81920;
  2247. select * from t1 where b=1 and c=1;
  2248. ERROR 42S22: Unknown column 'b' in 'WHERE'
  2249. set session query_cache_type=1;
  2250. drop table t1;
  2251. create table t1 (c1 int not null, c2 char(5)) engine=innodb partition by linear key(c1) partitions 99;
  2252. select * from t1 where c1 <='1998-12-29 00:00:00' order by c1,c2;
  2253. c1 c2
  2254. select group_concat(a separator '###') as names from t1 having left(names, 1)='j';
  2255. ERROR 42S22: Unknown column 'a' in 'SELECT'
  2256. select * from t1;
  2257. c1 c2
  2258. select count(*) from t1;
  2259. count(*)
  2260. 0
  2261. select G.a, c.a from t1 c, t1 G;
  2262. ERROR 42S22: Unknown column 'G.a' in 'SELECT'
  2263. drop table t1;
  2264. #
  2265. # End of 10.5 tests
  2266. #
  2267. #
  2268. # MDEV-22301 JSON_TABLE: Queries are not inserted into query cache.
  2269. #
  2270. create table t1 (a text);
  2271. insert into t1 values ('{"a":"foo"}');
  2272. flush status;
  2273. SHOW STATUS LIKE 'Qcache_inserts';
  2274. Variable_name Value
  2275. Qcache_inserts 0
  2276. select * from t1, json_table(t1.a, '$' columns (f varchar(20) path '$.a')) as jt;
  2277. a f
  2278. {"a":"foo"} foo
  2279. SHOW STATUS LIKE 'Qcache_inserts';
  2280. Variable_name Value
  2281. Qcache_inserts 1
  2282. drop table t1;
  2283. #
  2284. # MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
  2285. #
  2286. CREATE TABLE t (a INT);
  2287. SELECT * FROM t JOIN JSON_TABLE('{}' , '$' COLUMNS(b FOR ORDINALITY)) AS jt;
  2288. a b
  2289. DROP TABLE t;
  2290. restore defaults
  2291. SET GLOBAL query_cache_type= default;
  2292. SET GLOBAL query_cache_size=@save_query_cache_size;
  2293. # End of 10.6 tests