From 95a937e368e20027ce126fecc257d31c8a10dcc9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Sep 2012 10:30:53 +0200 Subject: [PATCH 01/47] Raise version number after cloning 5.1.66 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 068328992e0..9f361d88a38 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ dnl dnl When changing the major version number please also check the switch dnl statement in mysqlbinlog::check_master_version(). You may also need dnl to update version.c in ndb. -AC_INIT([MySQL Server], [5.1.66], [], [mysql]) +AC_INIT([MySQL Server], [5.1.67], [], [mysql]) AC_CONFIG_SRCDIR([sql/mysqld.cc]) AC_CANONICAL_SYSTEM From 0678a68bd0edeaa48a6e912d5a0bf3b65fb78fb0 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Mon, 10 Sep 2012 17:32:04 +0300 Subject: [PATCH 02/47] Bug#14597605 Issue with Null-value user on slave An "orthographic" typo in User_var::set_deferred() was made in fixes for bug@14275000. While editing the signature of the initial patch to remove the only argument, the assigned value of the argument remained in the body ... to be successfully compiled (!) thanks to names coincidence: the arg to User_var method and its member. Fixed with correcting the typo. --- sql/log_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log_event.h b/sql/log_event.h index 5030e1c6f3d..6b411a90382 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2508,7 +2508,7 @@ public: and which case the applier adjusts execution path. */ bool is_deferred() { return deferred; } - void set_deferred() { deferred= val; } + void set_deferred() { deferred= true; } #endif bool is_valid() const { return 1; } From 575a64c48edcc049ae2ec09bffd72f37adbae3da Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Tue, 11 Sep 2012 20:56:22 +0200 Subject: [PATCH 03/47] Backport this change from MySQL 5.5 to 5.1: Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL The script is different from what's used on unixes. It was not playing the table insertion script (mysql_system_tables_data.sql), although it was checking for the presence of this script. Fixed by re-enabling the lookup for this file and replaying it at bootstrap time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified name, whereas on Windows it returns only a hostname. So by default we're filtering records in the mysql.user table until we ensure this is fixed. The change was coded in 5.5 by Georgi Kodinov --- scripts/mysql_install_db.pl.in | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index c63da6df537..12cd6a21ad1 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -423,10 +423,11 @@ my $mysqld_install_cmd_line = quote_options($mysqld_bootstrap, "--bootstrap", "--basedir=$opt->{basedir}", "--datadir=$opt->{ldata}", - "--skip-innodb", - "--skip-bdb", - "--skip-ndbcluster", + "--log-warnings=0", + "--loose-skip-innodb", + "--loose-skip-ndbcluster", "--max_allowed_packet=8M", + "--default-storage-engine=MyISAM", "--net_buffer_length=16K", @args, ); @@ -439,6 +440,8 @@ report_verbose_wait($opt,"Installing MySQL system tables..."); open(SQL, $create_system_tables) or error($opt,"can't open $create_system_tables for reading: $!"); +open(SQL2, $fill_system_tables) + or error($opt,"can't open $fill_system_tables for reading: $!"); # FIXME > /dev/null ? if ( open(PIPE, "| $mysqld_install_cmd_line") ) { @@ -452,8 +455,20 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) print PIPE $_; } + while ( ) + { + # TODO: make it similar to the above condition when we're sure + # @@hostname returns a fqdn + # When doing a "cross bootstrap" install, no reference to the current + # host should be added to the system tables. So we filter out any + # lines which contain the current host name. + next if /\@current_hostname/; + + print PIPE $_; + } close PIPE; close SQL; + close SQL2; report_verbose($opt,"OK"); From f0b52a9e7e26b761e14911a7a072d4cf91ceab54 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 12 Sep 2012 08:36:12 +0200 Subject: [PATCH 04/47] Backport Bug#13724099 --- sql/sql_list.h | 11 +++++++++-- sql/sql_select.cc | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/sql/sql_list.h b/sql/sql_list.h index 81283a6ae53..2eef291d948 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -1,7 +1,6 @@ #ifndef INCLUDES_MYSQL_SQL_LIST_H #define INCLUDES_MYSQL_SQL_LIST_H -/* - Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -165,6 +164,14 @@ protected: public: uint elements; + bool operator==(const base_list &rhs) const + { + return + elements == rhs.elements && + first == rhs.first && + last == rhs.last; + } + inline void empty() { elements=0; first= &end_of_list; last=&first;} inline base_list() { empty(); } /** diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 042e7563d42..bcf601e5142 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1676,6 +1676,8 @@ JOIN::optimize() */ void JOIN::restore_tmp() { + DBUG_PRINT("info", ("restore_tmp this %p tmp_join %p", this, tmp_join)); + DBUG_ASSERT(tmp_join != this); memcpy(tmp_join, this, (size_t) sizeof(JOIN)); } @@ -7090,13 +7092,18 @@ void JOIN::cleanup(bool full) { if (tmp_join) tmp_table_param.copy_field= 0; - group_fields.delete_elements(); + /* - Ensure that the above delete_elements() would not be called + Ensure that the following delete_elements() would not be called twice for the same list. */ - if (tmp_join && tmp_join != this) - tmp_join->group_fields= group_fields; + if (tmp_join && tmp_join != this && + tmp_join->group_fields == this->group_fields) + tmp_join->group_fields.empty(); + + // Run Cached_item DTORs! + group_fields.delete_elements(); + /* We can't call delete_elements() on copy_funcs as this will cause problems in free_elements() as some of the elements are then deleted. From ab7358fb35c01df5a716c0b15d041bdf2ceae71e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Sep 2012 15:08:44 +0300 Subject: [PATCH 05/47] From 5cbdb908270a052284155cd5b7eff7eacb177218 Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Mon, 17 Sep 2012 11:48:02 +0530 Subject: [PATCH 06/47] Bug#11750014:ASSERTION TRX_DATA->EMPTY() IN BINLOG_CLOSE_CONNECTION Problem: ======= trx_data->empty() assert happens at `binlog_close_connection' Analysis: ======== trx_data->empty() function checks for no pending events and the transaction cache to be empty.This function returns "true" if no pending events are present and cache is empty. Otherwise it returns false. `binlog_close_connection' call expects the above function to return true. But if the return value is false then assert is raised. This bug was reproducible in a diskfull scenario. In this disk full scenario try to do an insert operation so that a new pending event is created and flushing this pending event fails. Due to this failure the server goes down and invokes `binlog_close_connection' for clean closure. Since the pending event still remains the assert is caused. This assert is caused only in non transactional databases. Fix: === In a disk full scenario when the insertion fails the transaction is rolled back and `binlog_end_trans` is called to flush the pending events. But flush operation fails as the disk is full and the function simply returns `1' without taking any action to delete the pending event. This leaves the event to remain till the closure of connection. `delete pending' statement has been added to do the required clean up action. sql/log.cc: Added "delete pending" statement to clean pending event --- sql/log.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/log.cc b/sql/log.cc index 57c14b24782..7e0e90e28c0 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -4313,10 +4313,16 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd, /* Write pending event to log file or transaction cache */ + DBUG_EXECUTE_IF("simulate_disk_full_at_flush_pending", + {DBUG_SET("+d,simulate_file_write_error");}); if (pending->write(file)) { pthread_mutex_unlock(&LOCK_log); set_write_error(thd); + delete pending; + trx_data->set_pending(NULL); + DBUG_EXECUTE_IF("simulate_disk_full_at_flush_pending", + {DBUG_SET("-d,simulate_file_write_error");}); DBUG_RETURN(1); } From 300f3fb77f3cc402b454a5f35e56efcefa2e7fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 17 Sep 2012 14:21:00 +0300 Subject: [PATCH 07/47] Bug#12701488 ASSERT PAGE_ZIP_VALIDATE, UNIV_ZIP_DEBUG page_zip_validate(), page_zip_validate_low(): Add a parameter for the B-tree index. page_zip_validate_low(): If the page contents does not match, check that the record link chains match. Furthermore, if dict_index_t is passed, check that the records match. (This reduces coverage a bit: if index=NULL, we will ignore differences in record contents, that is, the page payload.) rb:1264 approved by Inaam Rana --- storage/innodb_plugin/ChangeLog | 7 ++ storage/innodb_plugin/btr/btr0btr.c | 34 ++--- storage/innodb_plugin/btr/btr0cur.c | 25 ++-- storage/innodb_plugin/buf/buf0lru.c | 4 +- storage/innodb_plugin/include/page0zip.h | 8 +- storage/innodb_plugin/log/log0recv.c | 5 +- storage/innodb_plugin/page/page0cur.c | 6 +- storage/innodb_plugin/page/page0page.c | 14 ++- storage/innodb_plugin/page/page0zip.c | 151 ++++++++++++++++------- 9 files changed, 168 insertions(+), 86 deletions(-) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 4ef88e3bca1..7521b593aa2 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,10 @@ +2012-09-17 The InnoDB Team + + * btr/btr0btr.c, btr/btr0cur.c, buf/buf0lru.c, + include/page0zip.h, log/log0recv.c, page/page0cur.c, + page/page0page.c, page/page0zip.c: + Fix Bug#12701488 ASSERT PAGE_ZIP_VALIDATE, UNIV_ZIP_DEBUG + 2012-08-29 The InnoDB Team * btr/btr0btr.c, page/page0cur.c, page/page0page.c: diff --git a/storage/innodb_plugin/btr/btr0btr.c b/storage/innodb_plugin/btr/btr0btr.c index 604c56b5e73..9fef7843f9a 100644 --- a/storage/innodb_plugin/btr/btr0btr.c +++ b/storage/innodb_plugin/btr/btr0btr.c @@ -1573,7 +1573,7 @@ btr_page_reorganize_low( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(!!page_is_comp(page) == dict_table_is_comp(index->table)); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ data_size1 = page_get_data_size(page); max_ins_size1 = page_get_max_insert_size_after_reorganize(page, 1); @@ -1691,7 +1691,7 @@ btr_page_reorganize_low( func_exit: #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ #ifndef UNIV_HOTBACKUP buf_block_free(temp_block); @@ -1766,7 +1766,7 @@ btr_page_empty( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(page_zip == buf_block_get_page_zip(block)); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ btr_search_drop_page_hash_index(block); @@ -1823,10 +1823,10 @@ btr_root_raise_and_insert( root_block = btr_cur_get_block(cursor); root_page_zip = buf_block_get_page_zip(root_block); ut_ad(page_get_n_recs(root) > 0); -#ifdef UNIV_ZIP_DEBUG - ut_a(!root_page_zip || page_zip_validate(root_page_zip, root)); -#endif /* UNIV_ZIP_DEBUG */ index = btr_cur_get_index(cursor); +#ifdef UNIV_ZIP_DEBUG + ut_a(!root_page_zip || page_zip_validate(root_page_zip, root, index)); +#endif /* UNIV_ZIP_DEBUG */ #ifdef UNIV_BTR_DEBUG if (!dict_index_is_ibuf(index)) { ulint space = dict_index_get_space(index); @@ -2756,8 +2756,8 @@ insert_empty: #ifdef UNIV_ZIP_DEBUG if (UNIV_LIKELY_NULL(page_zip)) { - ut_a(page_zip_validate(page_zip, page)); - ut_a(page_zip_validate(new_page_zip, new_page)); + ut_a(page_zip_validate(page_zip, page, cursor->index)); + ut_a(page_zip_validate(new_page_zip, new_page, cursor->index)); } #endif /* UNIV_ZIP_DEBUG */ @@ -2791,7 +2791,8 @@ insert_empty: = buf_block_get_page_zip(insert_block); ut_a(!insert_page_zip - || page_zip_validate(insert_page_zip, insert_page)); + || page_zip_validate(insert_page_zip, insert_page, + cursor->index)); } #endif /* UNIV_ZIP_DEBUG */ @@ -3156,7 +3157,7 @@ btr_lift_page_up( btr_page_set_level(page, page_zip, page_level, mtr); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ } @@ -3332,8 +3333,8 @@ err_exit: const page_zip_des_t* page_zip = buf_block_get_page_zip(block); ut_a(page_zip); - ut_a(page_zip_validate(merge_page_zip, merge_page)); - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(merge_page_zip, merge_page, index)); + ut_a(page_zip_validate(page_zip, page, index)); } #endif /* UNIV_ZIP_DEBUG */ @@ -3466,7 +3467,8 @@ err_exit: ut_ad(page_validate(merge_page, index)); #ifdef UNIV_ZIP_DEBUG - ut_a(!merge_page_zip || page_zip_validate(merge_page_zip, merge_page)); + ut_a(!merge_page_zip || page_zip_validate(merge_page_zip, merge_page, + index)); #endif /* UNIV_ZIP_DEBUG */ /* Free the file page */ @@ -3649,7 +3651,7 @@ btr_discard_page( page_zip_des_t* merge_page_zip = buf_block_get_page_zip(merge_block); ut_a(!merge_page_zip - || page_zip_validate(merge_page_zip, merge_page)); + || page_zip_validate(merge_page_zip, merge_page, index)); } #endif /* UNIV_ZIP_DEBUG */ @@ -4126,7 +4128,7 @@ btr_validate_level( ut_a(space == page_get_space_id(page)); #ifdef UNIV_ZIP_DEBUG page_zip = buf_block_get_page_zip(block); - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ ut_a(!page_is_leaf(page)); @@ -4154,7 +4156,7 @@ loop: #ifdef UNIV_ZIP_DEBUG page_zip = buf_block_get_page_zip(block); - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ /* Check ordering etc. of records */ diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index 8fb4366d894..798d2822431 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -578,7 +578,8 @@ retry_page_get: #ifdef UNIV_ZIP_DEBUG const page_zip_des_t* page_zip = buf_block_get_page_zip(block); - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip + || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ buf_block_dbg_add_level( @@ -1939,7 +1940,7 @@ any_extern: page_zip = buf_block_get_page_zip(block); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ if (page_zip @@ -2148,7 +2149,7 @@ btr_cur_pessimistic_update( MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ /* The insert buffer tree should never be updated in place. */ ut_ad(!dict_index_is_ibuf(index)); @@ -2286,7 +2287,7 @@ make_external: btr_search_update_hash_on_delete(cursor); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ page_cursor = btr_cur_get_page_cur(cursor); @@ -2393,7 +2394,7 @@ make_external: buf_block_t* rec_block = btr_cur_get_block(cursor); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); page = buf_block_get_frame(rec_block); #endif /* UNIV_ZIP_DEBUG */ page_zip = buf_block_get_page_zip(rec_block); @@ -2419,7 +2420,7 @@ make_external: return_after_reservations: #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ if (n_extents > 0) { @@ -2880,12 +2881,14 @@ btr_cur_optimistic_delete( page, 1); } #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip + || page_zip_validate(page_zip, page, cursor->index)); #endif /* UNIV_ZIP_DEBUG */ page_cur_delete_rec(btr_cur_get_page_cur(cursor), cursor->index, offsets, mtr); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip + || page_zip_validate(page_zip, page, cursor->index)); #endif /* UNIV_ZIP_DEBUG */ if (dict_index_is_clust(cursor->index) @@ -2980,7 +2983,7 @@ btr_cur_pessimistic_delete( rec = btr_cur_get_rec(cursor); page_zip = buf_block_get_page_zip(block); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap); @@ -2990,7 +2993,7 @@ btr_cur_pessimistic_delete( rec, offsets, page_zip, rb_ctx, mtr); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ } @@ -3051,7 +3054,7 @@ btr_cur_pessimistic_delete( page_cur_delete_rec(btr_cur_get_page_cur(cursor), index, offsets, mtr); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ ut_ad(btr_check_node_ptr(index, block, mtr)); diff --git a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c index 5124787eba1..71cb1293df8 100644 --- a/storage/innodb_plugin/buf/buf0lru.c +++ b/storage/innodb_plugin/buf/buf0lru.c @@ -1642,7 +1642,9 @@ buf_LRU_block_remove_hashed_page( break; case FIL_PAGE_INDEX: #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(&bpage->zip, page)); + ut_a(page_zip_validate( + &bpage->zip, page, + ((buf_block_t*) bpage)->index)); #endif /* UNIV_ZIP_DEBUG */ break; default: diff --git a/storage/innodb_plugin/include/page0zip.h b/storage/innodb_plugin/include/page0zip.h index 00c1d0516e6..9cf3b9805bc 100644 --- a/storage/innodb_plugin/include/page0zip.h +++ b/storage/innodb_plugin/include/page0zip.h @@ -156,9 +156,10 @@ page_zip_validate_low( /*==================*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ const page_t* page, /*!< in: uncompressed page */ + const dict_index_t* index, /*!< in: index of the page, if known */ ibool sloppy) /*!< in: FALSE=strict, TRUE=ignore the MIN_REC_FLAG */ - __attribute__((nonnull)); + __attribute__((nonnull(1,2))); /**********************************************************************//** Check that the compressed and decompressed pages match. */ UNIV_INTERN @@ -166,8 +167,9 @@ ibool page_zip_validate( /*==============*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ - const page_t* page) /*!< in: uncompressed page */ - __attribute__((nonnull)); + const page_t* page, /*!< in: uncompressed page */ + const dict_index_t* index) /*!< in: index of the page, if known */ + __attribute__((nonnull(1,2))); #endif /* UNIV_ZIP_DEBUG */ /**********************************************************************//** diff --git a/storage/innodb_plugin/log/log0recv.c b/storage/innodb_plugin/log/log0recv.c index 1591bb02ec2..677ada9fbde 100644 --- a/storage/innodb_plugin/log/log0recv.c +++ b/storage/innodb_plugin/log/log0recv.c @@ -1626,9 +1626,8 @@ recv_recover_page_func( if (fil_page_get_type(page) == FIL_PAGE_INDEX) { page_zip_des_t* page_zip = buf_block_get_page_zip(block); - if (page_zip) { - ut_a(page_zip_validate_low(page_zip, page, FALSE)); - } + ut_a(!page_zip + || page_zip_validate_low(page_zip, page, NULL, FALSE)); } #endif /* UNIV_ZIP_DEBUG */ diff --git a/storage/innodb_plugin/page/page0cur.c b/storage/innodb_plugin/page/page0cur.c index 00fb55d169c..dd7a707dfd9 100644 --- a/storage/innodb_plugin/page/page0cur.c +++ b/storage/innodb_plugin/page/page0cur.c @@ -310,7 +310,7 @@ page_cur_search_with_match( #endif /* UNIV_DEBUG */ page = buf_block_get_frame(block); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ page_check_dir(page); @@ -1248,7 +1248,7 @@ page_cur_insert_rec_zip( ut_ad(!page_rec_is_supremum(*current_rec)); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ /* 1. Get the size of the physical record in the page */ @@ -1973,7 +1973,7 @@ page_cur_delete_rec( } #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ } diff --git a/storage/innodb_plugin/page/page0page.c b/storage/innodb_plugin/page/page0page.c index a85789f5c32..44364333296 100644 --- a/storage/innodb_plugin/page/page0page.c +++ b/storage/innodb_plugin/page/page0page.c @@ -625,7 +625,7 @@ page_copy_rec_list_end( Furthermore, btr_compress() may set FIL_PAGE_PREV to FIL_NULL on new_page while leaving it intact on new_page_zip. So, we cannot validate new_page_zip. */ - ut_a(page_zip_validate_low(page_zip, page, TRUE)); + ut_a(page_zip_validate_low(page_zip, page, index, TRUE)); } #endif /* UNIV_ZIP_DEBUG */ ut_ad(buf_block_get_frame(block) == page); @@ -945,7 +945,7 @@ page_delete_rec_list_end( ut_ad(size == ULINT_UNDEFINED || size < UNIV_PAGE_SIZE); ut_ad(!page_zip || page_rec_is_comp(rec)); #ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page)); + ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ if (page_rec_is_infimum(rec)) { @@ -987,7 +987,7 @@ page_delete_rec_list_end( ULINT_UNDEFINED, &heap); rec = rec_get_next_ptr(rec, TRUE); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ page_cur_delete_rec(&cur, index, offsets, mtr); } while (page_offset(rec) != PAGE_NEW_SUPREMUM); @@ -1127,7 +1127,8 @@ page_delete_rec_list_start( between btr_attach_half_pages() and insert_page = ... when btr_page_get_split_rec_to_left() holds (direction == FSP_DOWN). */ - ut_a(!page_zip || page_zip_validate_low(page_zip, page, TRUE)); + ut_a(!page_zip + || page_zip_validate_low(page_zip, page, index, TRUE)); } #endif /* UNIV_ZIP_DEBUG */ @@ -1198,9 +1199,10 @@ page_move_rec_list_end( = buf_block_get_page_zip(block); ut_a(!new_page_zip == !page_zip); ut_a(!new_page_zip - || page_zip_validate(new_page_zip, new_page)); + || page_zip_validate(new_page_zip, new_page, index)); ut_a(!page_zip - || page_zip_validate(page_zip, page_align(split_rec))); + || page_zip_validate(page_zip, page_align(split_rec), + index)); } #endif /* UNIV_ZIP_DEBUG */ diff --git a/storage/innodb_plugin/page/page0zip.c b/storage/innodb_plugin/page/page0zip.c index 9f00fb4d1e0..546401ccec0 100644 --- a/storage/innodb_plugin/page/page0zip.c +++ b/storage/innodb_plugin/page/page0zip.c @@ -1433,7 +1433,7 @@ err_exit: page_zip_get_size(page_zip) - PAGE_DATA); mem_heap_free(heap); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ if (mtr) { @@ -3119,6 +3119,7 @@ page_zip_validate_low( /*==================*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ const page_t* page, /*!< in: uncompressed page */ + const dict_index_t* index, /*!< in: index of the page, if known */ ibool sloppy) /*!< in: FALSE=strict, TRUE=ignore the MIN_REC_FLAG */ { @@ -3206,39 +3207,102 @@ page_zip_validate_low( committed. Let us tolerate that difference when we are performing a sloppy validation. */ - if (sloppy) { - byte info_bits_diff; - ulint offset - = rec_get_next_offs(page + PAGE_NEW_INFIMUM, - TRUE); - ut_a(offset >= PAGE_NEW_SUPREMUM); - offset -= 5 /* REC_NEW_INFO_BITS */; + ulint* offsets; + mem_heap_t* heap; + const rec_t* rec; + const rec_t* trec; + byte info_bits_diff; + ulint offset + = rec_get_next_offs(page + PAGE_NEW_INFIMUM, TRUE); + ut_a(offset >= PAGE_NEW_SUPREMUM); + offset -= 5/*REC_NEW_INFO_BITS*/; - info_bits_diff = page[offset] ^ temp_page[offset]; + info_bits_diff = page[offset] ^ temp_page[offset]; - if (info_bits_diff == REC_INFO_MIN_REC_FLAG) { - temp_page[offset] = page[offset]; + if (info_bits_diff == REC_INFO_MIN_REC_FLAG) { + temp_page[offset] = page[offset]; - if (!memcmp(page + PAGE_HEADER, - temp_page + PAGE_HEADER, - UNIV_PAGE_SIZE - PAGE_HEADER - - FIL_PAGE_DATA_END)) { + if (!memcmp(page + PAGE_HEADER, + temp_page + PAGE_HEADER, + UNIV_PAGE_SIZE - PAGE_HEADER + - FIL_PAGE_DATA_END)) { - /* Only the minimum record flag - differed. Let us ignore it. */ - page_zip_fail(("page_zip_validate: " - "min_rec_flag " - "(ignored, " - "%lu,%lu,0x%02lx)\n", - page_get_space_id(page), - page_get_page_no(page), - (ulong) page[offset])); - goto func_exit; - } + /* Only the minimum record flag + differed. Let us ignore it. */ + page_zip_fail(("page_zip_validate: " + "min_rec_flag " + "(%s" + "%lu,%lu,0x%02lx)\n", + sloppy ? "ignored, " : "", + page_get_space_id(page), + page_get_page_no(page), + (ulong) page[offset])); + valid = sloppy; + goto func_exit; } } - page_zip_fail(("page_zip_validate: content\n")); - valid = FALSE; + + /* Compare the pointers in the PAGE_FREE list. */ + rec = page_header_get_ptr(page, PAGE_FREE); + trec = page_header_get_ptr(temp_page, PAGE_FREE); + + while (rec || trec) { + if (page_offset(rec) != page_offset(trec)) { + page_zip_fail(("page_zip_validate: " + "PAGE_FREE list: %u!=%u\n", + (unsigned) page_offset(rec), + (unsigned) page_offset(trec))); + valid = FALSE; + goto func_exit; + } + + rec = page_rec_get_next_low(rec, TRUE); + trec = page_rec_get_next_low(trec, TRUE); + } + + /* Compare the records. */ + heap = NULL; + offsets = NULL; + rec = page_rec_get_next_low( + page + PAGE_NEW_INFIMUM, TRUE); + trec = page_rec_get_next_low( + temp_page + PAGE_NEW_INFIMUM, TRUE); + + do { + if (page_offset(rec) != page_offset(trec)) { + page_zip_fail(("page_zip_validate: " + "record list: 0x%02x!=0x%02x\n", + (unsigned) page_offset(rec), + (unsigned) page_offset(trec))); + valid = FALSE; + break; + } + + if (index) { + /* Compare the data. */ + offsets = rec_get_offsets( + rec, index, offsets, + ULINT_UNDEFINED, &heap); + + if (memcmp(rec - rec_offs_extra_size(offsets), + trec - rec_offs_extra_size(offsets), + rec_offs_size(offsets))) { + page_zip_fail( + ("page_zip_validate: " + "record content: 0x%02x", + (unsigned) page_offset(rec))); + valid = FALSE; + break; + } + } + + rec = page_rec_get_next_low(rec, TRUE); + trec = page_rec_get_next_low(trec, TRUE); + } while (rec || trec); + + if (heap) { + mem_heap_free(heap); + } } func_exit: @@ -3260,9 +3324,10 @@ ibool page_zip_validate( /*==============*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ - const page_t* page) /*!< in: uncompressed page */ + const page_t* page, /*!< in: uncompressed page */ + const dict_index_t* index) /*!< in: index of the page, if known */ { - return(page_zip_validate_low(page_zip, page, + return(page_zip_validate_low(page_zip, page, index, recv_recovery_is_on())); } #endif /* UNIV_ZIP_DEBUG */ @@ -3593,7 +3658,7 @@ page_zip_write_rec( page_zip->m_nonempty = TRUE; #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page_align(rec))); + ut_a(page_zip_validate(page_zip, page_align(rec), index)); #endif /* UNIV_ZIP_DEBUG */ } @@ -3640,7 +3705,7 @@ corrupt: } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ memcpy(page + offset, @@ -3649,7 +3714,7 @@ corrupt: ptr + 4, BTR_EXTERN_FIELD_REF_SIZE); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ } @@ -3716,7 +3781,7 @@ page_zip_write_blob_ptr( memcpy(externs, field, BTR_EXTERN_FIELD_REF_SIZE); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ if (mtr) { @@ -3787,7 +3852,7 @@ corrupt: } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ field = page + offset; @@ -3808,7 +3873,7 @@ corrupt: memcpy(storage, ptr + 4, REC_NODE_PTR_SIZE); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ } @@ -4035,7 +4100,7 @@ page_zip_clear_rec( } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ } @@ -4059,7 +4124,7 @@ page_zip_rec_set_deleted( *slot &= ~(PAGE_ZIP_DIR_SLOT_DEL >> 8); } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page_align(rec))); + ut_a(page_zip_validate(page_zip, page_align(rec), NULL)); #endif /* UNIV_ZIP_DEBUG */ } @@ -4360,14 +4425,14 @@ corrupt: goto corrupt; } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ memcpy(page + offset, ptr, len); memcpy(page_zip->data + offset, ptr, len); #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, NULL)); #endif /* UNIV_ZIP_DEBUG */ } @@ -4442,7 +4507,7 @@ page_zip_reorganize( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(page_is_comp(page)); ut_ad(!dict_index_is_ibuf(index)); - /* Note that page_zip_validate(page_zip, page) may fail here. */ + /* Note that page_zip_validate(page_zip, page, index) may fail here. */ UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); @@ -4529,7 +4594,7 @@ page_zip_copy_recs( FIL_PAGE_PREV or PAGE_LEVEL, causing a temporary min_rec_flag mismatch. A strict page_zip_validate() will be executed later during the B-tree operations. */ - ut_a(page_zip_validate_low(src_zip, src, TRUE)); + ut_a(page_zip_validate_low(src_zip, src, index, TRUE)); #endif /* UNIV_ZIP_DEBUG */ ut_a(page_zip_get_size(page_zip) == page_zip_get_size(src_zip)); if (UNIV_UNLIKELY(src_zip->n_blobs)) { @@ -4590,7 +4655,7 @@ page_zip_copy_recs( } #ifdef UNIV_ZIP_DEBUG - ut_a(page_zip_validate(page_zip, page)); + ut_a(page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ btr_blob_dbg_add(page, index, "page_zip_copy_recs"); From 9d007e075d6b933df9dbd1a42d52ab00ee91827c Mon Sep 17 00:00:00 2001 From: Harin Vadodaria Date: Mon, 17 Sep 2012 17:02:17 +0530 Subject: [PATCH 08/47] Bug#11753779: MAX_CONNECT_ERRORS WORKS ONLY WHEN 1ST INC_HOST_ERRORS() IS CALLED. Issue : Sequence of calling inc_host_errors() and reset_host_errors() required some changes in order to maintain correct connection error count. Solution : Call to reset_host_errors() is shifted to a location after which no calls to inc_host_errors() are made. --- sql/hostname.cc | 9 ++++++ sql/sql_connect.cc | 68 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 8 deletions(-) diff --git a/sql/hostname.cc b/sql/hostname.cc index 9796755e9fb..38316a8ee19 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -214,6 +214,15 @@ char * ip_to_hostname(struct in_addr *in, uint *errors) } my_gethostbyname_r_free(); #else + + DBUG_EXECUTE_IF("addr_fake_ipv4", + { + const char* fake_host= "santa.claus.ipv4.example.com"; + name=my_strdup(fake_host, MYF(0)); + add_hostname(in,name); + DBUG_RETURN(name); + };); + VOID(pthread_mutex_lock(&LOCK_hostname)); if (!(hp=gethostbyaddr((char*) in,sizeof(*in), AF_INET))) { diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 21e2701d06c..e7aa48c94f5 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -336,6 +336,7 @@ check_user(THD *thd, enum enum_server_command command, USER_RESOURCES ur; int res= acl_getroot(thd, &ur, passwd, passwd_len); + DBUG_EXECUTE_IF("password_format_mismatch",{res= -1;};); #ifndef EMBEDDED_LIBRARY if (res == -1) { @@ -346,6 +347,12 @@ check_user(THD *thd, enum enum_server_command command, in old format. */ NET *net= &thd->net; + DBUG_EXECUTE_IF("password_format_mismatch", + { + inc_host_errors(&thd->remote.sin_addr); + my_error(ER_HANDSHAKE_ERROR, MYF(0)); + DBUG_RETURN(1); + };); if (opt_secure_auth_local) { my_error(ER_SERVER_IS_IN_SECURE_AUTH_MODE, MYF(0), @@ -816,6 +823,8 @@ static int check_connection(THD *thd) size_t passwd_len; char *user; size_t user_len; + uint charset_code= 0; + size_t bytes_remaining_in_packet= 0; DBUG_PRINT("info", ("New connection received on %s", vio_description(net->vio))); @@ -832,6 +841,19 @@ static int check_connection(THD *thd) my_error(ER_BAD_HOST_ERROR, MYF(0)); return 1; } + /* BEGIN : DEBUG */ + DBUG_EXECUTE_IF("addr_fake_ipv4", + { + struct sockaddr *sa= (sockaddr *) &net->vio->remote; + sa->sa_family= AF_INET; + struct in_addr *ip4= &((struct sockaddr_in *)sa)->sin_addr; + /* See RFC 5737, 192.0.2.0/23 is reserved */ + const char* fake= "192.0.2.4"; + ip4->s_addr= inet_addr(fake); + strcpy(ip, fake); + };); + /* END : DEBUG */ + if (!(thd->main_security_ctx.ip= my_strdup(ip,MYF(MY_WME)))) return 1; /* The error is set by my_strdup(). */ thd->main_security_ctx.host_or_ip= thd->main_security_ctx.ip; @@ -927,32 +949,31 @@ static int check_connection(THD *thd) (uchar*) buff, (size_t) (end-buff)) || (pkt_len= my_net_read(net)) == packet_error) { - inc_host_errors(&thd->remote.sin_addr); - my_error(ER_HANDSHAKE_ERROR, MYF(0)); - return 1; + goto error; } } #ifdef _CUSTOMCONFIG_ #include "_cust_sql_parse.h" #endif - if (connect_errors) - reset_host_errors(&thd->remote.sin_addr); if (thd->packet.alloc(thd->variables.net_buffer_length)) return 1; /* The error is set by alloc(). */ - uint charset_code= 0; end= (char *)net->read_pos; /* In order to safely scan a head for '\0' string terminators we must keep track of how many bytes remain in the allocated buffer or we might read past the end of the buffer. */ - size_t bytes_remaining_in_packet= pkt_len; + bytes_remaining_in_packet= pkt_len; /* Peek ahead on the client capability packet and determine which version of the protocol should be used. */ + DBUG_EXECUTE_IF("host_error_packet_length", + { + bytes_remaining_in_packet= 0; + };); if (bytes_remaining_in_packet < 2) goto error; @@ -1011,6 +1032,10 @@ static int check_connection(THD *thd) skip_to_ssl: + DBUG_EXECUTE_IF("host_error_charset", + { + goto error; + };); DBUG_PRINT("info", ("client_character_set: %u", charset_code)); if (thd_init_client_charset(thd, charset_code)) goto error; @@ -1079,6 +1104,10 @@ skip_to_ssl: bytes_remaining_in_packet -= AUTH_PACKET_HEADER_SIZE_PROTO_40; } + DBUG_EXECUTE_IF("host_error_SSL_layering", + { + packet_has_required_size= 0; + };); if (!packet_has_required_size) goto error; } @@ -1104,6 +1133,11 @@ skip_to_ssl: get_string= get_40_protocol_string; user= get_string(&end, &bytes_remaining_in_packet, &user_len); + DBUG_EXECUTE_IF("host_error_user", + { + user= NULL; + };); + if (user == NULL) goto error; @@ -1131,6 +1165,11 @@ skip_to_ssl: passwd= get_string(&end, &bytes_remaining_in_packet, &passwd_len); } + DBUG_EXECUTE_IF("host_error_password", + { + passwd= NULL; + };); + if (passwd == NULL) goto error; @@ -1191,7 +1230,20 @@ skip_to_ssl: if (!(thd->main_security_ctx.user= my_strdup(user, MYF(MY_WME)))) return 1; /* The error is set by my_strdup(). */ - return check_user(thd, COM_CONNECT, passwd, passwd_len, db, TRUE); + + if (!check_user(thd, COM_CONNECT, passwd, passwd_len, db, TRUE)) + { + /* + Call to reset_host_errors() should be made only when all sanity checks + are done and connection is going to be a successful. + */ + reset_host_errors(&thd->remote.sin_addr); + return 0; + } + else + { + return 1; + } error: inc_host_errors(&thd->remote.sin_addr); From 6bbe24e9a00d9190df72c353810ae909e5116994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 19 Sep 2012 22:35:38 +0300 Subject: [PATCH 09/47] Bug#14636528 INNODB CHANGE BUFFERING IS NOT ENTIRELY CRASH-SAFE Delete-mark change buffer records when resorting to a pessimistic delete from the change buffer B-tree. Skip delete-marked records in the change buffer merge and when estimating whether an operation can be buffered. Without this fix, we could try to apply the same buffered changes multiple times if the server was killed at the right moment. In MySQL 5.5 and later: ibuf_get_volume_buffered_count_func(): Ignore delete-marked (already processed) records. ibuf_delete_rec(): Add a crash point before optimistic delete. If the optimistic delete fails, flag the record processed before mtr_commit(). ibuf_merge_or_delete_for_page(): Ignore delete-marked (already processed) records. Backport to 5.1: Rename btr_cur_del_unmark_for_ibuf() to btr_cur_set_deleted_flag_for_ibuf() and add a parameter. rb:1307 approved by Jimmy Yang --- storage/innobase/btr/btr0cur.c | 11 ++++---- storage/innobase/handler/ha_innodb.cc | 4 +-- storage/innobase/ibuf/ibuf0ibuf.c | 28 ++++++++++++++++++--- storage/innobase/include/btr0cur.h | 9 ++++--- storage/innodb_plugin/ChangeLog | 6 +++++ storage/innodb_plugin/btr/btr0cur.c | 15 +++++------ storage/innodb_plugin/handler/ha_innodb.cc | 4 +-- storage/innodb_plugin/ibuf/ibuf0ibuf.c | 29 +++++++++++++++++++--- storage/innodb_plugin/include/btr0cur.h | 11 ++++---- 9 files changed, 86 insertions(+), 31 deletions(-) diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 4678ea8cd22..389e95bcb0a 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -2377,21 +2377,22 @@ btr_cur_del_mark_set_sec_rec( } /*************************************************************** -Sets a secondary index record delete mark to FALSE. This function is only +Sets a secondary index record delete mark. This function is only used by the insert buffer insert merge mechanism. */ void -btr_cur_del_unmark_for_ibuf( -/*========================*/ +btr_cur_set_deleted_flag_for_ibuf( +/*==============================*/ rec_t* rec, /* in: record to delete unmark */ + ibool val, /* in: value to set */ mtr_t* mtr) /* in: mtr */ { /* We do not need to reserve btr_search_latch, as the page has just been read to the buffer pool and there cannot be a hash index to it. */ - rec_set_deleted_flag(rec, page_is_comp(buf_frame_align(rec)), FALSE); + rec_set_deleted_flag(rec, page_is_comp(buf_frame_align(rec)), val); - btr_cur_del_mark_set_sec_rec_log(rec, FALSE, mtr); + btr_cur_del_mark_set_sec_rec_log(rec, val, mtr); } /*==================== B-TREE RECORD REMOVE =========================*/ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index df465d016e1..bcb903d22bf 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -9265,8 +9265,8 @@ static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method, #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug, PLUGIN_VAR_RQCMDARG, - "Debug flags for InnoDB change buffering (0=none)", - NULL, NULL, 0, 0, 1, 0); + "Debug flags for InnoDB change buffering (0=none, 2=crash at merge)", + NULL, NULL, 0, 0, 2, 0); #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ #ifdef UNIV_DEBUG diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 476d78e79ba..e2b5bda44fd 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -2978,7 +2978,7 @@ dump: /* The records only differ in the delete-mark. Clear the delete-mark, like we did before Bug #56680 was fixed. */ - btr_cur_del_unmark_for_ibuf(rec, mtr); + btr_cur_set_deleted_flag_for_ibuf(rec, FALSE, mtr); updated_in_place: mem_heap_free(heap); return; @@ -3058,6 +3058,22 @@ ibuf_delete_rec( ut_ad(ibuf_inside()); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug == 2) { + /* Inject a fault (crash). We do this before trying + optimistic delete, because a pessimistic delete in the + change buffer would require a larger test case. */ + + /* Flag the buffered record as processed, to avoid + an assertion failure after crash recovery. */ + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(pcur), TRUE, mtr); + mtr_commit(mtr); + log_make_checkpoint_at(ut_dulint_max, TRUE); + DBUG_SUICIDE(); + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + success = btr_cur_optimistic_delete(btr_pcur_get_btr_cur(pcur), mtr); if (success) { @@ -3072,7 +3088,13 @@ ibuf_delete_rec( return(FALSE); } - /* We have to resort to a pessimistic delete from ibuf */ + /* We have to resort to a pessimistic delete from ibuf. + Delete-mark the record so that it will not be applied again, + in case the server crashes before the pessimistic delete is + made persistent. */ + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(pcur), TRUE, mtr); + btr_pcur_store_position(pcur, mtr); btr_pcur_commit_specify_mtr(pcur, mtr); @@ -3343,7 +3365,7 @@ loop: fputs("InnoDB: Discarding record\n ", stderr); rec_print_old(stderr, ibuf_rec); fputs("\n from the insert buffer!\n\n", stderr); - } else if (page) { + } else if (page && !rec_get_deleted_flag(ibuf_rec, 0)) { /* Now we have at pcur a record which should be inserted to the index page; NOTE that the call below copies pointers to fields in ibuf_rec, and we must diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index 20235c55f22..341d628c6dc 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -277,13 +277,14 @@ btr_cur_del_mark_set_sec_rec( que_thr_t* thr, /* in: query thread */ mtr_t* mtr); /* in: mtr */ /*************************************************************** -Sets a secondary index record delete mark to FALSE. This function is -only used by the insert buffer insert merge mechanism. */ +Sets a secondary index record delete mark. This function is only +used by the insert buffer insert merge mechanism. */ void -btr_cur_del_unmark_for_ibuf( -/*========================*/ +btr_cur_set_deleted_flag_for_ibuf( +/*==============================*/ rec_t* rec, /* in: record to delete unmark */ + ibool val, /* in: value to set */ mtr_t* mtr); /* in: mtr */ /***************************************************************** Tries to compress a page of the tree on the leaf level. It is assumed diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 7521b593aa2..f71ca0b009a 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2012-09-18 The InnoDB Team + + * btr/btr0cur.c, handler/ha_innodb.cc, ibuf/ibuf0ibuf.c, + include/btr0cur.h: + Fix Bug#14636528 INNODB CHANGE BUFFERING IS NOT ENTIRELY CRASH-SAFE + 2012-09-17 The InnoDB Team * btr/btr0btr.c, btr/btr0cur.c, buf/buf0lru.c, diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index 798d2822431..6c67d27ffec 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -2769,19 +2769,20 @@ btr_cur_del_mark_set_sec_rec( return(DB_SUCCESS); } -/***********************************************************//** -Clear a secondary index record's delete mark. This function is only +/*************************************************************** +Sets a secondary index record delete mark. This function is only used by the insert buffer insert merge mechanism. */ UNIV_INTERN void -btr_cur_del_unmark_for_ibuf( -/*========================*/ +btr_cur_set_deleted_flag_for_ibuf( +/*==============================*/ rec_t* rec, /*!< in/out: record to delete unmark */ page_zip_des_t* page_zip, /*!< in/out: compressed page corresponding to rec, or NULL when the tablespace is uncompressed */ - mtr_t* mtr) /*!< in: mtr */ + ibool val, /*!< in: value to set */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { /* We do not need to reserve btr_search_latch, as the page has just been read to the buffer pool and there cannot be @@ -2789,9 +2790,9 @@ btr_cur_del_unmark_for_ibuf( updated in place and the adaptive hash index does not depend on it. */ - btr_rec_set_deleted_flag(rec, page_zip, FALSE); + btr_rec_set_deleted_flag(rec, page_zip, val); - btr_cur_del_mark_set_sec_rec_log(rec, FALSE, mtr); + btr_cur_del_mark_set_sec_rec_log(rec, val, mtr); } /*==================== B-TREE RECORD REMOVE =========================*/ diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 7e3ecce77bd..bbdf5680e30 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -11242,8 +11242,8 @@ static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method, #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug, PLUGIN_VAR_RQCMDARG, - "Debug flags for InnoDB change buffering (0=none)", - NULL, NULL, 0, 0, 1, 0); + "Debug flags for InnoDB change buffering (0=none, 2=crash at merge)", + NULL, NULL, 0, 0, 2, 0); #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ static MYSQL_SYSVAR_BOOL(random_read_ahead, srv_random_read_ahead, diff --git a/storage/innodb_plugin/ibuf/ibuf0ibuf.c b/storage/innodb_plugin/ibuf/ibuf0ibuf.c index 965d8df7d0c..c1c72b04f69 100644 --- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c +++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c @@ -3042,7 +3042,8 @@ dump: /* The records only differ in the delete-mark. Clear the delete-mark, like we did before Bug #56680 was fixed. */ - btr_cur_del_unmark_for_ibuf(rec, page_zip, mtr); + btr_cur_set_deleted_flag_for_ibuf( + rec, page_zip, FALSE, mtr); updated_in_place: mem_heap_free(heap); return; @@ -3127,6 +3128,22 @@ ibuf_delete_rec( ut_ad(ibuf_rec_get_page_no(btr_pcur_get_rec(pcur)) == page_no); ut_ad(ibuf_rec_get_space(btr_pcur_get_rec(pcur)) == space); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug == 2) { + /* Inject a fault (crash). We do this before trying + optimistic delete, because a pessimistic delete in the + change buffer would require a larger test case. */ + + /* Flag the buffered record as processed, to avoid + an assertion failure after crash recovery. */ + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(pcur), NULL, TRUE, mtr); + mtr_commit(mtr); + log_make_checkpoint_at(IB_ULONGLONG_MAX, TRUE); + DBUG_SUICIDE(); + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + success = btr_cur_optimistic_delete(btr_pcur_get_btr_cur(pcur), mtr); if (success) { @@ -3145,7 +3162,13 @@ ibuf_delete_rec( ut_ad(ibuf_rec_get_page_no(btr_pcur_get_rec(pcur)) == page_no); ut_ad(ibuf_rec_get_space(btr_pcur_get_rec(pcur)) == space); - /* We have to resort to a pessimistic delete from ibuf */ + /* We have to resort to a pessimistic delete from ibuf. + Delete-mark the record so that it will not be applied again, + in case the server crashes before the pessimistic delete is + made persistent. */ + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(pcur), NULL, TRUE, mtr); + btr_pcur_store_position(pcur, mtr); btr_pcur_commit_specify_mtr(pcur, mtr); @@ -3454,7 +3477,7 @@ loop: fputs("InnoDB: Discarding record\n ", stderr); rec_print_old(stderr, rec); fputs("\nInnoDB: from the insert buffer!\n\n", stderr); - } else if (block) { + } else if (block && !rec_get_deleted_flag(rec, 0)) { /* Now we have at pcur a record which should be inserted to the index page; NOTE that the call below copies pointers to fields in rec, and we must diff --git a/storage/innodb_plugin/include/btr0cur.h b/storage/innodb_plugin/include/btr0cur.h index afc111970e2..1c421167828 100644 --- a/storage/innodb_plugin/include/btr0cur.h +++ b/storage/innodb_plugin/include/btr0cur.h @@ -357,19 +357,20 @@ btr_cur_del_mark_set_sec_rec( ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ mtr_t* mtr); /*!< in: mtr */ -/***********************************************************//** -Clear a secondary index record's delete mark. This function is only +/*************************************************************** +Sets a secondary index record delete mark. This function is only used by the insert buffer insert merge mechanism. */ UNIV_INTERN void -btr_cur_del_unmark_for_ibuf( -/*========================*/ +btr_cur_set_deleted_flag_for_ibuf( +/*==============================*/ rec_t* rec, /*!< in/out: record to delete unmark */ page_zip_des_t* page_zip, /*!< in/out: compressed page corresponding to rec, or NULL when the tablespace is uncompressed */ - mtr_t* mtr); /*!< in: mtr */ + ibool val, /*!< in: value to set */ + mtr_t* mtr); /*!< in/out: mini-transaction */ /*************************************************************//** Tries to compress a page of the tree if it seems useful. It is assumed that mtr holds an x-latch on the tree and on the cursor page. To avoid From 373c428fbb4730bf2d1f6287b49d2aa5ef6ea362 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Sep 2012 12:31:26 +0300 Subject: [PATCH 10/47] From f820334bbfd0cc6effdab7e947bb095885566a70 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Fri, 21 Sep 2012 23:28:55 +0530 Subject: [PATCH 11/47] Bug#14645196 MYSQL CLIENT'S USE COMMAND FAILS WHEN DBNAME CONTAINS MULTIPLE QUOTES MySQL client's USE command might fail if the database name contains multiple quotes (backticks). The reason behind the failure being the method that client uses to remove/escape the quotes while parsing the USE command's option (dbname), where the option parsing might terminate if a matching quote is found. Also, C-APIs like mysql_select_db() expect a normalized dbname. Now, in certain cases, client might fail to normalize dbname similar to that of server and hence mysql_select_db() would fail. Fixed by getting the normalized dbname (indirectly) from the server by directly sending the "USE dbanme" as query to the server followed by a "SELECT DATABASE()". The above steps are only performed if number of quotes in the dbname is greater than 2. Once the normalized dbname is received, the original db is restored. --- client/mysql.cc | 91 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 3cb28e81164..965b1929af8 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -242,6 +242,8 @@ static const char* construct_prompt(); static char *get_arg(char *line, my_bool get_next_arg); static void init_username(); static void add_int_to_prompt(int toadd); +static int normalize_dbname(const char *line, char *buff, uint buff_size); +static int get_quote_count(const char *line); /* A structure which contains information on the commands this program can understand. */ @@ -4112,8 +4114,23 @@ com_use(String *buffer __attribute__((unused)), char *line) int select_db; bzero(buff, sizeof(buff)); - strmake(buff, line, sizeof(buff) - 1); - tmp= get_arg(buff, 0); + + /* + In case number of quotes exceed 2, we try to get + the normalized db name. + */ + if (get_quote_count(line) > 2) + { + if (normalize_dbname(line, buff, sizeof(buff))) + return put_error(&mysql); + tmp= buff; + } + else + { + strmake(buff, line, sizeof(buff) - 1); + tmp= get_arg(buff, 0); + } + if (!tmp || !*tmp) { put_info("USE must be followed by a database name", INFO_ERROR); @@ -4179,6 +4196,62 @@ com_use(String *buffer __attribute__((unused)), char *line) return 0; } +/** + Normalize database name. + + @param line [IN] The command. + @param buff [OUT] Normalized db name. + @param buff_size [IN] Buffer size. + + @return Operation status + @retval 0 Success + @retval 1 Failure + + @note Sometimes server normilizes the database names + & APIs like mysql_select_db() expect normalized + database names. Since it is difficult to perform + the name conversion/normalization on the client + side, this function tries to get the normalized + dbname (indirectly) from the server. +*/ + +static int +normalize_dbname(const char *line, char *buff, uint buff_size) +{ + MYSQL_RES *res= NULL; + + /* Send the "USE db" commmand to the server. */ + if (mysql_query(&mysql, line)) + return 1; + + /* + Now, get the normalized database name and store it + into the buff. + */ + if (!mysql_query(&mysql, "SELECT DATABASE()") && + (res= mysql_use_result(&mysql))) + { + MYSQL_ROW row= mysql_fetch_row(res); + if (row && row[0]) + { + size_t len= strlen(row[0]); + /* Make sure there is enough room to store the dbname. */ + if ((len > buff_size) || ! memcpy(buff, row[0], len)) + { + mysql_free_result(res); + return 1; + } + } + mysql_free_result(res); + } + + /* Restore the original database. */ + if (current_db && mysql_select_db(&mysql, current_db)) + return 1; + + return 0; +} + static int com_warnings(String *buffer __attribute__((unused)), char *line __attribute__((unused))) @@ -4258,6 +4331,20 @@ char *get_arg(char *line, my_bool get_next_arg) return valid_arg ? start : NullS; } +/* + Number of quotes present in the command's argument. +*/ +static int +get_quote_count(const char *line) +{ + int quote_count; + const char *ptr= line; + + for(quote_count= 0; ptr ++ && *ptr; ptr= strpbrk(ptr, "\"\'`")) + quote_count ++; + + return quote_count; +} static int sql_real_connect(char *host,char *database,char *user,char *password, From 5530c5e38dbefac8e5d2c333c0f35ed9f73946a4 Mon Sep 17 00:00:00 2001 From: Rohit Kalhans Date: Sat, 22 Sep 2012 17:50:51 +0530 Subject: [PATCH 12/47] BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER QUOTING IN REPLICATION Problem: Misquoting or unquoted identifiers may lead to incorrect statements to be logged to the binary log. Fix: we use specialized functions to append quoted identifiers in the statements generated by the server. --- mysql-test/r/mysqlbinlog.result | 32 +- mysql-test/r/mysqlbinlog2.result | 70 ++-- mysql-test/r/mysqlbinlog_row.result | 384 +++++++++--------- mysql-test/r/mysqlbinlog_row_innodb.result | 210 +++++----- mysql-test/r/mysqlbinlog_row_myisam.result | 210 +++++----- mysql-test/r/mysqlbinlog_row_trans.result | 72 ++-- mysql-test/r/user_var-binlog.result | 2 +- .../suite/binlog/r/binlog_base64_flag.result | 2 +- .../r/binlog_row_mysqlbinlog_verbose.result | 56 +-- .../binlog/r/binlog_stm_ctype_ucs.result | 2 +- .../suite/rpl/r/rpl_row_mysqlbinlog.result | 8 +- mysql-test/suite/rpl/r/rpl_sp.result | 12 +- sql/ha_ndbcluster_binlog.cc | 31 +- sql/log.cc | 35 +- sql/log_event.cc | 209 ++++++++-- sql/log_event.h | 16 + sql/sql_base.cc | 31 +- sql/sql_db.cc | 35 +- sql/sql_insert.cc | 19 +- sql/sql_load.cc | 28 +- sql/sql_show.cc | 3 +- sql/sql_show.h | 1 + sql/sql_table.cc | 22 +- 23 files changed, 830 insertions(+), 660 deletions(-) diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 45068ddfaec..540ecd99479 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -18,7 +18,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -64,7 +64,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -97,7 +97,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -119,7 +119,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -165,7 +165,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -198,7 +198,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -220,7 +220,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844556/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; @@ -239,7 +239,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844556/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; @@ -299,7 +299,7 @@ ERROR 42000: PROCEDURE test.p1 does not exist /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -349,7 +349,7 @@ flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -484,7 +484,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1253783037/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -581,22 +581,22 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; SavePoint mixed_cases /*!*/; -use db1/*!*/; +use `db1`/*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t2 VALUES("in savepoint mixed_cases") /*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t1 VALUES(40) /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; ROLLBACK TO mixed_cases /*!*/; -use db1/*!*/; +use `db1`/*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t2 VALUES("after rollback to") /*!*/; @@ -624,7 +624,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; SavePoint mixed_cases /*!*/; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index dba9bdc9d70..ab97f0fe51b 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -19,7 +19,7 @@ insert into t1 values(null, "f"); /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -62,7 +62,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -101,7 +101,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -127,7 +127,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -162,7 +162,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -185,7 +185,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -215,7 +215,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -246,7 +246,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -281,7 +281,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -304,7 +304,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -335,7 +335,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -358,7 +358,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -377,7 +377,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -399,7 +399,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -445,7 +445,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -468,7 +468,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -490,7 +490,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -520,7 +520,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -563,7 +563,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -601,7 +601,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -627,7 +627,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -661,7 +661,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -684,7 +684,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -714,7 +714,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -744,7 +744,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -779,7 +779,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -802,7 +802,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -833,7 +833,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -855,7 +855,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; SET INSERT_ID=4/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609946/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -874,7 +874,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -896,7 +896,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -942,7 +942,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -965,7 +965,7 @@ insert into t1 values(null, "e") DELIMITER ; DELIMITER /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -987,7 +987,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1017,7 +1017,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row.result b/mysql-test/r/mysqlbinlog_row.result index 9b562ac0fff..d58e55c809c 100644 --- a/mysql-test/r/mysqlbinlog_row.result +++ b/mysql-test/r/mysqlbinlog_row.result @@ -336,7 +336,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -357,7 +357,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ # at # @@ -374,7 +374,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ # at # @@ -401,7 +401,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000001' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -418,7 +418,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000010' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -435,7 +435,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000100' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -452,7 +452,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0001000' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -469,7 +469,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0010000' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -486,7 +486,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0100000' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -503,7 +503,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1000000' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -520,7 +520,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1111111' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -537,7 +537,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'1111111' /* BIT(7) meta=7 nullable=1 is_null=0 */ # at # @@ -554,7 +554,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'0010000' /* BIT(7) meta=7 nullable=1 is_null=0 */ ### SET @@ -583,7 +583,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00010010010010001001' /* BIT(20) meta=516 nullable=1 is_null=0 */ ### @2='ab' /* STRING(2) meta=65026 nullable=1 is_null=0 */ @@ -611,7 +611,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000000000000000000000000000000000000000000000000000000000000001' /* BIT(64) meta=2048 nullable=1 is_null=0 */ # at # @@ -628,7 +628,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000000000000000000000000000000000000000000000000000000000000010' /* BIT(64) meta=2048 nullable=1 is_null=0 */ # at # @@ -645,7 +645,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0000000000000000000000000000000000000000000000000000000010000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ # at # @@ -662,7 +662,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ # at # @@ -689,13 +689,13 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2 /* TINYINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -712,7 +712,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -729,7 +729,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ ### SET @@ -748,7 +748,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -775,10 +775,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -795,7 +795,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -822,7 +822,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -839,7 +839,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ # at # @@ -866,7 +866,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1234 /* SHORTINT meta=0 nullable=1 is_null=0 */ # at # @@ -883,7 +883,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=1234 /* SHORTINT meta=0 nullable=1 is_null=0 */ # at # @@ -910,10 +910,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-32768 (32768) /* SHORTINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-1 (65535) /* SHORTINT meta=0 nullable=1 is_null=0 */ # at # @@ -930,7 +930,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=-32768 (32768) /* SHORTINT meta=0 nullable=1 is_null=0 */ ### SET @@ -949,7 +949,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-1 (65535) /* SHORTINT meta=0 nullable=1 is_null=0 */ # at # @@ -976,7 +976,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=12345 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ # at # @@ -993,7 +993,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=12345 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ # at # @@ -1020,10 +1020,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-8388608 (8388608) /* MEDIUMINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-1 (16777215) /* MEDIUMINT meta=0 nullable=1 is_null=0 */ # at # @@ -1040,7 +1040,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=-8388608 (8388608) /* MEDIUMINT meta=0 nullable=1 is_null=0 */ ### SET @@ -1059,7 +1059,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-1 (16777215) /* MEDIUMINT meta=0 nullable=1 is_null=0 */ # at # @@ -1086,7 +1086,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=123456 /* INT meta=0 nullable=1 is_null=0 */ # at # @@ -1103,7 +1103,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=123456 /* INT meta=0 nullable=1 is_null=0 */ # at # @@ -1130,10 +1130,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-2147483648 (2147483648) /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-1 (4294967295) /* INT meta=0 nullable=1 is_null=0 */ # at # @@ -1150,7 +1150,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=-2147483648 (2147483648) /* INT meta=0 nullable=1 is_null=0 */ ### SET @@ -1169,7 +1169,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-1 (4294967295) /* INT meta=0 nullable=1 is_null=0 */ # at # @@ -1196,7 +1196,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1234567890 /* LONGINT meta=0 nullable=1 is_null=0 */ # at # @@ -1213,7 +1213,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=1234567890 /* LONGINT meta=0 nullable=1 is_null=0 */ # at # @@ -1240,10 +1240,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-9223372036854775808 (9223372036854775808) /* LONGINT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-1 (18446744073709551615) /* LONGINT meta=0 nullable=1 is_null=0 */ # at # @@ -1260,7 +1260,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=-9223372036854775808 (9223372036854775808) /* LONGINT meta=0 nullable=1 is_null=0 */ ### SET @@ -1279,7 +1279,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=-1 (18446744073709551615) /* LONGINT meta=0 nullable=1 is_null=0 */ # at # @@ -1306,7 +1306,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=123.223... /* FLOAT meta=4 nullable=1 is_null=0 */ # at # @@ -1323,7 +1323,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=123.223... /* FLOAT meta=4 nullable=1 is_null=0 */ # at # @@ -1350,7 +1350,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=123434.223... /* DOUBLE meta=8 nullable=1 is_null=0 */ # at # @@ -1367,7 +1367,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=123434.223... /* DOUBLE meta=8 nullable=1 is_null=0 */ # at # @@ -1394,7 +1394,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # @@ -1411,7 +1411,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=-000000543.210000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # @@ -1428,7 +1428,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # @@ -1455,7 +1455,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2001:02:03' /* DATE meta=0 nullable=1 is_null=0 */ # at # @@ -1472,7 +1472,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2001:02:03' /* DATE meta=0 nullable=1 is_null=0 */ # at # @@ -1499,7 +1499,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2001-02-03 10:20:30 /* DATETIME meta=0 nullable=1 is_null=0 */ # at # @@ -1516,7 +1516,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=2001-02-03 10:20:30 /* DATETIME meta=0 nullable=1 is_null=0 */ # at # @@ -1544,7 +1544,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=981184830 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ # at # @@ -1561,7 +1561,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=981184830 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ # at # @@ -1588,7 +1588,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='11:22:33' /* TIME meta=0 nullable=1 is_null=0 */ # at # @@ -1605,7 +1605,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='11:22:33' /* TIME meta=0 nullable=1 is_null=0 */ # at # @@ -1632,7 +1632,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2001 /* YEAR meta=0 nullable=1 is_null=0 */ # at # @@ -1649,7 +1649,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=2001 /* YEAR meta=0 nullable=1 is_null=0 */ # at # @@ -1676,7 +1676,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -1693,7 +1693,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -1720,7 +1720,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -1737,7 +1737,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -1764,7 +1764,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='b' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -1781,7 +1781,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='b' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -1808,7 +1808,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -1825,7 +1825,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -1852,7 +1852,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* STRING(3) meta=65027 nullable=1 is_null=0 */ # at # @@ -1869,7 +1869,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* STRING(3) meta=65027 nullable=1 is_null=0 */ # at # @@ -1896,7 +1896,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -1913,7 +1913,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -1940,7 +1940,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* STRING(3) meta=65027 nullable=1 is_null=0 */ # at # @@ -1957,7 +1957,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* STRING(3) meta=65027 nullable=1 is_null=0 */ # at # @@ -1984,7 +1984,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* STRING(765) meta=57085 nullable=1 is_null=0 */ # at # @@ -2001,7 +2001,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* STRING(765) meta=57085 nullable=1 is_null=0 */ # at # @@ -2018,10 +2018,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* STRING(765) meta=57085 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* STRING(765) meta=57085 nullable=1 is_null=0 */ # at # @@ -2048,7 +2048,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a' /* STRING(2) meta=65026 nullable=1 is_null=0 */ # at # @@ -2065,7 +2065,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a' /* STRING(2) meta=65026 nullable=1 is_null=0 */ # at # @@ -2092,7 +2092,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -2109,7 +2109,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -2136,7 +2136,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a' /* STRING(2) meta=65026 nullable=1 is_null=0 */ # at # @@ -2153,7 +2153,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a' /* STRING(2) meta=65026 nullable=1 is_null=0 */ # at # @@ -2180,7 +2180,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a' /* STRING(510) meta=61182 nullable=1 is_null=0 */ # at # @@ -2197,7 +2197,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß' /* STRING(510) meta=61182 nullable=1 is_null=0 */ # at # @@ -2216,10 +2216,10 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a' /* STRING(510) meta=61182 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß\x00ß' /* STRING(510) meta=61182 nullable=1 is_null=0 */ # at # @@ -2246,7 +2246,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2263,7 +2263,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2290,7 +2290,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -2307,7 +2307,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -2334,7 +2334,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -2351,7 +2351,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -2378,7 +2378,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(261) meta=261 nullable=1 is_null=0 */ # at # @@ -2395,7 +2395,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(261) meta=261 nullable=1 is_null=0 */ # at # @@ -2422,7 +2422,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2439,7 +2439,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2466,7 +2466,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* VARSTRING(3) meta=3 nullable=1 is_null=0 */ # at # @@ -2483,7 +2483,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* VARSTRING(3) meta=3 nullable=1 is_null=0 */ # at # @@ -2510,7 +2510,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(765) meta=765 nullable=1 is_null=0 */ # at # @@ -2527,7 +2527,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* VARSTRING(765) meta=765 nullable=1 is_null=0 */ # at # @@ -2544,10 +2544,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(765) meta=765 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* VARSTRING(765) meta=765 nullable=1 is_null=0 */ # at # @@ -2574,7 +2574,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(783) meta=783 nullable=1 is_null=0 */ # at # @@ -2591,7 +2591,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* VARSTRING(783) meta=783 nullable=1 is_null=0 */ # at # @@ -2608,10 +2608,10 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* VARSTRING(783) meta=783 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß' /* VARSTRING(783) meta=783 nullable=1 is_null=0 */ # at # @@ -2638,7 +2638,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2655,7 +2655,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -2682,7 +2682,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a' /* VARSTRING(2) meta=2 nullable=1 is_null=0 */ # at # @@ -2699,7 +2699,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a' /* VARSTRING(2) meta=2 nullable=1 is_null=0 */ # at # @@ -2726,7 +2726,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b' /* VARSTRING(510) meta=510 nullable=1 is_null=0 */ # at # @@ -2743,7 +2743,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b' /* VARSTRING(510) meta=510 nullable=1 is_null=0 */ # at # @@ -2770,7 +2770,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b' /* VARSTRING(522) meta=522 nullable=1 is_null=0 */ # at # @@ -2787,7 +2787,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b\x00a\x00b' /* VARSTRING(522) meta=522 nullable=1 is_null=0 */ # at # @@ -2814,7 +2814,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2831,7 +2831,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x02' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2848,7 +2848,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2865,7 +2865,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2892,7 +2892,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -2909,7 +2909,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* STRING(0) meta=65024 nullable=1 is_null=0 */ # at # @@ -2936,7 +2936,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2953,7 +2953,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x02' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2970,7 +2970,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -2987,7 +2987,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */ # at # @@ -3014,7 +3014,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -3031,7 +3031,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x02' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -3048,7 +3048,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -3065,7 +3065,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* STRING(255) meta=65279 nullable=1 is_null=0 */ # at # @@ -3092,7 +3092,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -3109,7 +3109,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */ # at # @@ -3136,7 +3136,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -3153,7 +3153,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x02' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -3170,7 +3170,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -3187,7 +3187,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x02' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */ # at # @@ -3214,7 +3214,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -3231,7 +3231,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -3248,7 +3248,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00a\x00' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -3265,7 +3265,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ # at # @@ -3292,7 +3292,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='tinyblob1' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3309,7 +3309,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='tinyblob1' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3336,7 +3336,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='blob1' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3353,7 +3353,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='blob1' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3380,7 +3380,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='mediumblob1' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3397,7 +3397,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='mediumblob1' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3424,7 +3424,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='longblob1' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3441,7 +3441,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='longblob1' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3468,7 +3468,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='tinytext1' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3485,7 +3485,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='tinytext1' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3512,7 +3512,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='text1' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3529,7 +3529,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='text1' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3556,7 +3556,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='mediumtext1' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3573,7 +3573,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='mediumtext1' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3600,7 +3600,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='longtext1' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3617,7 +3617,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='longtext1' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3644,7 +3644,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00t\x00i\x00n\x00y\x00t\x00e\x00x\x00t\x001' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3661,7 +3661,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00t\x00i\x00n\x00y\x00t\x00e\x00x\x00t\x001' /* TINYBLOB/TINYTEXT meta=1 nullable=1 is_null=0 */ # at # @@ -3688,7 +3688,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00t\x00e\x00x\x00t\x001' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3705,7 +3705,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00t\x00e\x00x\x00t\x001' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ # at # @@ -3732,7 +3732,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00m\x00e\x00d\x00i\x00u\x00m\x00t\x00e\x00x\x00t\x001' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3749,7 +3749,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00m\x00e\x00d\x00i\x00u\x00m\x00t\x00e\x00x\x00t\x001' /* MEDIUMBLOB/MEDIUMTEXT meta=3 nullable=1 is_null=0 */ # at # @@ -3776,7 +3776,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='\x00l\x00o\x00n\x00g\x00t\x00e\x00x\x00t\x001' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3793,7 +3793,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='\x00l\x00o\x00n\x00g\x00t\x00e\x00x\x00t\x001' /* LONGBLOB/LONGTEXT meta=4 nullable=1 is_null=0 */ # at # @@ -3820,7 +3820,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2 /* ENUM(1 byte) meta=63233 nullable=1 is_null=0 */ # at # @@ -3837,7 +3837,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=2 /* ENUM(1 byte) meta=63233 nullable=1 is_null=0 */ # at # @@ -3864,7 +3864,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00000011' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3881,7 +3881,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00000101' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3898,7 +3898,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3915,7 +3915,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3932,7 +3932,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00001111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3949,7 +3949,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00011111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3966,7 +3966,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'00111111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -3983,7 +3983,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'00000011' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */ # at # @@ -4015,7 +4015,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ @@ -4033,7 +4033,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=0 /* INT meta=0 nullable=0 is_null=0 */ ### @2=1 /* INT meta=0 nullable=0 is_null=0 */ @@ -4051,7 +4051,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=1 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ @@ -4069,7 +4069,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=0 /* INT meta=0 nullable=0 is_null=0 */ ### @2=1 /* INT meta=0 nullable=0 is_null=0 */ @@ -4091,28 +4091,28 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=1 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=0 /* INT meta=0 nullable=0 is_null=0 */ ### @2=1 /* INT meta=0 nullable=0 is_null=0 */ ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @2=1 /* INT meta=0 nullable=0 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=1 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ ### SET ### @1=20 /* INT meta=0 nullable=0 is_null=0 */ ### @2=0 /* INT meta=0 nullable=0 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=0 /* INT meta=0 nullable=0 is_null=0 */ ### @2=1 /* INT meta=0 nullable=0 is_null=0 */ diff --git a/mysql-test/r/mysqlbinlog_row_innodb.result b/mysql-test/r/mysqlbinlog_row_innodb.result index ee448311278..428106dcdab 100644 --- a/mysql-test/r/mysqlbinlog_row_innodb.result +++ b/mysql-test/r/mysqlbinlog_row_innodb.result @@ -2253,7 +2253,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -2363,7 +2363,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2456,7 +2456,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2551,7 +2551,7 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -2632,7 +2632,7 @@ BEGIN ### @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */ ### @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */ ### @79=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2725,7 +2725,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2898,7 +2898,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3071,7 +3071,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -3244,7 +3244,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3417,7 +3417,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3510,7 +3510,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3603,7 +3603,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3696,7 +3696,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -3876,7 +3876,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -3901,47 +3901,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-08' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=8 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-09' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3958,7 +3958,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3967,7 +3967,7 @@ BEGIN ### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3976,7 +3976,7 @@ BEGIN ### @1='2008:08:12' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3985,7 +3985,7 @@ BEGIN ### @1='2008:08:13' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3994,7 +3994,7 @@ BEGIN ### @1='2008:08:14' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4003,7 +4003,7 @@ BEGIN ### @1='2008:08:15' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4012,7 +4012,7 @@ BEGIN ### @1='2008:08:16' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4033,37 +4033,37 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:12' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:13' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:14' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:15' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:16' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:17' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4243,7 +4243,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4286,47 +4286,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=11 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=18 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4343,47 +4343,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=21 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=28 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4400,47 +4400,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=31 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=38 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4465,7 +4465,7 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4474,7 +4474,7 @@ BEGIN ### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4483,7 +4483,7 @@ BEGIN ### @1='2018:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4492,7 +4492,7 @@ BEGIN ### @1='2018:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4501,7 +4501,7 @@ BEGIN ### @1='2018:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4510,7 +4510,7 @@ BEGIN ### @1='2018:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4519,7 +4519,7 @@ BEGIN ### @1='2018:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4528,7 +4528,7 @@ BEGIN ### @1='2028:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4537,7 +4537,7 @@ BEGIN ### @1='2028:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4546,7 +4546,7 @@ BEGIN ### @1='2028:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4555,7 +4555,7 @@ BEGIN ### @1='2028:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4564,7 +4564,7 @@ BEGIN ### @1='2028:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4573,7 +4573,7 @@ BEGIN ### @1='2028:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4582,7 +4582,7 @@ BEGIN ### @1='2038:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4591,7 +4591,7 @@ BEGIN ### @1='2038:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4600,7 +4600,7 @@ BEGIN ### @1='2038:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4609,7 +4609,7 @@ BEGIN ### @1='2038:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4618,7 +4618,7 @@ BEGIN ### @1='2038:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4647,92 +4647,92 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4804,7 +4804,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4829,17 +4829,17 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2=2 /* INT meta=0 nullable=1 is_null=0 */ ### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2=4 /* INT meta=0 nullable=1 is_null=0 */ ### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=5 /* INT meta=0 nullable=1 is_null=0 */ ### @2=6 /* INT meta=0 nullable=1 is_null=0 */ diff --git a/mysql-test/r/mysqlbinlog_row_myisam.result b/mysql-test/r/mysqlbinlog_row_myisam.result index b9366d941f8..4cfff31e223 100644 --- a/mysql-test/r/mysqlbinlog_row_myisam.result +++ b/mysql-test/r/mysqlbinlog_row_myisam.result @@ -2253,7 +2253,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -2363,7 +2363,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2458,7 +2458,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2555,7 +2555,7 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -2636,7 +2636,7 @@ BEGIN ### @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */ ### @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */ ### @79=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2731,7 +2731,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -2906,7 +2906,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3081,7 +3081,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -3256,7 +3256,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3431,7 +3431,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3526,7 +3526,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3621,7 +3621,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */ ### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */ @@ -3716,7 +3716,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */ ### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */ @@ -3898,7 +3898,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -3923,47 +3923,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-08' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=8 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:08:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-09' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3982,7 +3982,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -3991,7 +3991,7 @@ BEGIN ### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4000,7 +4000,7 @@ BEGIN ### @1='2008:08:12' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4009,7 +4009,7 @@ BEGIN ### @1='2008:08:13' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4018,7 +4018,7 @@ BEGIN ### @1='2008:08:14' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4027,7 +4027,7 @@ BEGIN ### @1='2008:08:15' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4036,7 +4036,7 @@ BEGIN ### @1='2008:08:16' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:08:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4059,37 +4059,37 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=1 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:12' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:13' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:14' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-04' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:15' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-05' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:16' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-06' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2008:08:17' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */ @@ -4271,7 +4271,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4314,47 +4314,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=11 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=18 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1='2008:01:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4373,47 +4373,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=21 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=28 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1='2008:02:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4432,47 +4432,47 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-01' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=31 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:08' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-08' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=38 /* INT meta=0 nullable=1 is_null=0 */ -### INSERT INTO test.t3 +### INSERT INTO `test`.`t3` ### SET ### @1='2008:03:09' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4499,7 +4499,7 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4508,7 +4508,7 @@ BEGIN ### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4517,7 +4517,7 @@ BEGIN ### @1='2018:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4526,7 +4526,7 @@ BEGIN ### @1='2018:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4535,7 +4535,7 @@ BEGIN ### @1='2018:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4544,7 +4544,7 @@ BEGIN ### @1='2018:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1='2008:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4553,7 +4553,7 @@ BEGIN ### @1='2018:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4562,7 +4562,7 @@ BEGIN ### @1='2028:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4571,7 +4571,7 @@ BEGIN ### @1='2028:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4580,7 +4580,7 @@ BEGIN ### @1='2028:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4589,7 +4589,7 @@ BEGIN ### @1='2028:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4598,7 +4598,7 @@ BEGIN ### @1='2028:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1='2008:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4607,7 +4607,7 @@ BEGIN ### @1='2028:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4616,7 +4616,7 @@ BEGIN ### @1='2038:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4625,7 +4625,7 @@ BEGIN ### @1='2038:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4634,7 +4634,7 @@ BEGIN ### @1='2038:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4643,7 +4643,7 @@ BEGIN ### @1='2038:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4652,7 +4652,7 @@ BEGIN ### @1='2038:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### UPDATE test.t3 +### UPDATE `test`.`t3` ### WHERE ### @1='2008:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4683,92 +4683,92 @@ BEGIN #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1='2018:01:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-01-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1='2028:02:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-02-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=7 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:02' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-02' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=2 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:03' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-03' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=3 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-04' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=4 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:05' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-05' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=5 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:06' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-06' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ ### @3=6 /* INT meta=0 nullable=1 is_null=0 */ -### DELETE FROM test.t3 +### DELETE FROM `test`.`t3` ### WHERE ### @1='2038:03:07' /* DATE meta=0 nullable=1 is_null=0 */ ### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */ @@ -4842,7 +4842,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4867,17 +4867,17 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2=2 /* INT meta=0 nullable=1 is_null=0 */ ### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2=4 /* INT meta=0 nullable=1 is_null=0 */ ### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=5 /* INT meta=0 nullable=1 is_null=0 */ ### @2=6 /* INT meta=0 nullable=1 is_null=0 */ diff --git a/mysql-test/r/mysqlbinlog_row_trans.result b/mysql-test/r/mysqlbinlog_row_trans.result index 9c3348a9e76..10ba2a82089 100644 --- a/mysql-test/r/mysqlbinlog_row_trans.result +++ b/mysql-test/r/mysqlbinlog_row_trans.result @@ -132,7 +132,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -164,15 +164,15 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -180,21 +180,21 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=11 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -205,7 +205,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -247,15 +247,15 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -263,21 +263,21 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=11 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -288,7 +288,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -296,15 +296,15 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -312,21 +312,21 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=11 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -337,7 +337,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -371,15 +371,15 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t1 +### INSERT INTO `test`.`t1` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -387,21 +387,21 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=11 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t1 +### UPDATE `test`.`t1` ### WHERE ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -412,7 +412,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t1 +### DELETE FROM `test`.`t1` ### WHERE ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -420,15 +420,15 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### INSERT INTO test.t2 +### INSERT INTO `test`.`t2` ### SET ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -436,21 +436,21 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=1 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=11 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=2 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ ### SET ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ -### UPDATE test.t2 +### UPDATE `test`.`t2` ### WHERE ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ @@ -461,7 +461,7 @@ BEGIN # at # #010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number # #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F -### DELETE FROM test.t2 +### DELETE FROM `test`.`t2` ### WHERE ### @1=12 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 05efea79fe7..c1effffde53 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -19,7 +19,7 @@ flush logs; DELIMITER /*!*/; ROLLBACK/*!*/; SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result index a4c610c845a..deaeaf47679 100644 --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result @@ -35,7 +35,7 @@ DELIMITER /*!*/; # at 4 <#>ROLLBACK/*!*/; # at 102 -<#>use test/*!*/; +<#>use `test`/*!*/; SET TIMESTAMP=1196959712/*!*/; <#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result index 2687b21213a..cbb739a9c48 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result @@ -1,152 +1,152 @@ Verbose statements from : write-partial-row.binlog select replace(txt,'\r', '') as stmt from raw_binlog_rows where txt like '###%'; stmt -### INSERT INTO mysql.ndb_apply_status +### INSERT INTO `mysql`.`ndb_apply_status` ### SET ### @1=1 ### @2=25769803786 ### @3='' ### @4=0 ### @5=0 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=3 ### @2=3 ### @3=3 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=1 ### @2=1 ### @3=1 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=2 ### @2=2 ### @3=2 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @2=4 ### @3=4 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @3=40 -### DELETE FROM test.ba +### DELETE FROM `test`.`ba` ### WHERE ### @1=2 drop table raw_binlog_rows; Verbose statements from : write-full-row.binlog select replace(txt,'\r', '') as stmt from raw_binlog_rows where txt like '###%'; stmt -### INSERT INTO mysql.ndb_apply_status +### INSERT INTO `mysql`.`ndb_apply_status` ### SET ### @1=2 ### @2=25769803786 ### @3='' ### @4=0 ### @5=0 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=3 ### @2=3 ### @3=3 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=1 ### @2=1 ### @3=1 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=2 ### @2=2 ### @3=2 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @2=4 ### @3=4 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @2=4 ### @3=40 -### DELETE FROM test.ba +### DELETE FROM `test`.`ba` ### WHERE ### @1=2 drop table raw_binlog_rows; Verbose statements from : update-partial-row.binlog select replace(txt,'\r', '') as stmt from raw_binlog_rows where txt like '###%'; stmt -### INSERT INTO mysql.ndb_apply_status +### INSERT INTO `mysql`.`ndb_apply_status` ### SET ### @1=3 ### @2=25769803786 ### @3='' ### @4=0 ### @5=0 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=3 ### @2=3 ### @3=3 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=1 ### @2=1 ### @3=1 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=2 ### @2=2 ### @3=2 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @2=4 ### @3=4 -### UPDATE test.ba +### UPDATE `test`.`ba` ### WHERE ### @1=4 ### @3=4 ### SET ### @1=4 ### @3=40 -### DELETE FROM test.ba +### DELETE FROM `test`.`ba` ### WHERE ### @1=2 drop table raw_binlog_rows; Verbose statements from : update-full-row.binlog select replace(txt,'\r', '') as stmt from raw_binlog_rows where txt like '###%'; stmt -### INSERT INTO mysql.ndb_apply_status +### INSERT INTO `mysql`.`ndb_apply_status` ### SET ### @1=4 ### @2=25769803786 ### @3='' ### @4=0 ### @5=0 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=3 ### @2=3 ### @3=3 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=1 ### @2=1 ### @3=1 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=2 ### @2=2 ### @3=2 -### INSERT INTO test.ba +### INSERT INTO `test`.`ba` ### SET ### @1=4 ### @2=4 ### @3=4 -### UPDATE test.ba +### UPDATE `test`.`ba` ### WHERE ### @1=4 ### @2=4 @@ -155,7 +155,7 @@ stmt ### @1=4 ### @2=4 ### @3=40 -### DELETE FROM test.ba +### DELETE FROM `test`.`ba` ### WHERE ### @1=2 drop table raw_binlog_rows; diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index b7edf7fedb8..21974ba2913 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -13,7 +13,7 @@ flush logs; DELIMITER /*!*/; ROLLBACK/*!*/; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 5fee82f6017..082ff16f157 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -153,7 +153,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -175,7 +175,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -284,7 +284,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -316,7 +316,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index fc9c05ebc81..8d0d6a8bf86 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -627,7 +627,7 @@ drop database if exists mysqltest1 SET TIMESTAMP=t/*!*/; create database mysqltest1 /*!*/; -use mysqltest1/*!*/; +use `mysqltest1`/*!*/; SET TIMESTAMP=t/*!*/; create table t1 (a varchar(100)) /*!*/; @@ -840,7 +840,7 @@ drop database mysqltest1 SET TIMESTAMP=t/*!*/; drop user "zedjzlcsjhd"@127.0.0.1 /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=t/*!*/; drop function if exists f1 /*!*/; @@ -925,7 +925,7 @@ create database mysqltest SET TIMESTAMP=t/*!*/; create database mysqltest2 /*!*/; -use mysqltest2/*!*/; +use `mysqltest2`/*!*/; SET TIMESTAMP=t/*!*/; create table t ( t integer ) /*!*/; @@ -943,7 +943,7 @@ insert into t values (1); return 0; end /*!*/; -use mysqltest/*!*/; +use `mysqltest`/*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest2`.`f1`() /*!*/; @@ -953,14 +953,14 @@ drop database mysqltest SET TIMESTAMP=t/*!*/; drop database mysqltest2 /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltestbug36570_p1`() begin select 1; end /*!*/; -use mysql/*!*/; +use `mysql`/*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `test`.` mysqltestbug36570_p2`( a int) `label`: diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index fe802ce0e2d..70e52306e14 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -22,6 +22,7 @@ #include "rpl_injector.h" #include "rpl_filter.h" #include "slave.h" +#include "log_event.h" #include "ha_ndbcluster_binlog.h" #include "NdbDictionary.hpp" #include "ndb_cluster_connection.hpp" @@ -1269,6 +1270,11 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share, } char tmp_buf2[FN_REFLEN]; + char quoted_table1[2 + 2 * FN_REFLEN + 1]; + char quoted_db1[2 + 2 * FN_REFLEN + 1]; + char quoted_db2[2 + 2 * FN_REFLEN + 1]; + char quoted_table2[2 + 2 * FN_REFLEN + 1]; + int id_length= 0; const char *type_str; switch (type) { @@ -1278,16 +1284,31 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share, DBUG_RETURN(0); /* redo the drop table query as is may contain several tables */ query= tmp_buf2; - query_length= (uint) (strxmov(tmp_buf2, "drop table `", - table_name, "`", NullS) - tmp_buf2); + id_length= my_strmov_quoted_identifier (thd, (char *) quoted_table1, + table_name, 0); + quoted_table1[id_length]= '\0'; + query_length= (uint) (strxmov(tmp_buf2, "drop table ", + quoted_table1, NullS) - tmp_buf2); type_str= "drop table"; break; case SOT_RENAME_TABLE: /* redo the rename table query as is may contain several tables */ query= tmp_buf2; - query_length= (uint) (strxmov(tmp_buf2, "rename table `", - db, ".", table_name, "` to `", - new_db, ".", new_table_name, "`", NullS) - tmp_buf2); + id_length= my_strmov_quoted_identifier (thd, (char *) quoted_db1, + db, 0); + quoted_db1[id_length]= '\0'; + id_length= my_strmov_quoted_identifier (thd, (char *) quoted_table1, + table_name, 0); + quoted_table1[id_length]= '\0'; + id_length= my_strmov_quoted_identifier (thd, (char *) quoted_db2, + new_db, 0); + quoted_db2[id_length]= '\0'; + id_length= my_strmov_quoted_identifier (thd, (char *) quoted_table2, + new_table_name, 0); + quoted_table2[id_length]= '\0'; + query_length= (uint) (strxmov(tmp_buf2, "rename table ", + quoted_db1, ".", quoted_table_1, " to ", + quoted_db2, ".", quoted_table2, NullS) - tmp_buf2); type_str= "rename table"; break; case SOT_CREATE_TABLE: diff --git a/sql/log.cc b/sql/log.cc index 7e0e90e28c0..93dd70b33c5 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -29,6 +29,7 @@ #include "rpl_filter.h" #include "rpl_rli.h" +#include "sql_show.h" #include #include #include // For test_if_number @@ -1708,17 +1709,24 @@ static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) DBUG_ENTER("binlog_savepoint_set"); binlog_trans_log_savepos(thd, (my_off_t*) sv); + + // buffer to store quoted identifier + char* buffer= (char *)my_malloc(sizeof("SAVEPOINT ")+ 1 + NAME_LEN * 2 + 2, + MYF(0)); + String log_query(buffer, sizeof(buffer), system_charset_info); + log_query.length(0); + /* Write it to the binary log */ - String log_query; - if (log_query.append(STRING_WITH_LEN("SAVEPOINT ")) || - log_query.append("`") || - log_query.append(thd->lex->ident.str, thd->lex->ident.length) || - log_query.append("`")) + if (log_query.append(STRING_WITH_LEN("SAVEPOINT "))) DBUG_RETURN(1); + else + append_identifier(thd, &log_query, thd->lex->ident.str, + thd->lex->ident.length); int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); Query_log_event qinfo(thd, log_query.c_ptr_safe(), log_query.length(), TRUE, TRUE, errcode); + my_free(buffer, MYF(MY_WME)); DBUG_RETURN(mysql_bin_log.write(&qinfo)); } @@ -1731,18 +1739,23 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv) non-transactional table. Otherwise, truncate the binlog cache starting from the SAVEPOINT command. */ - if (unlikely(trans_has_updated_non_trans_table(thd) || + if (unlikely(trans_has_updated_non_trans_table(thd) || (thd->options & OPTION_KEEP_LOG))) { - String log_query; - if (log_query.append(STRING_WITH_LEN("ROLLBACK TO ")) || - log_query.append("`") || - log_query.append(thd->lex->ident.str, thd->lex->ident.length) || - log_query.append("`")) + // buffer to store rollback query with quoted identifier + char* buffer= (char *)my_malloc(12 + 1 + NAME_LEN * 2 + 2, MYF(0)); + String log_query(buffer, sizeof(buffer), system_charset_info); + log_query.length(0); + + if (log_query.append(STRING_WITH_LEN("ROLLBACK TO "))) DBUG_RETURN(1); + else + append_identifier(thd, &log_query, thd->lex->ident.str, + thd->lex->ident.length); int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); Query_log_event qinfo(thd, log_query.c_ptr_safe(), log_query.length(), TRUE, TRUE, errcode); + my_free(buffer, MYF(MY_WME)); DBUG_RETURN(mysql_bin_log.write(&qinfo)); } binlog_trans_log_truncate(thd, *(my_off_t*)sv); diff --git a/sql/log_event.cc b/sql/log_event.cc index 2f27efa8b4e..829ee06d20e 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -34,6 +34,7 @@ #include "rpl_utility.h" #include "rpl_record.h" #include +#include "sql_show.h" // append_identifier #endif /* MYSQL_CLIENT */ @@ -1946,6 +1947,10 @@ Rows_log_event::print_verbose_one_row(IO_CACHE *file, table_def *td, void Rows_log_event::print_verbose(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info) { + // Quoted length of the identifier can be twice the original length + char quoted_db[1 + NAME_LEN * 2 + 2]; + char quoted_table[1 + NAME_LEN * 2 + 2]; + int quoted_db_len, quoted_table_len; Table_map_log_event *map; table_def *td; const char *sql_command, *sql_clause1, *sql_clause2; @@ -1982,9 +1987,23 @@ void Rows_log_event::print_verbose(IO_CACHE *file, for (const uchar *value= m_rows_buf; value < m_rows_end; ) { size_t length; +#ifdef MYSQL_SERVER + quoted_db_len= my_strmov_quoted_identifier(this->thd, (char *) quoted_db, + map->get_db_name(), 0); + quoted_table_len= my_strmov_quoted_identifier(this->thd, + (char *) quoted_table, + map->get_table_name(), 0); +#else + quoted_db_len= my_strmov_quoted_identifier((char *) quoted_db, + map->get_db_name()); + quoted_table_len= my_strmov_quoted_identifier((char *) quoted_table, + map->get_table_name()); +#endif + quoted_db[quoted_db_len]= '\0'; + quoted_table[quoted_table_len]= '\0'; my_b_printf(file, "### %s %s.%s\n", sql_command, - map->get_db_name(), map->get_table_name()); + quoted_db, quoted_table); /* Print the first image */ if (!(length= print_verbose_one_row(file, td, print_event_info, &m_cols, value, @@ -2143,24 +2162,20 @@ Log_event::continue_group(Relay_log_info *rli) void Query_log_event::pack_info(Protocol *protocol) { // TODO: show the catalog ?? - char *buf, *pos; - if (!(buf= (char*) my_malloc(9 + db_len + q_len, MYF(MY_WME)))) - return; - pos= buf; + String temp_buf; + // Add use `DB` to the string if required if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db && db_len) { - pos= strmov(buf, "use `"); - memcpy(pos, db, db_len); - pos= strmov(pos+db_len, "`; "); + temp_buf.append("use "); + append_identifier(this->thd, &temp_buf, db, db_len); + temp_buf.append("; "); } + // Add the query to the string if (query && q_len) - { - memcpy(pos, query, q_len); - pos+= q_len; - } - protocol->store(buf, pos-buf, &my_charset_bin); - my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); + temp_buf.append(query); + // persist the buffer in protocol + protocol->store(temp_buf.ptr(), temp_buf.length(), &my_charset_bin); } #endif @@ -2932,6 +2947,8 @@ void Query_log_event::print_query_header(IO_CACHE* file, { // TODO: print the catalog ?? char buff[40],*end; // Enough for SET TIMESTAMP + char quoted_id[1+ 2*FN_REFLEN+ 2]; + int quoted_len= 0; bool different_db= 1; uint32 tmp; @@ -2950,11 +2967,17 @@ void Query_log_event::print_query_header(IO_CACHE* file, } else if (db) { +#ifdef MYSQL_SERVER + quoted_len= my_strmov_quoted_identifier(this->thd, (char*)quoted_id, db, 0); +#else + quoted_len= my_strmov_quoted_identifier((char*)quoted_id, db); +#endif + quoted_id[quoted_len]= '\0'; different_db= memcmp(print_event_info->db, db, db_len + 1); if (different_db) memcpy(print_event_info->db, db, db_len + 1); if (db[0] && different_db) - my_b_printf(file, "use %s%s\n", db, print_event_info->delimiter); + my_b_printf(file, "use %s%s\n", quoted_id, print_event_info->delimiter); } end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10); @@ -4216,7 +4239,8 @@ void Format_description_log_event::calc_server_version_split() uint Load_log_event::get_query_buffer_length() { return - 5 + db_len + 3 + // "use DB; " + //the DB name may double if we escape the quote character + 5 + 2*db_len + 3 + 18 + fname_len + 2 + // "LOAD DATA INFILE 'file''" 11 + // "CONCURRENT " 7 + // LOCAL @@ -4235,13 +4259,21 @@ uint Load_log_event::get_query_buffer_length() void Load_log_event::print_query(bool need_db, const char *cs, char *buf, char **end, char **fn_start, char **fn_end) { + char quoted_id[1 + NAME_LEN * 2 + 2];//quoted length + int quoted_id_len= 0; char *pos= buf; if (need_db && db && db_len) { - pos= strmov(pos, "use `"); - memcpy(pos, db, db_len); - pos= strmov(pos+db_len, "`; "); + pos= strmov(pos, "use "); +#ifdef MYSQL_SERVER + quoted_id_len= my_strmov_quoted_identifier(this->thd, (char *) quoted_id, + db, 0); +#else + quoted_id_len= my_strmov_quoted_identifier((char *) quoted_id, db); +#endif + pos+= quoted_id_len; + pos= strmov(pos, "; "); } pos= strmov(pos, "LOAD DATA "); @@ -4268,17 +4300,15 @@ void Load_log_event::print_query(bool need_db, const char *cs, char *buf, if (fn_end) *fn_end= pos; - pos= strmov(pos ," TABLE `"); + pos= strmov(pos ," TABLE "); memcpy(pos, table_name, table_name_len); pos+= table_name_len; if (cs != NULL) { - pos= strmov(pos ,"` CHARACTER SET "); + pos= strmov(pos ," CHARACTER SET "); pos= strmov(pos , cs); } - else - pos= strmov(pos, "`"); /* We have to create all optional fields as the default is not empty */ pos= strmov(pos, " FIELDS TERMINATED BY "); @@ -4318,9 +4348,9 @@ void Load_log_event::print_query(bool need_db, const char *cs, char *buf, *pos++= ' '; *pos++= ','; } - memcpy(pos, field, field_lens[i]); - pos+= field_lens[i]; - field+= field_lens[i] + 1; + quoted_id_len= my_strmov_quoted_identifier(this->thd, quoted_id, field, + 0); + memcpy(pos, quoted_id, quoted_id_len); } *pos++= ')'; } @@ -4560,6 +4590,8 @@ void Load_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info, bool commented) { + size_t id_len= 0; + char temp_buf[1 + 2*FN_REFLEN + 2]; Write_on_release_cache cache(&print_event_info->head_cache, file_arg); DBUG_ENTER("Load_log_event::print"); @@ -4585,10 +4617,16 @@ void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info, } if (db && db[0] && different_db) - my_b_printf(&cache, "%suse %s%s\n", - commented ? "# " : "", - db, print_event_info->delimiter); - + { +#ifdef MYSQL_SERVER + id_len= my_strmov_quoted_identifier(this->thd, temp_buf, db, 0); +#else + id_len= my_strmov_quoted_identifier(temp_buf, db); +#endif + temp_buf[id_len]= '\0'; + my_b_printf(&cache, "%suse %s%s\n", + commented ? "# " : "", temp_buf, print_event_info->delimiter); + } if (flags & LOG_EVENT_THREAD_SPECIFIC_F) my_b_printf(&cache,"%sSET @@session.pseudo_thread_id=%lu%s\n", commented ? "# " : "", (ulong)thread_id, @@ -4603,8 +4641,14 @@ void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info, my_b_printf(&cache,"REPLACE "); else if (sql_ex.opt_flags & IGNORE_FLAG) my_b_printf(&cache,"IGNORE "); - - my_b_printf(&cache, "INTO TABLE `%s`", table_name); + +#ifdef MYSQL_SERVER + id_len= my_strmov_quoted_identifier(this->thd, temp_buf, table_name, 0); +#else + id_len= my_strmov_quoted_identifier(temp_buf, table_name); +#endif + temp_buf[id_len]= '\0'; + my_b_printf(&cache, "INTO TABLE %s", temp_buf); my_b_printf(&cache, " FIELDS TERMINATED BY "); pretty_print_str(&cache, sql_ex.field_term, sql_ex.field_term_len); @@ -4637,7 +4681,9 @@ void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info, { if (i) my_b_printf(&cache, ","); - my_b_printf(&cache, "%s", field); + id_len= my_strmov_quoted_identifier((char *) temp_buf, field); + temp_buf[id_len]= '\0'; + my_b_printf(&cache, "%s", temp_buf); field += field_lens[i] + 1; } @@ -5560,7 +5606,10 @@ Xid_log_event::do_shall_skip(Relay_log_info *rli) void User_var_log_event::pack_info(Protocol* protocol) { char *buf= 0; - uint val_offset= 4 + name_len; + char quoted_id[1 + FN_REFLEN * 2 + 2];// quoted identifier + int id_len= my_strmov_quoted_identifier(this->thd, quoted_id, name, 0); + quoted_id[id_len]= '\0'; + uint val_offset= 2 + id_len; uint event_len= val_offset; if (is_null) @@ -5626,10 +5675,8 @@ void User_var_log_event::pack_info(Protocol* protocol) } } buf[0]= '@'; - buf[1]= '`'; - memcpy(buf+2, name, name_len); - buf[2+name_len]= '`'; - buf[3+name_len]= '='; + memcpy(buf + 1, quoted_id, id_len); + buf[1 + id_len]= '='; protocol->store(buf, event_len, &my_charset_bin); my_free(buf, MYF(0)); } @@ -5740,6 +5787,8 @@ bool User_var_log_event::write(IO_CACHE* file) #ifdef MYSQL_CLIENT void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) { + char quoted_id[1 + NAME_LEN * 2 + 2];// quoted length of the identifier + int quoted_len= 0; Write_on_release_cache cache(&print_event_info->head_cache, file, Write_on_release_cache::FLUSH_F); @@ -5749,9 +5798,11 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) my_b_printf(&cache, "\tUser_var\n"); } - my_b_printf(&cache, "SET @`"); - my_b_write(&cache, (uchar*) name, (uint) (name_len)); - my_b_printf(&cache, "`"); + my_b_printf(&cache, "SET @"); + quoted_len= my_strmov_quoted_identifier((char *) quoted_id, + (const char *) name); + quoted_id[quoted_len]= '\0'; + my_b_write(&cache, (uchar*) quoted_id, (uint) quoted_len); if (is_null) { @@ -7043,14 +7094,23 @@ void Execute_load_query_log_event::print(FILE* file, void Execute_load_query_log_event::pack_info(Protocol *protocol) { char *buf, *pos; - if (!(buf= (char*) my_malloc(9 + db_len + q_len + 10 + 21, MYF(MY_WME)))) + if (!(buf= (char*) my_malloc(9 + (db_len * 2) + 2 + q_len + 10 + 21, + MYF(MY_WME)))) return; pos= buf; if (db && db_len) { - pos= strmov(buf, "use `"); - memcpy(pos, db, db_len); - pos= strmov(pos+db_len, "`; "); + /* + Statically allocates room to store '\0' and an identifier + that may have NAME_LEN * 2 due to quoting and there are + two quoting characters that wrap them. + */ + char quoted_db[1 + NAME_LEN * 2 + 2];// quoted length of the identifier + size_t size= 0; + size= my_strmov_quoted_identifier(this->thd, quoted_db, db, 0); + pos= strmov(buf, "use "); + memcpy(pos, quoted_db, size); + pos= strmov(pos + size, "; "); } if (query && q_len) { @@ -9907,3 +9967,62 @@ st_print_event_info::st_print_event_info() open_cached_file(&body_cache, NULL, NULL, 0, flags); } #endif + +#ifdef MYSQL_SERVER +/* + This is a utility function that adds a quoted identifier into the a buffer. + This also escapes any existance of the quote string inside the identifier. + + SYNOPSIS + my_strmov_quoted_identifier + thd thread handler + buffer target buffer + identifier the identifier to be quoted + length length of the identifier +*/ +size_t my_strmov_quoted_identifier(THD* thd, char *buffer, + const char* identifier, + uint length) +{ + int q= thd ? get_quote_char_for_identifier(thd, identifier, length) : '`'; + return my_strmov_quoted_identifier_helper(q, buffer, identifier, length); +} +#else +size_t my_strmov_quoted_identifier(char *buffer, const char* identifier) +{ + int q= '`'; + return my_strmov_quoted_identifier_helper(q, buffer, identifier, 0); +} + +#endif + +size_t my_strmov_quoted_identifier_helper(int q, char *buffer, + const char* identifier, + uint length) +{ + size_t written= 0; + char quote_char; + uint id_length= (length) ? length : strlen(identifier); + + if (q == EOF) + { + (void *) strncpy(buffer, identifier, id_length); + return id_length; + } + quote_char= (char) q; + *buffer++= quote_char; + written++; + while (id_length--) + { + if (*identifier == quote_char) + { + *buffer++= quote_char; + written++; + } + *buffer++= *identifier++; + written++; + } + *buffer++= quote_char; + return ++written; +} + diff --git a/sql/log_event.h b/sql/log_event.h index 6b411a90382..ba6b9b876aa 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3987,6 +3987,22 @@ static inline bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache, bool slave_execute_deferred_events(THD *thd); #endif +#ifdef MYSQL_SERVER +/** + This is an utility function that adds a quoted identifier into the a buffer. + This also escapes any existance of the quote string inside the identifier. + */ +size_t my_strmov_quoted_identifier(THD *thd, char *buffer, + const char* identifier, + uint length); +#else +size_t my_strmov_quoted_identifier(char *buffer, const char* identifier); +#endif +size_t my_strmov_quoted_identifier_helper(int q, char *buffer, + const char* identifier, + uint length); + + /** @} (end of group Replication) */ diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 2ce5ec81917..c7513f45983 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4144,24 +4144,19 @@ retry: entry->file->implicit_emptied= 0; if (mysql_bin_log.is_open()) { - char *query, *end; - uint query_buf_size= 20 + share->db.length + share->table_name.length +1; - if ((query= (char*) my_malloc(query_buf_size,MYF(MY_WME)))) - { - /* this DELETE FROM is needed even with row-based binlogging */ - end = strxmov(strmov(query, "DELETE FROM `"), - share->db.str,"`.`",share->table_name.str,"`", NullS); - int errcode= query_error_code(thd, TRUE); - if (thd->binlog_query(THD::STMT_QUERY_TYPE, - query, (ulong)(end-query), - FALSE, FALSE, errcode)) - { - my_free(query, MYF(0)); - goto err; - } - my_free(query, MYF(0)); - } - else + bool error= false; + String temp_buf; + error= temp_buf.append("DELETE FROM "); + append_identifier(thd, &temp_buf, share->db.str, strlen(share->db.str)); + error= temp_buf.append("."); + append_identifier(thd, &temp_buf, share->table_name.str, + strlen(share->table_name.str)); + int errcode= query_error_code(thd, TRUE); + if (thd->binlog_query(THD::STMT_QUERY_TYPE, + temp_buf.ptr(), temp_buf.length(), + FALSE, FALSE, errcode)) + goto err; + if(error) { /* As replication is maybe going to be corrupted, we need to warn the diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 39c33da23ef..fe3aed5c8f0 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -25,6 +25,7 @@ #include #include #include "log.h" +#include "log_event.h" #ifdef __WIN__ #include #endif @@ -718,12 +719,17 @@ not_silent: { char *query; uint query_length; + char db_name_quoted[2 * FN_REFLEN + sizeof("create database ") + 2]; + int id_len= 0; if (!thd->query()) // Only in replication { - query= tmp_query; - query_length= (uint) (strxmov(tmp_query,"create database `", - db, "`", NullS) - tmp_query); + id_len= my_strmov_quoted_identifier(thd, (char *) db_name_quoted, db, + 0); + db_name_quoted[id_len]= '\0'; + query= tmp_query; + query_length= (uint) (strxmov(tmp_query,"create database ", + db_name_quoted, NullS) - tmp_query); } else { @@ -889,7 +895,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) { long deleted=0; int error= 0; - char path[FN_REFLEN+16]; + char path[2 * FN_REFLEN + 16]; MY_DIR *dirp; uint length; TABLE_LIST* dropped_tables= 0; @@ -989,11 +995,17 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) { const char *query; ulong query_length; + // quoted db name + wraping quote + char buffer_temp [2 * FN_REFLEN + 2]; + int id_len= 0; + if (!thd->query()) { /* The client used the old obsolete mysql_drop_db() call */ query= path; - query_length= (uint) (strxmov(path, "drop database `", db, "`", + id_len= my_strmov_quoted_identifier(thd, buffer_temp, db, strlen(db)); + buffer_temp[id_len] ='\0'; + query_length= (uint) (strxmov(path, "DROP DATABASE ", buffer_temp, "", NullS) - path); } else @@ -1029,12 +1041,13 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) else if (mysql_bin_log.is_open()) { char *query, *query_pos, *query_end, *query_data_start; + char temp_identifier[ 2 * FN_REFLEN + 2]; TABLE_LIST *tbl; - uint db_len; + uint db_len, id_length=0; if (!(query= (char*) thd->alloc(MAX_DROP_TABLE_Q_LEN))) goto exit; /* not much else we can do */ - query_pos= query_data_start= strmov(query,"drop table "); + query_pos= query_data_start= strmov(query,"DROP TABLE "); query_end= query + MAX_DROP_TABLE_Q_LEN; db_len= strlen(db); @@ -1054,10 +1067,10 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) } query_pos= query_data_start; } - - *query_pos++ = '`'; - query_pos= strmov(query_pos,tbl->table_name); - *query_pos++ = '`'; + id_length= my_strmov_quoted_identifier(thd, (char *)temp_identifier, + tbl->table_name, 0); + temp_identifier[id_length]= '\0'; + query_pos= strmov(query_pos,(char *)&temp_identifier); *query_pos++ = ','; } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 4cd456829ba..7e94e7e7df3 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3426,16 +3426,16 @@ int select_create::write_to_binlog(bool is_trans, int errcode) if (thd->lex->create_select_in_comment) query.append(STRING_WITH_LEN("/*! ")); if (thd->lex->ignore) - query.append(STRING_WITH_LEN("INSERT IGNORE INTO `")); + query.append(STRING_WITH_LEN("INSERT IGNORE INTO ")); else if (thd->lex->duplicates == DUP_REPLACE) - query.append(STRING_WITH_LEN("REPLACE INTO `")); + query.append(STRING_WITH_LEN("REPLACE INTO ")); else - query.append(STRING_WITH_LEN("INSERT INTO `")); + query.append(STRING_WITH_LEN("INSERT INTO ")); - query.append(create_table->db, db_len); - query.append(STRING_WITH_LEN("`.`")); - query.append(create_info->alias, table_len); - query.append(STRING_WITH_LEN("` ")); + append_identifier(thd, &query, create_table->db, db_len); + query.append(STRING_WITH_LEN(".")); + append_identifier(thd, &query, create_info->alias, table_len ); + query.append(STRING_WITH_LEN(" ")); /* The insert items. @@ -3447,9 +3447,8 @@ int select_create::write_to_binlog(bool is_trans, int errcode) if (f != field) query.append(STRING_WITH_LEN(",")); - query.append(STRING_WITH_LEN("`")); - query.append((*f)->field_name, strlen((*f)->field_name)); - query.append(STRING_WITH_LEN("`")); + append_identifier(thd, &query, (*f)->field_name, + strlen((*f)->field_name)); } query.append(STRING_WITH_LEN(") ")); diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 6a0e5fd9133..b736fa59c22 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -25,6 +25,7 @@ #include "sp_head.h" #include "sql_trigger.h" +#include "sql_show.h" class READ_INFO { File file; uchar *buffer, /* Buffer for read text */ @@ -619,23 +620,20 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, const char *tbl= table_name_arg; const char *tdb= (thd->db != NULL ? thd->db : db_arg); String string_buf; - - if (!thd->db || strcmp(db_arg, thd->db)) + if (!thd->db || strcmp(db_arg, thd->db)) { /* - If used database differs from table's database, - prefix table name with database name so that it + If used database differs from table's database, + prefix table name with database name so that it becomes a FQ name. */ string_buf.set_charset(system_charset_info); - string_buf.append(db_arg); - string_buf.append("`"); + append_identifier(thd, &string_buf, db_arg, strlen(db_arg)); string_buf.append("."); - string_buf.append("`"); - string_buf.append(table_name_arg); - tbl= string_buf.c_ptr_safe(); } - + append_identifier(thd, &string_buf, table_name_arg, + strlen(table_name_arg)); + tbl= string_buf.c_ptr_safe(); Load_log_event lle(thd, ex, tdb, tbl, fv, duplicates, ignore, transactional_table); @@ -660,11 +658,7 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, if (n++) pfields.append(", "); if (item->name) - { - pfields.append("`"); - pfields.append(item->name); - pfields.append("`"); - } + append_identifier(thd, &pfields, item->name, strlen(item->name)); else item->print(&pfields, QT_ORDINARY); } @@ -684,9 +678,7 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, val= lv++; if (n++) pfields.append(", "); - pfields.append("`"); - pfields.append(item->name); - pfields.append("`"); + append_identifier(thd, &pfields, item->name, strlen(item->name)); pfields.append("="); val->print(&pfields, QT_ORDINARY); } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 7847fe5b510..7859d7f61e3 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1006,7 +1006,8 @@ append_identifier(THD *thd, String *packet, const char *name, uint length) { const char *name_end; char quote_char; - int q= get_quote_char_for_identifier(thd, name, length); + int q; + q= thd ? get_quote_char_for_identifier(thd, name, length) : '`'; if (q == EOF) { diff --git a/sql/sql_show.h b/sql/sql_show.h index fec73122e8b..3a6cd158cb4 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -40,5 +40,6 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, int view_store_create_info(THD *thd, TABLE_LIST *table, String *buff); int copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table); +int get_quote_char_for_identifier(THD *thd, const char *name, uint length); #endif /* SQL_SHOW_H */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 39eee62ee91..b8d57341e42 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1944,6 +1944,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, for (table= tables; table; table= table->next_local) { char *db=table->db; + int db_len= table->db_length; handlerton *table_type; enum legacy_db_type frm_db_type= DB_TYPE_UNKNOWN; @@ -1966,14 +1967,14 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, built_tmp_query.append("DROP TEMPORARY TABLE IF EXISTS "); } - built_tmp_query.append("`"); if (thd->db == NULL || strcmp(db,thd->db) != 0) { - built_tmp_query.append(db); - built_tmp_query.append("`.`"); + append_identifier(thd, &built_tmp_query, db, db_len); + built_tmp_query.append("."); } - built_tmp_query.append(table->table_name); - built_tmp_query.append("`,"); + append_identifier(thd, &built_tmp_query, table->table_name, + strlen(table->table_name)); + built_tmp_query.append(","); } continue; @@ -1999,15 +2000,14 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, Don't write the database name if it is the current one (or if thd->db is NULL). */ - built_query.append("`"); if (thd->db == NULL || strcmp(db,thd->db) != 0) { - built_query.append(db); - built_query.append("`.`"); + append_identifier(thd, &built_query, db, db_len); + built_query.append("."); } - - built_query.append(table->table_name); - built_query.append("`,"); + append_identifier(thd, &built_query, table->table_name, + strlen(table->table_name)); + built_query.append(","); } if (!drop_temporary) From 7c671a7ead96dd9115a6ae77ebbf78d0dea43485 Mon Sep 17 00:00:00 2001 From: Rohit Kalhans Date: Sun, 23 Sep 2012 15:45:22 +0530 Subject: [PATCH 13/47] BUG#14548159: Followup patch to fix some issues on PB2 --- sql/ha_ndbcluster_binlog.cc | 2 +- sql/log_event.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 70e52306e14..6d2a6f06c99 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -1307,7 +1307,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share, new_table_name, 0); quoted_table2[id_length]= '\0'; query_length= (uint) (strxmov(tmp_buf2, "rename table ", - quoted_db1, ".", quoted_table_1, " to ", + quoted_db1, ".", quoted_table1, " to ", quoted_db2, ".", quoted_table2, NullS) - tmp_buf2); type_str= "rename table"; break; diff --git a/sql/log_event.cc b/sql/log_event.cc index 829ee06d20e..c3ba969cf1f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4259,7 +4259,7 @@ uint Load_log_event::get_query_buffer_length() void Load_log_event::print_query(bool need_db, const char *cs, char *buf, char **end, char **fn_start, char **fn_end) { - char quoted_id[1 + NAME_LEN * 2 + 2];//quoted length + char quoted_id[1 + NAME_LEN * 2 + 2];//quoted length int quoted_id_len= 0; char *pos= buf; @@ -4272,7 +4272,8 @@ void Load_log_event::print_query(bool need_db, const char *cs, char *buf, #else quoted_id_len= my_strmov_quoted_identifier((char *) quoted_id, db); #endif - pos+= quoted_id_len; + quoted_id[quoted_id_len]= '\0'; + pos= strmov(pos, quoted_id); pos= strmov(pos, "; "); } From 815aad69287d83a1e1e98cd7797d02ca96f74bc3 Mon Sep 17 00:00:00 2001 From: Raghav Kapoor Date: Tue, 25 Sep 2012 15:58:46 +0530 Subject: [PATCH 14/47] BUG#13864642: DROP/CREATE USER BEHAVING ODDLY BACKGROUND: In certain situations DROP USER fails to remove all privileges belonging to user being dropped from in-memory structures. Current workaround is to do DROP USER twice in scenario below OR doing FLUSH PRIVILEGES after doing DROP USER. ANALYSIS: In MySQL, When we grant some stored routines privileges to a user they are stored in their respective hash. When doing DROP USER all the stored routine privilege entries associated with that user has to be deleted from its respective hash. The root cause for this bug is some entries from the hash are not getting deleted. The problem is that code that deletes entries from the hash tries to do so while iterating over it, without taking enough measures to address the fact that such deletion can reshuffle elements in the hash. If the user/administrator creates the same user again he is thrown an error 'Error 1396 ER_CANNOT_USER' from MySQL. This prompts the user to either do FLUSH PRIVILEGES or do DROP USER again. This behaviour is not desirable as it is a workaround and does not solves the problem mentioned above. FIX: This bug is fixed by introducing a dynamic array to store the pointersto all stored routine privilege objects that either have to be deleted or updated. This is done in 3 steps. Step 1: Fetching the element from the hash and checking whether it is to be deleted or updated. Step 2: Storing the pointer to that privilege object in dynamic array. Step 3: Traversing the dynamic array to perform the appropriate action either delete or update. This is a much cleaner way to delete or update the privilege entries associated with some user and solves the problem mentioned above. Also the code has been refactored a bit by introducing an enum instead of hard coded numbers used for respective dynamic arrays and hashes in handle_grant_struct() function. --- sql/sql_acl.cc | 241 ++++++++++++++++++++++++++++++------------------- 1 file changed, 149 insertions(+), 92 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 6d5d34d0602..e07f668b1cf 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -195,7 +195,17 @@ static bool compare_hostname(const acl_host_and_ip *host,const char *hostname, static my_bool acl_load(THD *thd, TABLE_LIST *tables); static my_bool grant_load(THD *thd, TABLE_LIST *tables); static inline void get_grantor(THD *thd, char* grantor); - +/* + Enumeration of various ACL's and Hashes used in handle_grant_struct() +*/ +enum enum_acl_lists +{ + USER_ACL= 0, + DB_ACL, + COLUMN_PRIVILEGES_HASH, + PROC_PRIVILEGES_HASH, + FUNC_PRIVILEGES_HASH +}; /* Convert scrambled password to binary form, according to scramble type, Binary form is stored in user.salt. @@ -5390,19 +5400,19 @@ static int handle_grant_table(TABLE_LIST *tables, uint table_no, bool drop, Delete from grant structure if drop is true. Update in grant structure if drop is false and user_to is not NULL. Search in grant structure if drop is false and user_to is NULL. - Structures are numbered as follows: - 0 acl_users - 1 acl_dbs - 2 column_priv_hash - 3 proc_priv_hash - 4 func_priv_hash + Structures are enumerated as follows: + 0 ACL_USER + 1 ACL_DB + 2 COLUMN_PRIVILEGES_HASH + 3 PROC_PRIVILEGES_HASH + 4 FUNC_PRIVILEGES_HASH @retval > 0 At least one element matched. @retval 0 OK, but no element matched. - @retval -1 Wrong arguments to function. + @retval -1 Wrong arguments to function or Out of Memory */ -static int handle_grant_struct(uint struct_no, bool drop, +static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop, LEX_USER *user_from, LEX_USER *user_to) { int result= 0; @@ -5413,6 +5423,11 @@ static int handle_grant_struct(uint struct_no, bool drop, ACL_USER *acl_user= NULL; ACL_DB *acl_db= NULL; GRANT_NAME *grant_name= NULL; + /* + Dynamic array acl_grant_name used to store pointers to all + GRANT_NAME objects + */ + Dynamic_array acl_grant_name; HASH *grant_name_hash= NULL; DBUG_ENTER("handle_grant_struct"); DBUG_PRINT("info",("scan struct: %u search: '%s'@'%s'", @@ -5425,21 +5440,21 @@ static int handle_grant_struct(uint struct_no, bool drop, /* Get the number of elements in the in-memory structure. */ switch (struct_no) { - case 0: + case USER_ACL: elements= acl_users.elements; break; - case 1: + case DB_ACL: elements= acl_dbs.elements; break; - case 2: + case COLUMN_PRIVILEGES_HASH: elements= column_priv_hash.records; grant_name_hash= &column_priv_hash; break; - case 3: + case PROC_PRIVILEGES_HASH: elements= proc_priv_hash.records; grant_name_hash= &proc_priv_hash; break; - case 4: + case FUNC_PRIVILEGES_HASH: elements= func_priv_hash.records; grant_name_hash= &func_priv_hash; break; @@ -5458,21 +5473,21 @@ static int handle_grant_struct(uint struct_no, bool drop, Get a pointer to the element. */ switch (struct_no) { - case 0: + case USER_ACL: acl_user= dynamic_element(&acl_users, idx, ACL_USER*); user= acl_user->user; host= acl_user->host.hostname; break; - case 1: + case DB_ACL: acl_db= dynamic_element(&acl_dbs, idx, ACL_DB*); user= acl_db->user; host= acl_db->host.hostname; break; - case 2: - case 3: - case 4: + case COLUMN_PRIVILEGES_HASH: + case PROC_PRIVILEGES_HASH: + case FUNC_PRIVILEGES_HASH: grant_name= (GRANT_NAME*) hash_element(grant_name_hash, idx); user= grant_name->user; host= grant_name->host.hostname; @@ -5498,86 +5513,60 @@ static int handle_grant_struct(uint struct_no, bool drop, if ( drop ) { switch ( struct_no ) { - case 0: + case USER_ACL: delete_dynamic_element(&acl_users, idx); - break; - - case 1: - delete_dynamic_element(&acl_dbs, idx); - break; - - case 2: - case 3: - case 4: - hash_delete(grant_name_hash, (uchar*) grant_name); - break; - } - elements--; - /* + elements--; + /* - If we are iterating through an array then we just have moved all elements after the current element one position closer to its head. This means that we have to take another look at the element at current position as it is a new element from the array's tail. - - If we are iterating through a hash the current element was replaced - with one of elements from the tail. So we also have to take a look - at the new element in current position. - Note that in our HASH implementation hash_delete() won't move any - elements with position after current one to position before the - current (i.e. from the tail to the head), so it is safe to continue - iteration without re-starting. - */ - idx--; + - This is valid for USER_ACL, DB_ACL. + */ + idx--; + break; + + case DB_ACL: + delete_dynamic_element(&acl_dbs, idx); + elements--; + idx--; + break; + + case COLUMN_PRIVILEGES_HASH: + case PROC_PRIVILEGES_HASH: + case FUNC_PRIVILEGES_HASH: + /* + Deleting while traversing a hash table is not valid procedure and + hence we save pointers to GRANT_NAME objects for later processing. + */ + if (acl_grant_name.append(grant_name)) + DBUG_RETURN(-1); + break; + } } else if ( user_to ) { switch ( struct_no ) { - case 0: + case USER_ACL: acl_user->user= strdup_root(&mem, user_to->user.str); acl_user->host.hostname= strdup_root(&mem, user_to->host.str); break; - case 1: + case DB_ACL: acl_db->user= strdup_root(&mem, user_to->user.str); acl_db->host.hostname= strdup_root(&mem, user_to->host.str); break; - case 2: - case 3: - case 4: - { - /* - Save old hash key and its length to be able properly update - element position in hash. - */ - char *old_key= grant_name->hash_key; - size_t old_key_length= grant_name->key_length; - - /* - Update the grant structure with the new user name and host name. - */ - grant_name->set_user_details(user_to->host.str, grant_name->db, - user_to->user.str, grant_name->tname, - TRUE); - - /* - Since username is part of the hash key, when the user name - is renamed, the hash key is changed. Update the hash to - ensure that the position matches the new hash key value - */ - hash_update(grant_name_hash, (uchar*) grant_name, (uchar*) old_key, - old_key_length); - /* - hash_update() operation could have moved element from the tail - of the hash to the current position. So we need to take a look - at the element in current position once again. - Thanks to the fact that hash_update() for our HASH implementation - won't move any elements from the tail of the hash to the positions - before the current one (a.k.a. head) it is safe to continue - iteration without restarting. - */ - idx--; - break; - } + case COLUMN_PRIVILEGES_HASH: + case PROC_PRIVILEGES_HASH: + case FUNC_PRIVILEGES_HASH: + /* + Updating while traversing a hash table is not valid procedure and + hence we save pointers to GRANT_NAME objects for later processing. + */ + if (acl_grant_name.append(grant_name)) + DBUG_RETURN(-1); + break; } } else @@ -5586,6 +5575,48 @@ static int handle_grant_struct(uint struct_no, bool drop, break; } } + + if (drop || user_to) + { + /* + Traversing the elements stored in acl_grant_name dynamic array + to either delete or update them. + */ + for (int i= 0; i < acl_grant_name.elements(); ++i) + { + grant_name= acl_grant_name.at(i); + + if (drop) + { + my_hash_delete(grant_name_hash, (uchar *) grant_name); + } + else + { + /* + Save old hash key and its length to be able properly update + element position in hash. + */ + char *old_key= grant_name->hash_key; + size_t old_key_length= grant_name->key_length; + + /* + Update the grant structure with the new user name and host name. + */ + grant_name->set_user_details(user_to->host.str, grant_name->db, + user_to->user.str, grant_name->tname, + TRUE); + + /* + Since username is part of the hash key, when the user name + is renamed, the hash key is changed. Update the hash to + ensure that the position matches the new hash key value + */ + my_hash_update(grant_name_hash, (uchar*) grant_name, (uchar*) old_key, + old_key_length); + } + } + } + #ifdef EXTRA_DEBUG DBUG_PRINT("loop",("scan struct: %u result %d", struct_no, result)); #endif @@ -5623,6 +5654,7 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, { int result= 0; int found; + int ret; DBUG_ENTER("handle_grant_data"); /* Handle user table. */ @@ -5634,14 +5666,19 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, else { /* Handle user array. */ - if ((handle_grant_struct(0, drop, user_from, user_to) && ! result) || - found) + if (((ret= handle_grant_struct(USER_ACL, drop, user_from, user_to) > 0) && + ! result) || found) { result= 1; /* At least one record/element found. */ /* If search is requested, we do not need to search further. */ if (! drop && ! user_to) goto end; } + else if (ret < 0) + { + result= -1; + goto end; + } } /* Handle db table. */ @@ -5653,14 +5690,19 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, else { /* Handle db array. */ - if (((handle_grant_struct(1, drop, user_from, user_to) && ! result) || - found) && ! result) + if ((((ret= handle_grant_struct(DB_ACL, drop, user_from, user_to) > 0) && + ! result) || found) && ! result) { result= 1; /* At least one record/element found. */ /* If search is requested, we do not need to search further. */ if (! drop && ! user_to) goto end; } + else if (ret < 0) + { + result= -1; + goto end; + } } /* Handle stored routines table. */ @@ -5672,23 +5714,35 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, else { /* Handle procs array. */ - if (((handle_grant_struct(3, drop, user_from, user_to) && ! result) || - found) && ! result) + if ((((ret= handle_grant_struct(PROC_PRIVILEGES_HASH, drop, user_from, + user_to) > 0) && ! result) || found) && + ! result) { result= 1; /* At least one record/element found. */ /* If search is requested, we do not need to search further. */ if (! drop && ! user_to) goto end; } + else if (ret < 0) + { + result= -1; + goto end; + } /* Handle funcs array. */ - if (((handle_grant_struct(4, drop, user_from, user_to) && ! result) || - found) && ! result) + if ((((ret= handle_grant_struct(FUNC_PRIVILEGES_HASH, drop, user_from, + user_to) > 0) && ! result) || found) && + ! result) { result= 1; /* At least one record/element found. */ /* If search is requested, we do not need to search further. */ if (! drop && ! user_to) goto end; } + else if (ret < 0) + { + result= -1; + goto end; + } } /* Handle tables table. */ @@ -5716,9 +5770,12 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, else { /* Handle columns hash. */ - if (((handle_grant_struct(2, drop, user_from, user_to) && ! result) || - found) && ! result) + if ((((ret= handle_grant_struct(COLUMN_PRIVILEGES_HASH, drop, user_from, + user_to) > 0) && ! result) || found) && + ! result) result= 1; /* At least one record/element found. */ + else if (ret < 0) + result= -1; } } end: From 58de1660629890abfeeb50eb6bc9cf998c145894 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Tue, 25 Sep 2012 13:09:53 +0200 Subject: [PATCH 15/47] Bug#14621627 THREAD CACHE IS UNFAIR When a client connects to a MySQL server, first a THD object is created. If there are any idle server threads waiting, the THD object is then added to a list and a server thread is woken up. This thread then retrieves the THD object from the list and starts executing. The problem was that this list of THD objects waiting for a server thread, was not working in a FIFO fashion, but rather LIFO. This is unfair, as it means that the last THD added (=last client connected) will be assigned a server thread first. Note however that for this to be a problem, several clients must be able to connect and have THD objects constructed before any server threads manages to be woken up. This is not a very likely scenario. This patch fixes the problem by changing the THD list to work FIFO rather than LIFO. This is the 5.1/5.5 version of the patch. --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bc8d4162272..11e756381ab 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4808,7 +4808,7 @@ void create_thread_to_handle_connection(THD *thd) if (cached_thread_count > wake_thread) { /* Get thread from cache */ - thread_cache.append(thd); + thread_cache.push_back(thd); wake_thread++; pthread_cond_signal(&COND_thread_cache); } From bb11c81be5eb5126eb968df0e55eb05ac7d72821 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Sep 2012 18:00:26 +0530 Subject: [PATCH 16/47] From 66c7b315b1c71cdf209961c9f25bee52c674429b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Sep 2012 18:44:21 +0530 Subject: [PATCH 17/47] From b079b388a50dfa1fdaa4da0cb22154b0cc6d885e Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 25 Sep 2012 16:03:05 +0200 Subject: [PATCH 18/47] Backport Bug #11764313 57135: CRASH IN ITEM_FUNC_CASE::FIND_ITEM WITH CASE WHEN Bug #11764818 57692: Crash in item_func_in::val_int() with ZEROFILL --- sql/item_cmpfunc.cc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 23f081e1cc0..6e8fa9a5f75 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3045,6 +3045,15 @@ void Item_func_case::fix_length_and_dec() return; } } + /* + Set cmp_context of all WHEN arguments. This prevents + Item_field::equal_fields_propagator() from transforming a + zerofill argument into a string constant. Such a change would + require rebuilding cmp_items. + */ + for (i= 0; i < ncases; i+= 2) + args[i]->cmp_context= item_cmp_type(left_result_type, + args[i]->result_type()); } if (else_expr_num == -1 || args[else_expr_num]->maybe_null) @@ -4032,6 +4041,16 @@ void Item_func_in::fix_length_and_dec() } } } + /* + Set cmp_context of all arguments. This prevents + Item_field::equal_fields_propagator() from transforming a zerofill integer + argument into a string constant. Such a change would require rebuilding + cmp_itmes. + */ + for (arg= args + 1, arg_end= args + arg_count; arg != arg_end ; arg++) + { + arg[0]->cmp_context= item_cmp_type(left_result_type, arg[0]->result_type()); + } max_length= 1; } From 422e6b520dd8790ec2e81790c5621ca4288e5289 Mon Sep 17 00:00:00 2001 From: Akhila Maddukuri Date: Wed, 26 Sep 2012 16:38:42 +0530 Subject: [PATCH 19/47] Description: ----------- After compiling from source, during make test I got the following error: test main.loaddata failed with error CURRENT_TEST: main.loaddata mysqltest: At line 592: query 'LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b)' failed: 1115: Unknown character set: 'ucs2' I noticed other tests are skipped because of no ucs2 main.mix2_myisam_ucs2 [ skipped ] Test requires:' have_ucs2' Should main.loaddata be skipped if there is no ucs2 How To Repeat: ------------- Run make test on compiled source that doesn't have ucs2 Suggested fix: ------------- the failing piece of the test should be moved from mysql-test/t/loaddata.test to mysql-test/t/ctype_ucs.test. --- mysql-test/r/ctype_ucs.result | 26 +++++++++++++++++ mysql-test/r/loaddata.result | 29 ------------------- mysql-test/t/ctype_ucs.test | 32 +++++++++++++++++++++ mysql-test/t/loaddata.test | 54 +++++++++++++++++++---------------- 4 files changed, 87 insertions(+), 54 deletions(-) diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 78b15748eee..62d6c41fa91 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -191,6 +191,32 @@ t1 CREATE TABLE `t1` ( `r` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# Bug #51876 : crash/memory underrun when loading data with ucs2 +# and reverse() function +# +# Problem # 1 (original report): wrong parsing of ucs2 data +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +# should return 2 zeroes (as the value is truncated) +SELECT * FROM t1; +a +0 +1 +DROP TABLE t1; +# Problem # 2 : if you write and read ucs2 data to a file they're lost +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +# should return 0 and 1 (10 reversed) +SELECT * FROM t1; +a +0 +1 +DROP TABLE t1; create table t2(f1 Char(30)); insert into t2 values ("103000"), ("22720000"), ("3401200"), ("78000"); select lpad(f1, 12, "-o-/") from t2; diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 59a1b904744..b3ac1a84fe6 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -504,35 +504,6 @@ CREATE TABLE t1 (id INT NOT NULL); LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1; DROP TABLE t1; # -# Bug #51876 : crash/memory underrun when loading data with ucs2 -# and reverse() function -# -# Problem # 1 (original report): wrong parsing of ucs2 data -SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; -CREATE TABLE t1(a INT); -LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 -(@b) SET a=REVERSE(@b); -Warnings: -Warning 1366 Incorrect integer value: '00' for column 'a' at row 1 -Warning 1366 Incorrect integer value: '10' for column 'a' at row 2 -# should return 2 zeroes (as the value is truncated) -SELECT * FROM t1; -a -0 -0 -DROP TABLE t1; -# Problem # 2 : if you write and read ucs2 data to a file they're lost -SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; -CREATE TABLE t1(a INT); -LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 -(@b) SET a=REVERSE(@b); -# should return 0 and 1 (10 reversed) -SELECT * FROM t1; -a -0 -1 -DROP TABLE t1; -# # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U # CREATE TABLE t1(f1 INT); diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index a9ce6b0b23d..05d564b3de2 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -68,6 +68,38 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r; SHOW CREATE TABLE t1; DROP TABLE t1; +--echo # +--echo # Bug #51876 : crash/memory underrun when loading data with ucs2 +--echo # and reverse() function +--echo # + +--echo # Problem # 1 (original report): wrong parsing of ucs2 data +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +--echo # should return 2 zeroes (as the value is truncated) +SELECT * FROM t1; + +DROP TABLE t1; +let $MYSQLD_DATADIR= `select @@datadir`; +remove_file $MYSQLD_DATADIR/test/tmpp.txt; + + +--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost +SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +CREATE TABLE t1(a INT); +LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 +(@b) SET a=REVERSE(@b); +--echo # should return 0 and 1 (10 reversed) +SELECT * FROM t1; + +DROP TABLE t1; +let $MYSQLD_DATADIR= `select @@datadir`; +remove_file $MYSQLD_DATADIR/test/tmpp2.txt; + + + # # BUG3946 # diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 3d0fdea05ed..def93cb4d29 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -580,36 +580,40 @@ DROP TABLE t1; connection default; disconnect con1; +############################################################################# +# The below protion is moved to ctype_ucs.test # +############################################################################# +#--echo # +#--echo # Bug #51876 : crash/memory underrun when loading data with ucs2 +#--echo # and reverse() function +#--echo # ---echo # ---echo # Bug #51876 : crash/memory underrun when loading data with ucs2 ---echo # and reverse() function ---echo # +#--echo # Problem # 1 (original report): wrong parsing of ucs2 data +#SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; +#CREATE TABLE t1(a INT); +#LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 +#(@b) SET a=REVERSE(@b); +#--echo # should return 2 zeroes (as the value is truncated) +#SELECT * FROM t1; ---echo # Problem # 1 (original report): wrong parsing of ucs2 data -SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; -CREATE TABLE t1(a INT); -LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 -(@b) SET a=REVERSE(@b); ---echo # should return 2 zeroes (as the value is truncated) -SELECT * FROM t1; - -DROP TABLE t1; -let $MYSQLD_DATADIR= `select @@datadir`; -remove_file $MYSQLD_DATADIR/test/tmpp.txt; +#DROP TABLE t1; +#let $MYSQLD_DATADIR= `select @@datadir`; +#remove_file $MYSQLD_DATADIR/test/tmpp.txt; ---echo # Problem # 2 : if you write and read ucs2 data to a file they're lost -SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; -CREATE TABLE t1(a INT); -LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 -(@b) SET a=REVERSE(@b); ---echo # should return 0 and 1 (10 reversed) -SELECT * FROM t1; +#--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost +#SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +#CREATE TABLE t1(a INT); +#LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 +#(@b) SET a=REVERSE(@b); +#--echo # should return 0 and 1 (10 reversed) +#SELECT * FROM t1; + +#DROP TABLE t1; +#let $MYSQLD_DATADIR= `select @@datadir`; +#remove_file $MYSQLD_DATADIR/test/tmpp2.txt; +###################################################################################### -DROP TABLE t1; -let $MYSQLD_DATADIR= `select @@datadir`; -remove_file $MYSQLD_DATADIR/test/tmpp2.txt; --echo # --echo # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U From faca6ed81e90e953fb7cf6e9756c424a0ecd391d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Sep 2012 18:29:09 +0100 Subject: [PATCH 20/47] From b59a64e2f3a48b9e584f73fde0962f4876b20f05 Mon Sep 17 00:00:00 2001 From: Annamalai Gurusami Date: Fri, 28 Sep 2012 16:02:58 +0530 Subject: [PATCH 21/47] Bug #13249921 ASSERT !BPAGE->FILE_PAGE_WAS_FREED, USUALLY IN TRANSACTION ROLLBACK Description: During the rollback operation, a blob page is removed earlier than desired. Consider following scenario: 1. create table t1(a int primary key,b blob) engine=innodb; 2. insert into t1 values (1,repeat('b',9000)); 3. begin; 4. update t1 set b=concat(b,'b'); 5. update t1 set a=a+1; 6. insert into t1 values (1,repeat('b',9000)); 7. rollback; The update operation in line 5 produces 2 undo log record. The first undo record (TRX_UNDO_DEL_MARK_REC) goes to trx->update_undo and the second undo record (TRX_UNDO_INSERT_REC) goes to trx->insert_undo. During rollback, they are executed out of order. When the undo record TRX_UNDO_DEL_MARK_REC is applied/executed, the blob ownership is also reset. Because of this the blob page is released earlier than desired. This blob page must have been freed only as part of applying/executing the undo record TRX_UNDO_INSERT_REC. This problem can be avoided by executing the undo records in order. This patch will make innodb to execute the undo records in order. rb://1125 approved by Marko. --- storage/innobase/include/row0undo.h | 9 +--- storage/innobase/row/row0umod.c | 54 ------------------------ storage/innobase/row/row0undo.c | 19 --------- storage/innodb_plugin/ChangeLog | 7 +++ storage/innodb_plugin/include/row0undo.h | 7 --- storage/innodb_plugin/row/row0umod.c | 53 ----------------------- storage/innodb_plugin/row/row0undo.c | 19 --------- 7 files changed, 9 insertions(+), 159 deletions(-) diff --git a/storage/innobase/include/row0undo.h b/storage/innobase/include/row0undo.h index 0be09ed1822..f7f71a440b5 100644 --- a/storage/innobase/include/row0undo.h +++ b/storage/innobase/include/row0undo.h @@ -78,8 +78,6 @@ struct undo_node_struct{ dulint undo_no;/* undo number of the record */ ulint rec_type;/* undo log record type: TRX_UNDO_INSERT_REC, ... */ - dulint new_roll_ptr; /* roll ptr to restore to clustered index - record */ dulint new_trx_id; /* trx id to restore to clustered index record */ btr_pcur_t pcur; /* persistent cursor used in searching the @@ -101,11 +99,8 @@ struct undo_node_struct{ /* Execution states for an undo node */ #define UNDO_NODE_FETCH_NEXT 1 /* we should fetch the next undo log record */ -#define UNDO_NODE_PREV_VERS 2 /* the roll ptr to previous version of - a row is stored in node, and undo - should be done based on it */ -#define UNDO_NODE_INSERT 3 -#define UNDO_NODE_MODIFY 4 +#define UNDO_NODE_INSERT 2 +#define UNDO_NODE_MODIFY 3 #ifndef UNIV_NONINL diff --git a/storage/innobase/row/row0umod.c b/storage/innobase/row/row0umod.c index a3333fcc536..83288c570cb 100644 --- a/storage/innobase/row/row0umod.c +++ b/storage/innobase/row/row0umod.c @@ -41,37 +41,6 @@ delete marked clustered index record was delete unmarked and possibly also some of its fields were changed. Now, it is possible that the delete marked version has become obsolete at the time the undo is started. */ -/*************************************************************** -Checks if also the previous version of the clustered index record was -modified or inserted by the same transaction, and its undo number is such -that it should be undone in the same rollback. */ -UNIV_INLINE -ibool -row_undo_mod_undo_also_prev_vers( -/*=============================*/ - /* out: TRUE if also previous modify or - insert of this row should be undone */ - undo_node_t* node, /* in: row undo node */ - dulint* undo_no)/* out: the undo number */ -{ - trx_undo_rec_t* undo_rec; - trx_t* trx; - - trx = node->trx; - - if (0 != ut_dulint_cmp(node->new_trx_id, trx->id)) { - - *undo_no = ut_dulint_zero; - return(FALSE); - } - - undo_rec = trx_undo_get_undo_rec_low(node->new_roll_ptr, node->heap); - - *undo_no = trx_undo_rec_get_undo_no(undo_rec); - - return(ut_dulint_cmp(trx->roll_limit, *undo_no) <= 0); -} - /*************************************************************** Undoes a modify in a clustered index record. */ static @@ -202,17 +171,9 @@ row_undo_mod_clust( btr_pcur_t* pcur; mtr_t mtr; ulint err; - ibool success; - ibool more_vers; - dulint new_undo_no; ut_ad(node && thr); - /* Check if also the previous version of the clustered index record - should be undone in this same rollback operation */ - - more_vers = row_undo_mod_undo_also_prev_vers(node, &new_undo_no); - pcur = &(node->pcur); mtr_start(&mtr); @@ -260,20 +221,6 @@ row_undo_mod_clust( trx_undo_rec_release(node->trx, node->undo_no); - if (more_vers && err == DB_SUCCESS) { - - /* Reserve the undo log record to the prior version after - committing &mtr: this is necessary to comply with the latching - order, as &mtr may contain the fsp latch which is lower in - the latch hierarchy than trx->undo_mutex. */ - - success = trx_undo_rec_reserve(node->trx, new_undo_no); - - if (success) { - node->state = UNDO_NODE_PREV_VERS; - } - } - return(err); } @@ -702,7 +649,6 @@ row_undo_mod_parse_undo_rec( trx_undo_update_rec_get_update(ptr, clust_index, type, trx_id, roll_ptr, info_bits, trx, node->heap, &(node->update)); - node->new_roll_ptr = roll_ptr; node->new_trx_id = trx_id; node->cmpl_info = cmpl_info; } diff --git a/storage/innobase/row/row0undo.c b/storage/innobase/row/row0undo.c index 7f31fd0060c..1cb6c722b6f 100644 --- a/storage/innobase/row/row0undo.c +++ b/storage/innobase/row/row0undo.c @@ -236,25 +236,6 @@ row_undo( node->roll_ptr = roll_ptr; node->undo_no = trx_undo_rec_get_undo_no(node->undo_rec); - if (trx_undo_roll_ptr_is_insert(roll_ptr)) { - - node->state = UNDO_NODE_INSERT; - } else { - node->state = UNDO_NODE_MODIFY; - } - - } else if (node->state == UNDO_NODE_PREV_VERS) { - - /* Undo should be done to the same clustered index record - again in this same rollback, restoring the previous version */ - - roll_ptr = node->new_roll_ptr; - - node->undo_rec = trx_undo_get_undo_rec_low(roll_ptr, - node->heap); - node->roll_ptr = roll_ptr; - node->undo_no = trx_undo_rec_get_undo_no(node->undo_rec); - if (trx_undo_roll_ptr_is_insert(roll_ptr)) { node->state = UNDO_NODE_INSERT; diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index f71ca0b009a..1e5b388643d 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,10 @@ +2012-09-28 The InnoDB Team + + * include/row0undo.h, row/row0umod.c, row/row0undo.c: + Fix Bug#13249921 ASSERT !BPAGE->FILE_PAGE_WAS_FREED, USUALLY + IN TRANSACTION ROLLBACK. This patch will ensure that the + undo logs will be applied in proper reverse order. + 2012-09-18 The InnoDB Team * btr/btr0cur.c, handler/ha_innodb.cc, ibuf/ibuf0ibuf.c, diff --git a/storage/innodb_plugin/include/row0undo.h b/storage/innodb_plugin/include/row0undo.h index 6eb4ca448b3..9420d022e3b 100644 --- a/storage/innodb_plugin/include/row0undo.h +++ b/storage/innodb_plugin/include/row0undo.h @@ -87,10 +87,6 @@ that index record. */ enum undo_exec { UNDO_NODE_FETCH_NEXT = 1, /*!< we should fetch the next undo log record */ - UNDO_NODE_PREV_VERS, /*!< the roll ptr to previous - version of a row is stored in - node, and undo should be done - based on it */ UNDO_NODE_INSERT, /*!< undo a fresh insert of a row to a table */ UNDO_NODE_MODIFY /*!< undo a modify operation @@ -108,9 +104,6 @@ struct undo_node_struct{ undo_no_t undo_no;/*!< undo number of the record */ ulint rec_type;/*!< undo log record type: TRX_UNDO_INSERT_REC, ... */ - roll_ptr_t new_roll_ptr; - /*!< roll ptr to restore to clustered index - record */ trx_id_t new_trx_id; /*!< trx id to restore to clustered index record */ btr_pcur_t pcur; /*!< persistent cursor used in searching the diff --git a/storage/innodb_plugin/row/row0umod.c b/storage/innodb_plugin/row/row0umod.c index 5202a498eed..31f7c9f4888 100644 --- a/storage/innodb_plugin/row/row0umod.c +++ b/storage/innodb_plugin/row/row0umod.c @@ -68,36 +68,6 @@ check. If you make a change in this module make sure that no codepath is introduced where a call to log_free_check() is bypassed. */ -/***********************************************************//** -Checks if also the previous version of the clustered index record was -modified or inserted by the same transaction, and its undo number is such -that it should be undone in the same rollback. -@return TRUE if also previous modify or insert of this row should be undone */ -static -ibool -row_undo_mod_undo_also_prev_vers( -/*=============================*/ - undo_node_t* node, /*!< in: row undo node */ - undo_no_t* undo_no)/*!< out: the undo number */ -{ - trx_undo_rec_t* undo_rec; - trx_t* trx; - - trx = node->trx; - - if (0 != ut_dulint_cmp(node->new_trx_id, trx->id)) { - - *undo_no = ut_dulint_zero; - return(FALSE); - } - - undo_rec = trx_undo_get_undo_rec_low(node->new_roll_ptr, node->heap); - - *undo_no = trx_undo_rec_get_undo_no(undo_rec); - - return(ut_dulint_cmp(trx->roll_limit, *undo_no) <= 0); -} - /***********************************************************//** Undoes a modify in a clustered index record. @return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */ @@ -226,19 +196,11 @@ row_undo_mod_clust( btr_pcur_t* pcur; mtr_t mtr; ulint err; - ibool success; - ibool more_vers; - undo_no_t new_undo_no; ut_ad(node && thr); log_free_check(); - /* Check if also the previous version of the clustered index record - should be undone in this same rollback operation */ - - more_vers = row_undo_mod_undo_also_prev_vers(node, &new_undo_no); - pcur = &(node->pcur); mtr_start(&mtr); @@ -286,20 +248,6 @@ row_undo_mod_clust( trx_undo_rec_release(node->trx, node->undo_no); - if (more_vers && err == DB_SUCCESS) { - - /* Reserve the undo log record to the prior version after - committing &mtr: this is necessary to comply with the latching - order, as &mtr may contain the fsp latch which is lower in - the latch hierarchy than trx->undo_mutex. */ - - success = trx_undo_rec_reserve(node->trx, new_undo_no); - - if (success) { - node->state = UNDO_NODE_PREV_VERS; - } - } - return(err); } @@ -799,7 +747,6 @@ row_undo_mod_parse_undo_rec( trx_undo_update_rec_get_update(ptr, clust_index, type, trx_id, roll_ptr, info_bits, trx, node->heap, &(node->update)); - node->new_roll_ptr = roll_ptr; node->new_trx_id = trx_id; node->cmpl_info = cmpl_info; } diff --git a/storage/innodb_plugin/row/row0undo.c b/storage/innodb_plugin/row/row0undo.c index fd28a4f6520..b1606bda5ef 100644 --- a/storage/innodb_plugin/row/row0undo.c +++ b/storage/innodb_plugin/row/row0undo.c @@ -277,25 +277,6 @@ row_undo( node->roll_ptr = roll_ptr; node->undo_no = trx_undo_rec_get_undo_no(node->undo_rec); - if (trx_undo_roll_ptr_is_insert(roll_ptr)) { - - node->state = UNDO_NODE_INSERT; - } else { - node->state = UNDO_NODE_MODIFY; - } - - } else if (node->state == UNDO_NODE_PREV_VERS) { - - /* Undo should be done to the same clustered index record - again in this same rollback, restoring the previous version */ - - roll_ptr = node->new_roll_ptr; - - node->undo_rec = trx_undo_get_undo_rec_low(roll_ptr, - node->heap); - node->roll_ptr = roll_ptr; - node->undo_no = trx_undo_rec_get_undo_no(node->undo_rec); - if (trx_undo_roll_ptr_is_insert(roll_ptr)) { node->state = UNDO_NODE_INSERT; From 540d0cd28eeb11abab578d189bbe748b930d8edc Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 1 Oct 2012 13:12:38 +0200 Subject: [PATCH 22/47] Bug#14683676 ENDLESS MEMORY CONSUMPTION IN SETUP_REF_ARRAY WITH MAX IN SUBQUERY n_child_sum_items kept increasing. Since it is used for calculating the size of ref_pointer_array, we will allocate larger and larger chunks of memory, until we hit some operating system limit. The memory is free()d at disconnect, but is most likely *not* returned to the operating system. --- sql/sql_lex.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index fd9367b99f2..e171cf1c06d 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1616,6 +1616,7 @@ void st_select_lex::init_query() ref_pointer_array= 0; select_n_where_fields= 0; select_n_having_items= 0; + n_child_sum_items= 0; subquery_in_having= explicit_limit= 0; is_item_list_lookup= 0; first_execution= 1; From b06620868ea840beffcfaf36e905bfecd27cfa85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 8 Oct 2012 16:01:50 +0300 Subject: [PATCH 23/47] Bug#14731482 UPDATE OR DELETE CORRUPTS A RECORD WITH A LONG PRIMARY KEY We did not allocate enough bits for index->trx_id_offset, causing an UPDATE or DELETE of a table with a PRIMARY KEY longer than 1024 bytes to corrupt the PRIMARY KEY. dict_index_t: Allocate enough bits. dict_index_build_internal_clust(): Check for overflow of index->trx_id_offset. Trip a debug assertion when overflow occurs. rb:1380 approved by Jimmy Yang --- storage/innobase/dict/dict0dict.c | 18 +++++++++++++++--- storage/innobase/include/dict0mem.h | 7 ++++++- storage/innodb_plugin/dict/dict0dict.c | 18 +++++++++++++++--- storage/innodb_plugin/include/dict0mem.h | 7 ++++++- 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index b2baa81b73f..7139eb5db95 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -1629,7 +1629,6 @@ dict_index_build_internal_clust( { dict_index_t* new_index; dict_field_t* field; - ulint fixed_size; ulint trx_id_pos; ulint i; ibool* indexed; @@ -1706,7 +1705,7 @@ dict_index_build_internal_clust( for (i = 0; i < trx_id_pos; i++) { - fixed_size = dict_col_get_fixed_size( + ulint fixed_size = dict_col_get_fixed_size( dict_index_get_nth_col(new_index, i)); if (fixed_size == 0) { @@ -1722,7 +1721,20 @@ dict_index_build_internal_clust( break; } - new_index->trx_id_offset += (unsigned int) fixed_size; + /* Add fixed_size to new_index->trx_id_offset. + Because the latter is a bit-field, an overflow + can theoretically occur. Check for it. */ + fixed_size += new_index->trx_id_offset; + + new_index->trx_id_offset = fixed_size; + + if (new_index->trx_id_offset != fixed_size) { + /* Overflow. Pretend that this is a + variable-length PRIMARY KEY. */ + ut_ad(0); + new_index->trx_id_offset = 0; + break; + } } } diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 83dbf65ea41..8a55fef7f73 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -196,10 +196,15 @@ struct dict_index_struct{ unsigned space:32; /* space where the index tree is placed */ unsigned page:32;/* index tree root page number */ - unsigned trx_id_offset:10;/* position of the the trx id column +#define MAX_KEY_LENGTH_BITS 12 + unsigned trx_id_offset:MAX_KEY_LENGTH_BITS; + /* position of the trx id column in a clustered index record, if the fields before it are known to be of a fixed size, 0 otherwise */ +#if (1<trx_id_offset += (unsigned int) fixed_size; + /* Add fixed_size to new_index->trx_id_offset. + Because the latter is a bit-field, an overflow + can theoretically occur. Check for it. */ + fixed_size += new_index->trx_id_offset; + + new_index->trx_id_offset = fixed_size; + + if (new_index->trx_id_offset != fixed_size) { + /* Overflow. Pretend that this is a + variable-length PRIMARY KEY. */ + ut_ad(0); + new_index->trx_id_offset = 0; + break; + } } } diff --git a/storage/innodb_plugin/include/dict0mem.h b/storage/innodb_plugin/include/dict0mem.h index 1b26aea38c9..8a7984a4375 100644 --- a/storage/innodb_plugin/include/dict0mem.h +++ b/storage/innodb_plugin/include/dict0mem.h @@ -286,10 +286,15 @@ struct dict_index_struct{ #endif /* !UNIV_HOTBACKUP */ unsigned type:4; /*!< index type (DICT_CLUSTERED, DICT_UNIQUE, DICT_UNIVERSAL, DICT_IBUF) */ - unsigned trx_id_offset:10;/*!< position of the trx id column +#define MAX_KEY_LENGTH_BITS 12 + unsigned trx_id_offset:MAX_KEY_LENGTH_BITS; + /*!< position of the trx id column in a clustered index record, if the fields before it are known to be of a fixed size, 0 otherwise */ +#if (1< Date: Tue, 9 Oct 2012 16:02:58 +0300 Subject: [PATCH 24/47] Fix Bug#14708715 CREATE TABLE MEMORY LEAK ON DB_OUT_OF_FILE_SPACE The problem is in the error handling in row_create_table_for_mysql(). In the 'disk full' case we may forget to call dict_mem_table_free() on the table object. Approved by: Marko (rb:1377 and rb:1386) --- storage/innodb_plugin/os/os0file.c | 16 ++++++++++++++++ storage/innodb_plugin/row/row0mysql.c | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/storage/innodb_plugin/os/os0file.c b/storage/innodb_plugin/os/os0file.c index ff80f7ed1b4..7f8c7c637a1 100644 --- a/storage/innodb_plugin/os/os0file.c +++ b/storage/innodb_plugin/os/os0file.c @@ -1249,6 +1249,22 @@ os_file_create( ulint type, /*!< in: OS_DATA_FILE or OS_LOG_FILE */ ibool* success)/*!< out: TRUE if succeed, FALSE if error */ { +#ifdef __WIN__ + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + SetLastError(ERROR_DISK_FULL); + return((os_file_t) -1); + ); +#else /* __WIN__ */ + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); +#endif /* __WIN__ */ + #ifdef __WIN__ os_file_t file; DWORD share_mode = FILE_SHARE_READ; diff --git a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c index 974d67893a3..137a164c4cd 100644 --- a/storage/innodb_plugin/row/row0mysql.c +++ b/storage/innodb_plugin/row/row0mysql.c @@ -1768,7 +1768,8 @@ Creates a table for MySQL. If the name of the table ends in one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", "innodb_table_monitor", then this will also start the printing of monitor output by the master thread. If the table name ends in "innodb_mem_validate", -InnoDB will try to invoke mem_validate(). +InnoDB will try to invoke mem_validate(). On failure the transaction will +be rolled back and the 'table' object will be freed. @return error code or DB_SUCCESS */ UNIV_INTERN int @@ -1907,6 +1908,8 @@ err_exit: row_drop_table_for_mysql(table->name, trx, FALSE); trx_commit_for_mysql(trx); + } else { + dict_mem_table_free(table); } break; From 8baabf30900c30d733ce3b8942512d8cce191582 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 9 Oct 2012 16:08:06 +0300 Subject: [PATCH 25/47] Update the ChangeLog with the fix of Bug#14708715 --- storage/innodb_plugin/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 1e5b388643d..cc4962bd125 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,8 @@ +2012-10-09 The InnoDB Team + + * row/row0mysql.c: + Fix Bug#14708715 CREATE TABLE MEMORY LEAK ON DB_OUT_OF_FILE_SPACE + 2012-09-28 The InnoDB Team * include/row0undo.h, row/row0umod.c, row/row0undo.c: From 4cefe863aee8430a09e74a52feef0eb9ea4fae9b Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 9 Oct 2012 16:29:00 +0300 Subject: [PATCH 26/47] Port the test for Bug#14708715 from 5.1/innodb_plugin into 5.1/innodb although the bug does not exist in 5.1/innodb. --- storage/innobase/os/os0file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 566c50381e7..9f68f93fd99 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -1209,6 +1209,22 @@ os_file_create( ulint type, /* in: OS_DATA_FILE or OS_LOG_FILE */ ibool* success)/* out: TRUE if succeed, FALSE if error */ { +#ifdef __WIN__ + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + SetLastError(ERROR_DISK_FULL); + return((os_file_t) -1); + ); +#else /* __WIN__ */ + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); +#endif /* __WIN__ */ + #ifdef __WIN__ os_file_t file; DWORD share_mode = FILE_SHARE_READ; From 1d16fc16dc50d21e2456d6367cea20f83404ffc6 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 10 Oct 2012 22:22:10 +0300 Subject: [PATCH 27/47] Fix compilation error in debug mode: os/os0file.c:1332: error: ISO C90 forbids mixed declarations and code --- storage/innobase/os/os0file.c | 27 +++++++++++++-------------- storage/innodb_plugin/os/os0file.c | 27 +++++++++++++-------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 9f68f93fd99..d088ff54ebc 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -1210,27 +1210,19 @@ os_file_create( ibool* success)/* out: TRUE if succeed, FALSE if error */ { #ifdef __WIN__ + os_file_t file; + DWORD share_mode = FILE_SHARE_READ; + DWORD create_flag; + DWORD attributes; + ibool retry; + DBUG_EXECUTE_IF( "ib_create_table_fail_disk_full", *success = FALSE; SetLastError(ERROR_DISK_FULL); return((os_file_t) -1); ); -#else /* __WIN__ */ - DBUG_EXECUTE_IF( - "ib_create_table_fail_disk_full", - *success = FALSE; - errno = ENOSPC; - return((os_file_t) -1); - ); -#endif /* __WIN__ */ -#ifdef __WIN__ - os_file_t file; - DWORD share_mode = FILE_SHARE_READ; - DWORD create_flag; - DWORD attributes; - ibool retry; try_again: ut_a(name); @@ -1334,6 +1326,13 @@ try_again: ibool retry; const char* mode_str = NULL; + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); + try_again: ut_a(name); diff --git a/storage/innodb_plugin/os/os0file.c b/storage/innodb_plugin/os/os0file.c index 7f8c7c637a1..57a140ea698 100644 --- a/storage/innodb_plugin/os/os0file.c +++ b/storage/innodb_plugin/os/os0file.c @@ -1250,27 +1250,19 @@ os_file_create( ibool* success)/*!< out: TRUE if succeed, FALSE if error */ { #ifdef __WIN__ + os_file_t file; + DWORD share_mode = FILE_SHARE_READ; + DWORD create_flag; + DWORD attributes; + ibool retry; + DBUG_EXECUTE_IF( "ib_create_table_fail_disk_full", *success = FALSE; SetLastError(ERROR_DISK_FULL); return((os_file_t) -1); ); -#else /* __WIN__ */ - DBUG_EXECUTE_IF( - "ib_create_table_fail_disk_full", - *success = FALSE; - errno = ENOSPC; - return((os_file_t) -1); - ); -#endif /* __WIN__ */ -#ifdef __WIN__ - os_file_t file; - DWORD share_mode = FILE_SHARE_READ; - DWORD create_flag; - DWORD attributes; - ibool retry; try_again: ut_a(name); @@ -1386,6 +1378,13 @@ try_again: ibool retry; const char* mode_str = NULL; + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); + try_again: ut_a(name); From f1d3b0f19011217c13927f44a82e8e17291fbba7 Mon Sep 17 00:00:00 2001 From: Nuno Carvalho Date: Fri, 12 Oct 2012 08:32:10 +0100 Subject: [PATCH 28/47] BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS This bug had two problems: P1) Reads out of bounds; P2) Writes out of bounds. PROBLEM P1 ---------- User_var_log_event unmarshalling from binlog was not performing range checks when using name_len and val_len variables to walk on event buffer. Added range checks to User_var_log_event unmarshalling to prevent unmarshalling errors. PROBLEM P2 ---------- User_var_log_event value was allocated on thread stack, what caused stack frame errors when User_var_log_event value was bigger than thread stack size. Currently value is allocated on heap memory. --- sql/log_event.cc | 45 ++++++++++++++++++++++++++++++++++++++++----- sql/log_event.h | 4 ++-- sql/mysql_priv.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 7 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index c3ba969cf1f..0ad258f7073 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1286,7 +1286,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len, ev = new Rand_log_event(buf, description_event); break; case USER_VAR_EVENT: - ev = new User_var_log_event(buf, description_event); + ev = new User_var_log_event(buf, event_len, description_event); break; case FORMAT_DESCRIPTION_EVENT: ev = new Format_description_log_event(buf, event_len, description_event); @@ -5685,18 +5685,34 @@ void User_var_log_event::pack_info(Protocol* protocol) User_var_log_event:: -User_var_log_event(const char* buf, +User_var_log_event(const char* buf, uint event_len, const Format_description_log_event* description_event) :Log_event(buf, description_event) #ifndef MYSQL_CLIENT , deferred(false) #endif { + bool error= false; + const char* buf_start= buf; /* The Post-Header is empty. The Variable Data part begins immediately. */ buf+= description_event->common_header_len + description_event->post_header_len[USER_VAR_EVENT-1]; name_len= uint4korr(buf); name= (char *) buf + UV_NAME_LEN_SIZE; + + /* + We don't know yet is_null value, so we must assume that name_len + may have the bigger value possible, is_null= True and there is no + payload for val. + */ + if (0 == name_len || + !valid_buffer_range(name_len, buf_start, name, + event_len - UV_VAL_IS_NULL)) + { + error= true; + goto err; + } + buf+= UV_NAME_LEN_SIZE + name_len; is_null= (bool) *buf; if (is_null) @@ -5708,13 +5724,31 @@ User_var_log_event(const char* buf, } else { + if (!valid_buffer_range(UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + + UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE, + buf_start, buf, event_len)) + { + error= true; + goto err; + } + type= (Item_result) buf[UV_VAL_IS_NULL]; charset_number= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE); val_len= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + UV_CHARSET_NUMBER_SIZE); val= (char *) (buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE); + + if (!valid_buffer_range(val_len, buf_start, val, event_len)) + { + error= true; + goto err; + } } + +err: + if (error) + name= 0; } @@ -5860,8 +5894,9 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) char *hex_str; CHARSET_INFO *cs; - if (!(hex_str= (char *)my_alloca(2*val_len+1+2))) // 2 hex digits / byte - break; // no error, as we are 'void' + hex_str= (char *)my_malloc(2*val_len+1+2,MYF(MY_WME)); // 2 hex digits / byte + if (!hex_str) + return; str_to_hex(hex_str, val, val_len); /* For proper behaviour when mysqlbinlog|mysql, we need to explicitely @@ -5879,7 +5914,7 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) my_b_printf(&cache, ":=_%s %s COLLATE `%s`%s\n", cs->csname, hex_str, cs->name, print_event_info->delimiter); - my_afree(hex_str); + my_free(hex_str, MYF(MY_WME)); } break; case ROW_RESULT: diff --git a/sql/log_event.h b/sql/log_event.h index ba6b9b876aa..c36564fcde8 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2496,7 +2496,7 @@ public: void print(FILE* file, PRINT_EVENT_INFO* print_event_info); #endif - User_var_log_event(const char* buf, + User_var_log_event(const char* buf, uint event_len, const Format_description_log_event *description_event); ~User_var_log_event() {} Log_event_type get_type_code() { return USER_VAR_EVENT;} @@ -2510,7 +2510,7 @@ public: bool is_deferred() { return deferred; } void set_deferred() { deferred= true; } #endif - bool is_valid() const { return 1; } + bool is_valid() const { return name != 0; } private: #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 937617032dd..05a37228e17 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -501,6 +501,50 @@ protected: */ #define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1) +/* + Check how many bytes are available on buffer. + + @param buf_start Pointer to buffer start. + @param buf_current Pointer to the current position on buffer. + @param buf_len Buffer length. + + @return Number of bytes available on event buffer. +*/ +template T available_buffer(const char* buf_start, + const char* buf_current, + T buf_len) +{ + return buf_len - (buf_current - buf_start); +} +/* Explicit instantion to unsigned int. */ +template unsigned int available_buffer(const char*, + const char*, + unsigned int); + +/* + Check if jump value is within buffer limits. + + @param jump Number of positions we want to advance. + @param buf_start Pointer to buffer start + @param buf_current Pointer to the current position on buffer. + @param buf_len Buffer length. + + @return True If jump value is within buffer limits. + False Otherwise. +*/ +template bool valid_buffer_range(T jump, + const char* buf_start, + const char* buf_current, + T buf_len) +{ + return (jump <= available_buffer(buf_start, buf_current, buf_len)); +} +/* Explicit instantion to unsigned int. */ +template bool valid_buffer_range(unsigned int, + const char*, + const char*, + unsigned int); + /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT From fc1fbe159afa043d647711c83778d6911e5dfe39 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 12 Oct 2012 19:38:45 +0200 Subject: [PATCH 29/47] Bug#14629232 SECURITY VULNERABILITY WITH SHOW PROFILE This fix resolves a security vulnerability of SHOW PROFILE. See the bug report for details. --- sql/sql_profile.cc | 29 +++++++++++++++++++---------- sql/sql_profile.h | 6 ++++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index 49666dde476..f3a95e6479b 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -39,6 +39,7 @@ #define TIME_I_S_DECIMAL_SIZE (TIME_FLOAT_DIGITS*100)+(TIME_FLOAT_DIGITS-3) #define MAX_QUERY_LENGTH 300 +#define MAX_QUERY_HISTORY 101 /* Reserved for systems that can't record the function name in source. */ const char * const _unknown_func_ = ""; @@ -233,9 +234,12 @@ void PROF_MEASUREMENT::collect() QUERY_PROFILE::QUERY_PROFILE(PROFILING *profiling_arg, const char *status_arg) :profiling(profiling_arg), profiling_query_id(0), query_source(NULL) { - profile_start= new PROF_MEASUREMENT(this, status_arg); - entries.push_back(profile_start); - profile_end= profile_start; + m_seq_counter= 1; + PROF_MEASUREMENT *prof= new PROF_MEASUREMENT(this, status_arg); + prof->m_seq= m_seq_counter++; + m_start_time_usecs= prof->time_usecs; + m_end_time_usecs= m_start_time_usecs; + entries.push_back(prof); } QUERY_PROFILE::~QUERY_PROFILE() @@ -275,9 +279,14 @@ void QUERY_PROFILE::new_status(const char *status_arg, else prof= new PROF_MEASUREMENT(this, status_arg); - profile_end= prof; + prof->m_seq= m_seq_counter++; + m_end_time_usecs= prof->time_usecs; entries.push_back(prof); + /* Maintain the query history size. */ + while (entries.elements > MAX_QUERY_HISTORY) + delete entries.pop(); + DBUG_VOID_RETURN; } @@ -437,8 +446,7 @@ bool PROFILING::show_profiles() String elapsed; - PROF_MEASUREMENT *ps= prof->profile_start; - PROF_MEASUREMENT *pe= prof->profile_end; + double query_time_usecs= prof->m_end_time_usecs - prof->m_start_time_usecs; if (++idx <= unit->offset_limit_cnt) continue; @@ -447,7 +455,7 @@ bool PROFILING::show_profiles() protocol->prepare_for_resend(); protocol->store((uint32)(prof->profiling_query_id)); - protocol->store((double)(pe->time_usecs - ps->time_usecs)/(1000.0*1000), + protocol->store((double)(query_time_usecs/(1000.0*1000)), (uint32) TIME_FLOAT_DIGITS-1, &elapsed); if (prof->query_source != NULL) protocol->store(prof->query_source, strlen(prof->query_source), @@ -507,17 +515,18 @@ int PROFILING::fill_statistics_info(THD *thd_arg, TABLE_LIST *tables, Item *cond us also include a numbering of each state per query. The query_id and the "seq" together are unique. */ - ulonglong seq; + ulong seq; void *entry_iterator; PROF_MEASUREMENT *entry, *previous= NULL; /* ...and for each query, go through all its state-change steps. */ - for (seq= 0, entry_iterator= query->entries.new_iterator(); + for (entry_iterator= query->entries.new_iterator(); entry_iterator != NULL; entry_iterator= query->entries.iterator_next(entry_iterator), - seq++, previous=entry, row_number++) + previous=entry, row_number++) { entry= query->entries.iterator_value(entry_iterator); + seq= entry->m_seq; /* Skip the first. We count spans of fence, not fence-posts. */ if (previous == NULL) continue; diff --git a/sql/sql_profile.h b/sql/sql_profile.h index b21216f290f..c59b342e502 100644 --- a/sql/sql_profile.h +++ b/sql/sql_profile.h @@ -182,6 +182,7 @@ private: char *file; unsigned int line; + ulong m_seq; double time_usecs; char *allocated_status_memory; @@ -213,8 +214,9 @@ private: query_id_t profiling_query_id; /* Session-specific id. */ char *query_source; - PROF_MEASUREMENT *profile_start; - PROF_MEASUREMENT *profile_end; + double m_start_time_usecs; + double m_end_time_usecs; + ulong m_seq_counter; Queue entries; From 9bfc910f2f5d8282a4c69104cc2574da780902d6 Mon Sep 17 00:00:00 2001 From: "Krunal Bauskar krunal.bauskar@oracle.com" Date: Mon, 15 Oct 2012 09:24:33 +0530 Subject: [PATCH 30/47] bug#14704286 SECONDARY INDEX UPDATES MAKE CONSISTENT READS DO O(N^2) UNDO PAGE LOOKUPS (honoring kill query while accessing sec_index) If secondary index is being used for select query evaluation and this query is operating with consistent read snapshot it might take good time for secondary index to return back control to mysql as MVCC would kick in. If user issues "kill query " while query is actively accessing secondary index it will not be honored as there is no hook to check for this condition. Added hook for this check. ----- Parallely secondary index taking too long to evaluate for consistent read snapshot case is being examined for performance improvement. WL#6540. --- .../suite/innodb/r/innodb_bug14704286.result | 43 +++++++++ .../suite/innodb/t/innodb_bug14704286.test | 89 +++++++++++++++++++ storage/innobase/row/row0sel.c | 6 +- storage/innodb_plugin/row/row0sel.c | 5 ++ 4 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/innodb/r/innodb_bug14704286.result create mode 100644 mysql-test/suite/innodb/t/innodb_bug14704286.test diff --git a/mysql-test/suite/innodb/r/innodb_bug14704286.result b/mysql-test/suite/innodb/r/innodb_bug14704286.result new file mode 100644 index 00000000000..9703955cfa7 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_bug14704286.result @@ -0,0 +1,43 @@ +use test; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (id int primary key, value int, value2 int, +value3 int, index(value,value2)) engine=innodb; +insert into t1 values +(10,10,10,10),(11,11,11,11),(12,12,12,12),(13,13,13,13),(14,14,14,14), +(15,15,15,15),(16,16,16,16),(17,17,17,17),(18,18,18,18),(19,19,19,19), +(20,20,20,20); +use test; +start transaction with consistent snapshot; +use test; +CREATE PROCEDURE update_t1() +BEGIN +DECLARE i INT DEFAULT 1; +while (i <= 5000) DO +update test.t1 set value2=value2+1, value3=value3+1 where id=12; +SET i = i + 1; +END WHILE; +END| +CALL update_t1(); +select * from t1; +id value value2 value3 +10 10 10 10 +11 11 11 11 +12 12 5012 5012 +13 13 13 13 +14 14 14 14 +15 15 15 15 +16 16 16 16 +17 17 17 17 +18 18 18 18 +19 19 19 19 +20 20 20 20 +select * from t1 force index(value) where value=12; +kill query @id; +ERROR 70100: Query execution was interrupted +select * from t1 where value = 12; +id value value2 value3 +12 12 12 12 +drop procedure if exists update_t1; +drop table if exists t1; diff --git a/mysql-test/suite/innodb/t/innodb_bug14704286.test b/mysql-test/suite/innodb/t/innodb_bug14704286.test new file mode 100644 index 00000000000..bdc2ab94b01 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug14704286.test @@ -0,0 +1,89 @@ +--source include/have_innodb.inc + +# +# create test-bed to run test +# +use test; + +drop table if exists t1; +create table t1 (id int primary key, value int, value2 int, +value3 int, index(value,value2)) engine=innodb; + +insert into t1 values +(10,10,10,10),(11,11,11,11),(12,12,12,12),(13,13,13,13),(14,14,14,14), +(15,15,15,15),(16,16,16,16),(17,17,17,17),(18,18,18,18),(19,19,19,19), +(20,20,20,20); +let $ID= `SELECT @id := CONNECTION_ID()`; + +# +# we need multiple connections as we need to keep one connection +# active with trx requesting consistent read. +# +connect (conn1, localhost, root,,); +connect (conn2, localhost, root,,); +connect (conn3, localhost, root,,); + +# +# start trx with consistent read +# +connection conn1; +use test; + +start transaction with consistent snapshot; + +# +# update table such that secondary index is updated. +# +connection conn2; +use test; +delimiter |; +CREATE PROCEDURE update_t1() +BEGIN + DECLARE i INT DEFAULT 1; + while (i <= 5000) DO + update test.t1 set value2=value2+1, value3=value3+1 where id=12; + SET i = i + 1; + END WHILE; +END| + +delimiter ;| + +CALL update_t1(); +select * from t1; + +# +# Now try to fire select query from connection-1 enforcing +# use of secondary index. +# +connection conn1; +let $ID= `SELECT @id := CONNECTION_ID()`; +#--error ER_QUERY_INTERRUPTED +--send +select * from t1 force index(value) where value=12; + +# +# select is going to take good time so let's kill query. +# +connection conn3; +let $ignore= `SELECT @id := $ID`; +kill query @id; + +# +# reap the value of connection-1 +# +connection conn1; +--error ER_QUERY_INTERRUPTED +reap; +select * from t1 where value = 12; + +# +# clean test-bed. +# +connection default; +disconnect conn1; +disconnect conn2; +disconnect conn3; +drop procedure if exists update_t1; +drop table if exists t1; + + diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index 915cc8339d4..c600fa62151 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -3758,9 +3758,13 @@ wait_table_again: } rec_loop: + if (trx_is_interrupted(trx)) { + err = DB_INTERRUPTED; + goto normal_return; + } + /*-------------------------------------------------------------*/ /* PHASE 4: Look for matching records in a loop */ - rec = btr_pcur_get_rec(pcur); ut_ad(!!page_rec_is_comp(rec) == comp); #ifdef UNIV_SEARCH_DEBUG diff --git a/storage/innodb_plugin/row/row0sel.c b/storage/innodb_plugin/row/row0sel.c index 54172e71a47..c70a477db1d 100644 --- a/storage/innodb_plugin/row/row0sel.c +++ b/storage/innodb_plugin/row/row0sel.c @@ -3908,6 +3908,11 @@ wait_table_again: } rec_loop: + if (trx_is_interrupted(trx)) { + err = DB_INTERRUPTED; + goto normal_return; + } + /*-------------------------------------------------------------*/ /* PHASE 4: Look for matching records in a loop */ From aec624762b0719c43a5149c228f36daa405b82cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 16 Oct 2012 14:24:15 +0300 Subject: [PATCH 31/47] Bug#14729221 IN-PLACE ALTER TABLE REPORTS '' INSTEAD OF REAL DUPLICATE VALUE FOR PREFIX KEYS innobase_rec_to_mysql(): Invoke dict_index_get_nth_col_or_prefix_pos() instead of dict_index_get_nth_col_pos() to find the column. --- storage/innodb_plugin/ChangeLog | 6 ++++ storage/innodb_plugin/dict/dict0dict.c | 29 +++++++++++++++---- .../innodb_plugin/handler/handler0alter.cc | 2 +- storage/innodb_plugin/include/dict0dict.h | 12 ++++++++ 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index cc4962bd125..35795e10dd4 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2012-10-16 The InnoDB Team + + * dict/dict0dict.c, handler/handler0alter.cc, include/dict0dict.h: + Fix Bug#14729221 IN-PLACE ALTER TABLE REPORTS '' INSTEAD OF REAL + DUPLICATE VALUE FOR PREFIX KEYS + 2012-10-09 The InnoDB Team * row/row0mysql.c: diff --git a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c index fdc93382190..56c71cefa05 100644 --- a/storage/innodb_plugin/dict/dict0dict.c +++ b/storage/innodb_plugin/dict/dict0dict.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -473,10 +473,12 @@ Looks for column n in an index. ULINT_UNDEFINED if not contained */ UNIV_INTERN ulint -dict_index_get_nth_col_pos( -/*=======================*/ - const dict_index_t* index, /*!< in: index */ - ulint n) /*!< in: column number */ +dict_index_get_nth_col_or_prefix_pos( +/*=================================*/ + const dict_index_t* index, /*!< in: index */ + ulint n, /*!< in: column number */ + ibool inc_prefix) /*!< in: TRUE=consider + column prefixes too */ { const dict_field_t* field; const dict_col_t* col; @@ -498,7 +500,8 @@ dict_index_get_nth_col_pos( for (pos = 0; pos < n_fields; pos++) { field = dict_index_get_nth_field(index, pos); - if (col == field->col && field->prefix_len == 0) { + if (col == field->col + && (inc_prefix || field->prefix_len == 0)) { return(pos); } @@ -507,6 +510,20 @@ dict_index_get_nth_col_pos( return(ULINT_UNDEFINED); } +/********************************************************************//** +Looks for column n in an index. +@return position in internal representation of the index; +ULINT_UNDEFINED if not contained */ +UNIV_INTERN +ulint +dict_index_get_nth_col_pos( +/*=======================*/ + const dict_index_t* index, /*!< in: index */ + ulint n) /*!< in: column number */ +{ + return(dict_index_get_nth_col_or_prefix_pos(index, n, FALSE)); +} + #ifndef UNIV_HOTBACKUP /********************************************************************//** Returns TRUE if the index contains a column or a prefix of that column. diff --git a/storage/innodb_plugin/handler/handler0alter.cc b/storage/innodb_plugin/handler/handler0alter.cc index 6f02b500d96..7095077b788 100644 --- a/storage/innodb_plugin/handler/handler0alter.cc +++ b/storage/innodb_plugin/handler/handler0alter.cc @@ -147,7 +147,7 @@ innobase_rec_to_mysql( field->reset(); - ipos = dict_index_get_nth_col_pos(index, i); + ipos = dict_index_get_nth_col_or_prefix_pos(index, i, TRUE); if (UNIV_UNLIKELY(ipos == ULINT_UNDEFINED)) { null_field: diff --git a/storage/innodb_plugin/include/dict0dict.h b/storage/innodb_plugin/include/dict0dict.h index e728c78b9c0..7ce968fb45c 100644 --- a/storage/innodb_plugin/include/dict0dict.h +++ b/storage/innodb_plugin/include/dict0dict.h @@ -839,6 +839,18 @@ dict_index_get_nth_col_pos( const dict_index_t* index, /*!< in: index */ ulint n); /*!< in: column number */ /********************************************************************//** +Looks for column n in an index. +@return position in internal representation of the index; +ULINT_UNDEFINED if not contained */ +UNIV_INTERN +ulint +dict_index_get_nth_col_or_prefix_pos( +/*=================================*/ + const dict_index_t* index, /*!< in: index */ + ulint n, /*!< in: column number */ + ibool inc_prefix); /*!< in: TRUE=consider + column prefixes too */ +/********************************************************************//** Returns TRUE if the index contains a column or a prefix of that column. @return TRUE if contains the column or its prefix */ UNIV_INTERN From bdb4104cf6b658b0b614f2b5b3c690535fde3726 Mon Sep 17 00:00:00 2001 From: Neeraj Bisht Date: Tue, 16 Oct 2012 23:18:48 +0530 Subject: [PATCH 32/47] Bug#11745891 - LAST_INSERT(ID) DOES NOT SUPPORT BIGINT UNSIGNED Problem:- using last_insert_id() on an auto_incremented bigint unsigned does not work for values which are greater than max-bigint-signed. Analysis:- last_insert_id() returns the first auto_incremented value for a column and an auto_incremented value can have only positive values. In our code, when we are initializing a last_insert_id object, we are taking it as a signed BIGINT, So when the auto_incremented value reaches greater than max signed bigint, last_insert_id gives negative result. Solution: When we are fetching the value from last_insert_id, We are setting the unsigned_flag, so that it take only unsigned BIGINT value. sql/item_func.cc: here unsigned value is converted to signed value. sql/item_func.h: last_insert_id() gives an auto_incremented value which can be positive only,so defined it as a unsigned longlong sets the unsigned_flag to 1. --- sql/item_func.cc | 3 ++- sql/item_func.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index feb87fe5fd7..21efaf83aa8 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3596,7 +3596,8 @@ longlong Item_func_last_insert_id::val_int() thd->first_successful_insert_id_in_prev_stmt= value; return value; } - return thd->read_first_successful_insert_id_in_prev_stmt(); + return + static_cast(thd->read_first_successful_insert_id_in_prev_stmt()); } diff --git a/sql/item_func.h b/sql/item_func.h index de1338b4081..ec410ed3d3d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1043,6 +1043,7 @@ public: const char *func_name() const { return "last_insert_id"; } void fix_length_and_dec() { + unsigned_flag= TRUE; if (arg_count) max_length= args[0]->max_length; } From b86aea6ce51422af6987c30a8c03f748f5898a5c Mon Sep 17 00:00:00 2001 From: Tatjana Azundris Nuernberg Date: Wed, 17 Oct 2012 07:22:06 +0100 Subject: [PATCH 33/47] Bug#11764559: UMASK IS IGNORED BY ERROR LOG mysqld_safe script did not heed MySQL specific environment variable $UMASK, leading to divergent behavior between mysqld and mysqld_safe. Patch adds an approximation of mysqld's behavior to mysqld_safe, within the bounds dictated by attempt to have mysqld_safe run on even the most basic of shells (proper '70s sh, not just bash with a fancy symlink). Patch also adds approximation of said behavior to mysqld_multi (in perl). --- scripts/mysqld_multi.sh | 22 ++++++++++++++++++++++ scripts/mysqld_safe.sh | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 8a4d0d44203..5bf59ae27be 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -47,6 +47,28 @@ $homedir = $ENV{HOME}; $my_progname = $0; $my_progname =~ s/.*[\/]//; + +if (defined($ENV{UMASK})) { + my $UMASK = $ENV{UMASK}; + my $m; + my $fmode = "0640"; + + if(($UMASK =~ m/[^0246]/) || ($UMASK =~ m/^[^0]/) || (length($UMASK) != 4)) { + printf("UMASK must be a 3-digit mode with an additional leading 0 to indicate octal.\n"); + printf("The first digit will be corrected to 6, the others may be 0, 2, 4, or 6.\n"); } + else { + $fmode= substr $UMASK, 2, 2; + $fmode= "06${fmode}"; } + + if($fmode != $UMASK) { + printf("UMASK corrected from $UMASK to $fmode ...\n"); } + + $fmode= oct($fmode); + + umask($fmode); +} + + main(); #### diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index e4e5f1a1510..75589a2d004 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -27,7 +27,28 @@ syslog_tag_mysqld_safe=mysqld_safe trap '' 1 2 3 15 # we shouldn't let anyone kill us -umask 007 +# MySQL-specific environment variable. First off, it's not really a umask, +# it's the desired mode. Second, it follows umask(2), not umask(3) in that +# octal needs to be explicit. Our shell might be a proper sh without printf, +# multiple-base arithmetic, and binary arithmetic, so this will get ugly. +# We reject decimal values to keep things at least half-sane. +umask 007 # fallback +UMASK="${UMASK-0640}" +fmode=`echo "$UMASK" | sed -e 's/[^0246]//g'` +octalp=`echo "$fmode"|cut -c1` +fmlen=`echo "$fmode"|wc -c|sed -e 's/ //g'` +if [ "x$octalp" != "x0" -o "x$UMASK" != "x$fmode" -o "x$fmlen" != "x5" ] +then + fmode=0640 + echo "UMASK must be a 3-digit mode with an additional leading 0 to indicate octal." >&2 + echo "The first digit will be corrected to 6, the others may be 0, 2, 4, or 6." >&2 +fi +fmode=`echo "$fmode"|cut -c3-4` +fmode="6$fmode" +if [ "x$UMASK" != "x0$fmode" ] +then + echo "UMASK corrected from $UMASK to 0$fmode ..." +fi defaults= case "$1" in @@ -371,6 +392,12 @@ then # Log to err_log file log_notice "Logging to '$err_log'." logging=file + + if [ ! -e "$err_log" ]; then # if error log already exists, + touch "$err_log" # we just append. otherwise, + chmod "$fmode" "$err_log" # fix the permissions here! + fi + else if [ -n "$syslog_tag" ] then @@ -572,6 +599,12 @@ do eval_log_error "$cmd" + if [ $want_syslog -eq 0 -a ! -e "$err_log" ]; then + touch "$err_log" # hypothetical: log was renamed but not + chown $user "$err_log" # flushed yet. we'd recreate it with + chmod "$fmode" "$err_log" # wrong owner next time we log, so set + fi # it up correctly while we can! + if test ! -f "$pid_file" # This is removed if normal shutdown then break From 39e6eafc208476b15e134aa3c31dd11af512a146 Mon Sep 17 00:00:00 2001 From: Yasufumi Kinoshita Date: Wed, 17 Oct 2012 15:28:31 +0900 Subject: [PATCH 34/47] Bug #13702112 : WAIT_FOR_READ IS STUCK IN THE 90S rb://1334 approved by: Inaam Rana --- storage/innodb_plugin/buf/buf0buf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c index 3ec9ba246d2..b49f5288681 100644 --- a/storage/innodb_plugin/buf/buf0buf.c +++ b/storage/innodb_plugin/buf/buf0buf.c @@ -241,7 +241,7 @@ the read requests for the whole area. #ifndef UNIV_HOTBACKUP /** Value in microseconds */ -static const int WAIT_FOR_READ = 5000; +static const int WAIT_FOR_READ = 100; /** Number of attemtps made to read in a page in the buffer pool */ static const ulint BUF_PAGE_READ_MAX_RETRIES = 100; @@ -1897,8 +1897,9 @@ wait_until_unfixed: mutex_exit(&block->mutex); if (io_fix == BUF_IO_READ) { - - os_thread_sleep(WAIT_FOR_READ); + /* wait by temporaly s-latch */ + rw_lock_s_lock(&(block->lock)); + rw_lock_s_unlock(&(block->lock)); } else { break; } From 779960205f85a88b11126e6aedd750440fb486c3 Mon Sep 17 00:00:00 2001 From: "Krunal Bauskar krunal.bauskar@oracle.com" Date: Wed, 17 Oct 2012 14:30:32 +0530 Subject: [PATCH 35/47] bug#14765606: ensure select is active before killing it else kill signal is ignored --- .../suite/innodb/r/innodb_bug14704286.result | 20 ++++++++++++++----- .../suite/innodb/t/innodb_bug14704286.test | 12 ++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_bug14704286.result b/mysql-test/suite/innodb/r/innodb_bug14704286.result index 9703955cfa7..9de42cb01c8 100644 --- a/mysql-test/suite/innodb/r/innodb_bug14704286.result +++ b/mysql-test/suite/innodb/r/innodb_bug14704286.result @@ -1,7 +1,5 @@ use test; drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' create table t1 (id int primary key, value int, value2 int, value3 int, index(value,value2)) engine=innodb; insert into t1 values @@ -19,6 +17,7 @@ update test.t1 set value2=value2+1, value3=value3+1 where id=12; SET i = i + 1; END WHILE; END| +set autocommit=0; CALL update_t1(); select * from t1; id value value2 value3 @@ -33,11 +32,22 @@ id value value2 value3 18 18 18 18 19 19 19 19 20 20 20 20 +set autocommit=1; +select * from t1; +id value value2 value3 +10 10 10 10 +11 11 11 11 +12 12 5012 5012 +13 13 13 13 +14 14 14 14 +15 15 15 15 +16 16 16 16 +17 17 17 17 +18 18 18 18 +19 19 19 19 +20 20 20 20 select * from t1 force index(value) where value=12; kill query @id; ERROR 70100: Query execution was interrupted -select * from t1 where value = 12; -id value value2 value3 -12 12 12 12 drop procedure if exists update_t1; drop table if exists t1; diff --git a/mysql-test/suite/innodb/t/innodb_bug14704286.test b/mysql-test/suite/innodb/t/innodb_bug14704286.test index bdc2ab94b01..fb5e6b829a1 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14704286.test +++ b/mysql-test/suite/innodb/t/innodb_bug14704286.test @@ -4,8 +4,9 @@ # create test-bed to run test # use test; - +--disable_warnings drop table if exists t1; +--enable_warnings create table t1 (id int primary key, value int, value2 int, value3 int, index(value,value2)) engine=innodb; @@ -47,9 +48,11 @@ BEGIN END| delimiter ;| - +set autocommit=0; CALL update_t1(); select * from t1; +set autocommit=1; +select * from t1; # # Now try to fire select query from connection-1 enforcing @@ -65,6 +68,10 @@ select * from t1 force index(value) where value=12; # select is going to take good time so let's kill query. # connection conn3; +let $wait_condition= + select * from information_schema.processlist where state = 'Sending data' and + info = 'select * from t1 force index(value) where value=12'; +--source include/wait_condition.inc let $ignore= `SELECT @id := $ID`; kill query @id; @@ -74,7 +81,6 @@ kill query @id; connection conn1; --error ER_QUERY_INTERRUPTED reap; -select * from t1 where value = 12; # # clean test-bed. From 52ea152294494a387a27350887aff2d11099544e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 18 Oct 2012 17:03:06 +0300 Subject: [PATCH 36/47] Bug#14758405: ALTER TABLE: ADDING SERIAL NULL DATATYPE: ASSERTION: LEN <= SIZEOF(ULONGLONG) This bug was caught in the WL#6255 ALTER TABLE...ADD COLUMN in MySQL 5.6, but there is a bug in all InnoDB versions that support auto-increment columns. row_search_autoinc_read_column(): When reading the maximum value of the auto-increment column, and the column only contains NULL values, return 0. This corresponds to the case when the table is empty in row_search_max_autoinc(). rb:1415 approved by Sunny Bains --- storage/innobase/row/row0sel.c | 19 ++++++++++++------- storage/innodb_plugin/ChangeLog | 6 ++++++ storage/innodb_plugin/row/row0sel.c | 19 ++++++++++++------- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index c600fa62151..cf3b36fbac2 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -4660,14 +4660,18 @@ row_search_autoinc_read_column( /* TODO: We have to cast away the const of rec for now. This needs to be fixed later.*/ offsets = rec_get_offsets( - (rec_t*) rec, index, offsets, ULINT_UNDEFINED, &heap); + (rec_t*) rec, index, offsets, col_no + 1, &heap); + + if (rec_offs_nth_sql_null(offsets, col_no)) { + /* There is no non-NULL value in the auto-increment column. */ + value = 0; + goto func_exit; + } /* TODO: We have to cast away the const of rec for now. This needs to be fixed later.*/ data = rec_get_nth_field((rec_t*)rec, offsets, col_no, &len); - ut_a(len != UNIV_SQL_NULL); - switch (mtype) { case DATA_INT: ut_a(len <= sizeof value); @@ -4688,15 +4692,16 @@ row_search_autoinc_read_column( ut_error; } - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } - /* We assume that the autoinc counter can't be negative. */ if (!unsigned_type && (ib_longlong) value < 0) { value = 0; } +func_exit: + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + return(value); } diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 35795e10dd4..f69f9e16904 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2012-10-18 The InnoDB Team + + * row/row0sel.c: + Fix Bug#14758405: ALTER TABLE: ADDING SERIAL NULL DATATYPE: ASSERTION: + LEN <= SIZEOF(ULONGLONG) + 2012-10-16 The InnoDB Team * dict/dict0dict.c, handler/handler0alter.cc, include/dict0dict.h: diff --git a/storage/innodb_plugin/row/row0sel.c b/storage/innodb_plugin/row/row0sel.c index c70a477db1d..d825d799a3c 100644 --- a/storage/innodb_plugin/row/row0sel.c +++ b/storage/innodb_plugin/row/row0sel.c @@ -4833,12 +4833,16 @@ row_search_autoinc_read_column( rec_offs_init(offsets_); - offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); + offsets = rec_get_offsets(rec, index, offsets, col_no + 1, &heap); + + if (rec_offs_nth_sql_null(offsets, col_no)) { + /* There is no non-NULL value in the auto-increment column. */ + value = 0; + goto func_exit; + } data = rec_get_nth_field(rec, offsets, col_no, &len); - ut_a(len != UNIV_SQL_NULL); - switch (mtype) { case DATA_INT: ut_a(len <= sizeof value); @@ -4859,14 +4863,15 @@ row_search_autoinc_read_column( ut_error; } - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } - if (!unsigned_type && (ib_int64_t) value < 0) { value = 0; } +func_exit: + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + return(value); } From eef1a1957e75a4153e44be26e0e32dee5f6069ad Mon Sep 17 00:00:00 2001 From: Neeraj Bisht Date: Thu, 18 Oct 2012 23:45:15 +0530 Subject: [PATCH 37/47] Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE_BLOB Problem:- When we execute a query which has subquery with GROUP BY, ORDER BY and have a BLOB column,results a memory leak. Analysis:- In case of subquery, which have GROUP BY on BLOB and a ORDER BY on other field and BLOB is not a key. We allocate a tmp buffer to copy_field to take care of BLOB value.This copy_field value can have copies of its in two join(objects), so while freeing this copy_field we have to take care that it is not deleted twice. The double deletion of tmp_table_param.copy_field is handled by two patches. One by Kostja : revid:sp1r-konstantin@mysql.com-20050627101056-55153 Fix the broken test suite in -debug build. and other by Oleksandr revid:sp1r-bell@sanja.is.com.ua-20060118114857-19905 Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851). both of this patches are commited in different branch and while merging they both get placed,but there is no need for Kostja patch as Oleksandr patch handle this. sql/sql_select.cc: Bug13726751, tmp_join clean up is not necessary as later in the code we are taking care of cleaning up of tmp_join copy_field. --- sql/sql_select.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bcf601e5142..de9f0ead7a3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7084,15 +7084,8 @@ void JOIN::cleanup(bool full) } } } - /* - We are not using tables anymore - Unlock all tables. We may be in an INSERT .... SELECT statement. - */ if (full) { - if (tmp_join) - tmp_table_param.copy_field= 0; - /* Ensure that the following delete_elements() would not be called twice for the same list. From 62503f9cf5af989107e887925816add9b4aec950 Mon Sep 17 00:00:00 2001 From: Nuno Carvalho Date: Sun, 21 Oct 2012 20:28:19 +0100 Subject: [PATCH 38/47] BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS Moved explicit instantiation of available_buffer and valid_buffer_range template functions to sql/log_event.cc. --- sql/log_event.cc | 16 ++++++++++++++++ sql/mysql_priv.h | 9 --------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 0ad258f7073..58de0d310d7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -54,6 +54,22 @@ */ #define FMT_G_BUFSIZE(PREC) (3 + (PREC) + 5 + 1) +/* + Explicit instantiation to unsigned int of template available_buffer + function. +*/ +template unsigned int available_buffer(const char*, + const char*, + unsigned int); + +/* + Explicit instantiation to unsigned int of template valid_buffer_range + function. +*/ +template bool valid_buffer_range(unsigned int, + const char*, + const char*, + unsigned int); #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD* thd); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 05a37228e17..4741562cab3 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -516,10 +516,6 @@ template T available_buffer(const char* buf_start, { return buf_len - (buf_current - buf_start); } -/* Explicit instantion to unsigned int. */ -template unsigned int available_buffer(const char*, - const char*, - unsigned int); /* Check if jump value is within buffer limits. @@ -539,11 +535,6 @@ template bool valid_buffer_range(T jump, { return (jump <= available_buffer(buf_start, buf_current, buf_len)); } -/* Explicit instantion to unsigned int. */ -template bool valid_buffer_range(unsigned int, - const char*, - const char*, - unsigned int); /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT From d13554b1f90f7bef1d31ef66dc90eb6738a9f90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 22 Oct 2012 22:10:33 +0300 Subject: [PATCH 39/47] Backport from 5.6: Bug#14769820 ASSERT FLEN == LEN IN ALTER TABLE ... ADD UNIQUE KEY A bogus debug assertion failure occurred when reporting a duplicate key on a column prefix of a CHAR column. This is a regression from Bug#14729221 IN-PLACE ALTER TABLE REPORTS '' INSTEAD OF REAL DUPLICATE VALUE FOR PREFIX KEYS. The assertion is only present when UNIV_DEBUG is defined (which it is in debug builds starting from MySQL 5.5). It is a case of overasserting. Fix approved by Inaam Rana on IM. --- storage/innodb_plugin/handler/handler0alter.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/innodb_plugin/handler/handler0alter.cc b/storage/innodb_plugin/handler/handler0alter.cc index 7095077b788..0422abb0021 100644 --- a/storage/innodb_plugin/handler/handler0alter.cc +++ b/storage/innodb_plugin/handler/handler0alter.cc @@ -108,13 +108,17 @@ innobase_col_to_mysql( /* These column types should never be shipped to MySQL. */ ut_ad(0); - case DATA_CHAR: case DATA_FIXBINARY: case DATA_FLOAT: case DATA_DOUBLE: case DATA_DECIMAL: /* Above are the valid column types for MySQL data. */ ut_ad(flen == len); + /* fall through */ + case DATA_CHAR: + /* We may have flen > len when there is a shorter + prefix on a CHAR column. */ + ut_ad(flen >= len); #else /* UNIV_DEBUG */ default: #endif /* UNIV_DEBUG */ From 6b7419d3d089694b6cfe47e7e7f23e9bc436c696 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Mon, 29 Oct 2012 12:47:01 +0400 Subject: [PATCH 40/47] Fix sp_notembedded.test. --- mysql-test/r/sp_notembedded.result | 2 +- mysql-test/t/sp_notembedded.test | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 0e74677db02..7d350cbe06c 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -248,7 +248,6 @@ CREATE PROCEDURE p1(i INT) BEGIN END; DROP PROCEDURE p1; DELETE FROM mysql.user WHERE User='mysqltest_1'; FLUSH PRIVILEGES; -set @@global.concurrent_insert= @old_concurrent_insert; # # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al. # @@ -302,3 +301,4 @@ DROP EVENT teste_bug11763507; # ------------------------------------------------------------------ # -- End of 5.1 tests # ------------------------------------------------------------------ +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index 396c9791c34..9d59eab70eb 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -371,16 +371,6 @@ DELETE FROM mysql.user WHERE User='mysqltest_1'; FLUSH PRIVILEGES; -# -# Restore global concurrent_insert value. Keep in the end of the test file. -# - -set @@global.concurrent_insert= @old_concurrent_insert; - -# Wait till all disconnects are completed ---source include/wait_until_count_sessions.inc - - --echo # --echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al. --echo # @@ -476,3 +466,13 @@ DROP EVENT teste_bug11763507; --echo # ------------------------------------------------------------------ --echo # -- End of 5.1 tests --echo # ------------------------------------------------------------------ + + +# +# Restore global concurrent_insert value. Keep in the end of the test file. +# + +set @@global.concurrent_insert= @old_concurrent_insert; + +# Wait till all disconnects are completed +--source include/wait_until_count_sessions.inc From 7de6a91bfa3a040137ba5f5e54e232ed8b58558b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Oct 2012 14:52:17 +0100 Subject: [PATCH 41/47] From 7c7de142a3816c787d82aa0be42a410c18880466 Mon Sep 17 00:00:00 2001 From: Shivji Kumar Jha Date: Tue, 30 Oct 2012 10:40:07 +0530 Subject: [PATCH 42/47] BUG#14659685 - main.mysqlbinlog_row_myisam and main.mysqlbinlog_row_innodb are skipped by mtr === Problem === The following tests are wrongly placed in main suite and as a result these are not run with proper binlog format combinations. Some are always skipped by mtr. 1) mysqlbinlog_row_myisam 2) mysqlbinlog_row_innodb 3) mysqlbinlog_row.test 4) mysqlbinlog_row_trans.test 5) mysqlbinlog-cp932 6) mysqlbinlog2 7) mysqlbinlog_base64 === Background === mtr runs the tests placed in main suite with binlog format=stmt. Those that need to be tested against binlog format=row or mixed or more than one binlog format and require only one mysql server are placed in binlog suite. mtr runs tests in binlog suite with all three binlog formats(stmt,row and mixed). === Fix === 1) Moved the test listed in problem section above to binlog suite. 2) Added prefix "binlog_" to the name of each test case moved. Renamed the coresponding result files and option files accordingly. mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc: include file for mysqlbinlog_row_myisam.test and mysqlbinlog_row_myisam.test which are being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog-cp932.result: result file for mysqlbinlog-cp932.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result: result file for mysqlbinlog2.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog_base64.result: result file for mysqlbinlog_base64.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result: result file for mysqlbinlog_row.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result: result file for mysqlbinlog_row_innodb.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result: result file for mysqlbinlog_row_myisam.test which is being moved to binlog suite. mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result: result file for mysqlbinlog_row_trans.test which is being moved to binlog suite. mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt: option file for mysqlbinlog-cp932.test which is being moved to binlog suite. mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932.test: the test requires binlog format=stmt or mixed. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was never run with binlog format=mixed. mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test: the test requires binlog format=stmt or mixed. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was never run with binlog format=mixed. mysql-test/suite/binlog/t/binlog_mysqlbinlog_base64.test: the test requires binlog format=row. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was always skipped by mtr. mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test: the test requires binlog format=row. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was always skipped by mtr. mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test: the test requires binlog format=row. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was always skipped by mtr. mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test: the test requires binlog format=row. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was always skipped by mtr. mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test: the test requires binlog format=row. Since, it was placed in main suite earlier, it was only run with binlog format=stmt, and hence this test was always skipped by mtr. --- .../{include => extra/binlog_tests}/mysqlbinlog_row_engine.inc | 0 .../binlog/r/binlog_mysqlbinlog-cp932.result} | 0 .../binlog/r/binlog_mysqlbinlog2.result} | 0 .../binlog/r/binlog_mysqlbinlog_base64.result} | 0 .../binlog/r/binlog_mysqlbinlog_row.result} | 0 .../binlog/r/binlog_mysqlbinlog_row_innodb.result} | 0 .../binlog/r/binlog_mysqlbinlog_row_myisam.result} | 0 .../binlog/r/binlog_mysqlbinlog_row_trans.result} | 0 .../binlog/t/binlog_mysqlbinlog-cp932-master.opt} | 0 .../binlog/t/binlog_mysqlbinlog-cp932.test} | 0 .../binlog/t/binlog_mysqlbinlog2.test} | 0 .../binlog/t/binlog_mysqlbinlog_base64.test} | 0 .../binlog/t/binlog_mysqlbinlog_row.test} | 0 .../binlog/t/binlog_mysqlbinlog_row_innodb.test} | 2 +- .../binlog/t/binlog_mysqlbinlog_row_myisam.test} | 2 +- .../binlog/t/binlog_mysqlbinlog_row_trans.test} | 0 16 files changed, 2 insertions(+), 2 deletions(-) rename mysql-test/{include => extra/binlog_tests}/mysqlbinlog_row_engine.inc (100%) rename mysql-test/{r/mysqlbinlog-cp932.result => suite/binlog/r/binlog_mysqlbinlog-cp932.result} (100%) rename mysql-test/{r/mysqlbinlog2.result => suite/binlog/r/binlog_mysqlbinlog2.result} (100%) rename mysql-test/{r/mysqlbinlog_base64.result => suite/binlog/r/binlog_mysqlbinlog_base64.result} (100%) rename mysql-test/{r/mysqlbinlog_row.result => suite/binlog/r/binlog_mysqlbinlog_row.result} (100%) rename mysql-test/{r/mysqlbinlog_row_innodb.result => suite/binlog/r/binlog_mysqlbinlog_row_innodb.result} (100%) rename mysql-test/{r/mysqlbinlog_row_myisam.result => suite/binlog/r/binlog_mysqlbinlog_row_myisam.result} (100%) rename mysql-test/{r/mysqlbinlog_row_trans.result => suite/binlog/r/binlog_mysqlbinlog_row_trans.result} (100%) rename mysql-test/{t/mysqlbinlog-cp932-master.opt => suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt} (100%) rename mysql-test/{t/mysqlbinlog-cp932.test => suite/binlog/t/binlog_mysqlbinlog-cp932.test} (100%) rename mysql-test/{t/mysqlbinlog2.test => suite/binlog/t/binlog_mysqlbinlog2.test} (100%) rename mysql-test/{t/mysqlbinlog_base64.test => suite/binlog/t/binlog_mysqlbinlog_base64.test} (100%) rename mysql-test/{t/mysqlbinlog_row.test => suite/binlog/t/binlog_mysqlbinlog_row.test} (100%) rename mysql-test/{t/mysqlbinlog_row_innodb.test => suite/binlog/t/binlog_mysqlbinlog_row_innodb.test} (91%) rename mysql-test/{t/mysqlbinlog_row_myisam.test => suite/binlog/t/binlog_mysqlbinlog_row_myisam.test} (91%) rename mysql-test/{t/mysqlbinlog_row_trans.test => suite/binlog/t/binlog_mysqlbinlog_row_trans.test} (100%) diff --git a/mysql-test/include/mysqlbinlog_row_engine.inc b/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc similarity index 100% rename from mysql-test/include/mysqlbinlog_row_engine.inc rename to mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc diff --git a/mysql-test/r/mysqlbinlog-cp932.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog-cp932.result similarity index 100% rename from mysql-test/r/mysqlbinlog-cp932.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog-cp932.result diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result similarity index 100% rename from mysql-test/r/mysqlbinlog2.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result diff --git a/mysql-test/r/mysqlbinlog_base64.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_base64.result similarity index 100% rename from mysql-test/r/mysqlbinlog_base64.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog_base64.result diff --git a/mysql-test/r/mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result similarity index 100% rename from mysql-test/r/mysqlbinlog_row.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result diff --git a/mysql-test/r/mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result similarity index 100% rename from mysql-test/r/mysqlbinlog_row_innodb.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result diff --git a/mysql-test/r/mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result similarity index 100% rename from mysql-test/r/mysqlbinlog_row_myisam.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result diff --git a/mysql-test/r/mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result similarity index 100% rename from mysql-test/r/mysqlbinlog_row_trans.result rename to mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result diff --git a/mysql-test/t/mysqlbinlog-cp932-master.opt b/mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt similarity index 100% rename from mysql-test/t/mysqlbinlog-cp932-master.opt rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt diff --git a/mysql-test/t/mysqlbinlog-cp932.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932.test similarity index 100% rename from mysql-test/t/mysqlbinlog-cp932.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932.test diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test similarity index 100% rename from mysql-test/t/mysqlbinlog2.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test diff --git a/mysql-test/t/mysqlbinlog_base64.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_base64.test similarity index 100% rename from mysql-test/t/mysqlbinlog_base64.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog_base64.test diff --git a/mysql-test/t/mysqlbinlog_row.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test similarity index 100% rename from mysql-test/t/mysqlbinlog_row.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test diff --git a/mysql-test/t/mysqlbinlog_row_innodb.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test similarity index 91% rename from mysql-test/t/mysqlbinlog_row_innodb.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test index cef1a712f7d..e8ba283807b 100644 --- a/mysql-test/t/mysqlbinlog_row_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test @@ -20,5 +20,5 @@ let $engine_type=InnoDB; --source include/have_binlog_format_row.inc --source include/have_ucs2.inc ---source include/mysqlbinlog_row_engine.inc +--source extra/binlog_tests/mysqlbinlog_row_engine.inc diff --git a/mysql-test/t/mysqlbinlog_row_myisam.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test similarity index 91% rename from mysql-test/t/mysqlbinlog_row_myisam.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test index e7b0335812a..9b941282399 100644 --- a/mysql-test/t/mysqlbinlog_row_myisam.test +++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test @@ -20,4 +20,4 @@ let $engine_type=MyISAM; --source include/have_binlog_format_row.inc --source include/have_ucs2.inc ---source include/mysqlbinlog_row_engine.inc +--source extra/binlog_tests/mysqlbinlog_row_engine.inc diff --git a/mysql-test/t/mysqlbinlog_row_trans.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test similarity index 100% rename from mysql-test/t/mysqlbinlog_row_trans.test rename to mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test From 40b8b951428bd91275234d67ebba858bdfb844cd Mon Sep 17 00:00:00 2001 From: Anirudh Mangipudi Date: Tue, 30 Oct 2012 18:49:15 +0530 Subject: [PATCH 43/47] BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE TO 'MYISAM_SORT_BUFFER_SIZE' Problem: 'myisam_sort_buffer_size' is a parameter used by mysqld program only whereas 'sort_buffer_size' is used by mysqld and myisamchk programs. But the error message printed when myisamchk program is run with insufficient buffer size is myisam_sort_buffer_size is too small which may mislead to the server parameter myisam_sort_buffer_size. SOLUTION: A parameter 'myisam_sort_buffer_size' is added as an alias for 'sort_buffer_size' and the 'sort_buffer_size' parameter is marked as deprecated. So myisamchk also has both the parameters with the same role. --- storage/myisam/myisamchk.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 145c6b9b85a..8ab804cbaa2 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -310,7 +310,14 @@ static struct my_option my_long_options[] = &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, INT_MAX32, (long) MALLOC_OVERHEAD, (long) 1L, 0}, - { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "", + { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, + "Deprecated. myisam_sort_buffer_size alias is being used", + &check_param.sort_buffer_length, + &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG, + (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD), + ULONG_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0}, + { "myisam_sort_buffer_size", OPT_SORT_BUFFER_SIZE, + "Alias of sort_buffer_size parameter", &check_param.sort_buffer_length, &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD), From 86c0a80b0dc961530d3376d21028510c180d2cbc Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 1 Nov 2012 17:23:06 +0100 Subject: [PATCH 44/47] Bug#14840488 VALGRIND ERRORS IN MYSQL_CLIENT_TEST Add missing DBUG_RETURNs, otherwise the debug-stack gets messed up, and _db_enter_ and _db_exit_ will access data outside the current stack frame. --- libmysql/libmysql.c | 2 +- tests/mysql_client_test.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 5d153317150..f7eb19520b7 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4653,7 +4653,7 @@ int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE) { set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate, NULL); - return 1; + DBUG_RETURN(1); } if (column >= stmt->field_count) { diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index c38695db1b1..e6544e99c7e 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15278,6 +15278,7 @@ static void test_bug27876() rc= mysql_query(mysql, "set names default"); myquery(rc); + DBUG_VOID_RETURN; } From 2cbf2e643bc9b6e048905ba4d49da875f45018e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Nov 2012 19:34:47 +0100 Subject: [PATCH 45/47] applying patch for BUG15912213 --- sql/sql_acl.cc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index e07f668b1cf..80662832140 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1356,10 +1356,19 @@ ulong acl_get(const char *host, const char *ip, { ulong host_access= ~(ulong)0, db_access= 0; uint i; - size_t key_length; + size_t key_length, copy_length; char key[ACL_KEY_LENGTH],*tmp_db,*end; acl_entry *entry; DBUG_ENTER("acl_get"); + + copy_length= (size_t) (strlen(ip ? ip : "") + + strlen(user ? user : "") + + strlen(db ? db : "")); + /* + Make sure that strmov() operations do not result in buffer overflow. + */ + if (copy_length >= ACL_KEY_LENGTH) + DBUG_RETURN(0); VOID(pthread_mutex_lock(&acl_cache->lock)); end=strmov((tmp_db=strmov(strmov(key, ip ? ip : "")+1,user)+1),db); @@ -4340,6 +4349,16 @@ bool check_grant_db(THD *thd,const char *db) char helping [NAME_LEN+USERNAME_LENGTH+2]; uint len; bool error= TRUE; + size_t copy_length; + + copy_length= (size_t) (strlen(sctx->priv_user ? sctx->priv_user : "") + + strlen(db ? db : "")); + + /* + Make sure that strmov() operations do not result in buffer overflow. + */ + if (copy_length >= (NAME_LEN+USERNAME_LENGTH+2)) + return 1; len= (uint) (strmov(strmov(helping, sctx->priv_user) + 1, db) - helping) + 1; From eff07bf08e29afab76c7688ec063ef6881ee464f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 4 Dec 2012 17:08:02 +0100 Subject: [PATCH 46/47] proactive s/strmov/strnmov/ in sql_acl.cc and related test cases --- mysql-test/r/grant_lowercase.result | 20 ++++++++++++++++ mysql-test/t/grant_lowercase.opt | 1 + mysql-test/t/grant_lowercase.test | 30 +++++++++++++++++++++++ sql/sql_acl.cc | 37 +++++++++++++++++++++++------ 4 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 mysql-test/r/grant_lowercase.result create mode 100644 mysql-test/t/grant_lowercase.opt create mode 100644 mysql-test/t/grant_lowercase.test diff --git a/mysql-test/r/grant_lowercase.result b/mysql-test/r/grant_lowercase.result new file mode 100644 index 00000000000..489f990daf1 --- /dev/null +++ b/mysql-test/r/grant_lowercase.result @@ -0,0 +1,20 @@ +grant file on *.* to user1@localhost with grant option; +grant select on `a%`.* to user1@localhost with grant option; +grant file on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.* to 'user'@'%' identified by 'secret'; +ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +drop user user1@localhost; +call mtr.add_suppression("Incorrect database name"); +alter table mysql.host modify Db varchar(200); +alter table mysql.db modify Db varchar(200); +insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); +Warnings: +Warning 1265 Data truncated for column 'Db' at row 1 +insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); +Warnings: +Warning 1265 Data truncated for column 'Db' at row 1 +flush privileges; +delete from mysql.host where db like '=>%'; +delete from mysql.db where db like '=>%'; +alter table mysql.host modify Db char(64); +alter table mysql.db modify Db char(64); +flush privileges; diff --git a/mysql-test/t/grant_lowercase.opt b/mysql-test/t/grant_lowercase.opt new file mode 100644 index 00000000000..5b0a3d41b41 --- /dev/null +++ b/mysql-test/t/grant_lowercase.opt @@ -0,0 +1 @@ +--lower-case-table-names=1 diff --git a/mysql-test/t/grant_lowercase.test b/mysql-test/t/grant_lowercase.test new file mode 100644 index 00000000000..157e13449c2 --- /dev/null +++ b/mysql-test/t/grant_lowercase.test @@ -0,0 +1,30 @@ +# test cases for strmov(tmp_db, db) -> strnmov replacement in sql_acl.cc + +# +# http://seclists.org/fulldisclosure/2012/Dec/4 +# + +# in acl_get(), check_grant_db(), mysql_grant() +grant file on *.* to user1@localhost with grant option; +grant select on `a%`.* to user1@localhost with grant option; +connect (conn1,localhost,user1,,); +connection conn1; +--error ER_WRONG_DB_NAME +grant file on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.* to 'user'@'%' identified by 'secret'; +connection default; +disconnect conn1; +drop user user1@localhost; + +# in acl_load() +call mtr.add_suppression("Incorrect database name"); +alter table mysql.host modify Db varchar(200); +alter table mysql.db modify Db varchar(200); +insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); +insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); +flush privileges; # shouldn't crash here +delete from mysql.host where db like '=>%'; +delete from mysql.db where db like '=>%'; +alter table mysql.host modify Db char(64); +alter table mysql.db modify Db char(64); +flush privileges; + diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 020aa042722..4f4c0eeb06b 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -341,7 +341,12 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) convert db to lower case and give a warning if the db wasn't already in lower case */ - (void) strmov(tmp_name, host.db); + char *end = strnmov(tmp_name, host.db, sizeof(tmp_name)); + if (end >= tmp_name + sizeof(tmp_name)) + { + sql_print_warning(ER(ER_WRONG_DB_NAME), host.db); + continue; + } my_casedn_str(files_charset_info, host.db); if (strcmp(host.db, tmp_name) != 0) sql_print_warning("'host' entry '%s|%s' had database in mixed " @@ -595,7 +600,12 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) convert db to lower case and give a warning if the db wasn't already in lower case */ - (void)strmov(tmp_name, db.db); + char *end = strnmov(tmp_name, db.db, sizeof(tmp_name)); + if (end >= tmp_name + sizeof(tmp_name)) + { + sql_print_warning(ER(ER_WRONG_DB_NAME), db.db); + continue; + } my_casedn_str(files_charset_info, db.db); if (strcmp(db.db, tmp_name) != 0) { @@ -2474,15 +2484,23 @@ static GRANT_NAME *name_hash_search(HASH *name_hash, const char *user, const char *tname, bool exact, bool name_tolower) { - char helping [SAFE_NAME_LEN*2+USERNAME_LENGTH+3], *name_ptr; + char helping[SAFE_NAME_LEN*2+USERNAME_LENGTH+3]; + char *hend = helping + sizeof(helping); uint len; GRANT_NAME *grant_name,*found=0; HASH_SEARCH_STATE state; - name_ptr= strmov(strmov(helping, user) + 1, db) + 1; - len = (uint) (strmov(name_ptr, tname) - helping) + 1; + char *db_ptr= strmov(helping, user) + 1; + char *tname_ptr= strnmov(db_ptr, db, hend - db_ptr) + 1; + if (tname_ptr > hend) + return 0; // invalid name = not found + char *end= strnmov(tname_ptr, tname, hend - tname_ptr) + 1; + if (end > hend) + return 0; // invalid name = not found + + len = (uint) (end - helping); if (name_tolower) - my_casedn_str(files_charset_info, name_ptr); + my_casedn_str(files_charset_info, tname_ptr); for (grant_name= (GRANT_NAME*) hash_first(name_hash, (uchar*) helping, len, &state); grant_name ; @@ -3466,7 +3484,12 @@ bool mysql_grant(THD *thd, const char *db, List &list, if (lower_case_table_names && db) { - strmov(tmp_db,db); + char *end= strnmov(tmp_db,db, sizeof(tmp_db)); + if (end >= tmp_db + sizeof(tmp_db)) + { + my_error(ER_WRONG_DB_NAME ,MYF(0), db); + DBUG_RETURN(TRUE); + } my_casedn_str(files_charset_info, tmp_db); db=tmp_db; } From d07b5f1ca295d4eb6eeba0b88c93f04e9e21cb5c Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 7 Dec 2012 10:47:57 +0100 Subject: [PATCH 47/47] Last-minute fix to 5.1.67, taking a change done to main 5.1 by Dmitri Lenev. This is the original comment: > committer: Dmitry Lenev > branch nick: mysql-5.1-15954896 > timestamp: Wed 2012-12-05 19:26:56 +0400 > message: > Bug #15954896 "SP, MULTI-TABLE DELETE AND LONG ALIAS". Using too long table aliases in stored routines might have caused server crashes. Code in sp_head::merge_table_list() which is responsible for collecting information about tables used in stored routine was not aware of the fact that table alias might have arbitrary length. I.e. it assumed that table alias can't be longer than NAME_LEN bytes and allocated buffer for a key identifying table accordingly. This patch fixes the issue by ensuring that we use dynamically allocated buffer for table key when table alias is too long. By default stack based buffer is used in which NAME_LEN bytes are reserved for table alias. --- sql/sp_head.cc | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 7eef9f5ab28..054fc5e223e 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3839,8 +3839,6 @@ typedef struct st_sp_table Multi-set key: db_name\0table_name\0alias\0 - for normal tables db_name\0table_name\0 - for temporary tables - Note that in both cases we don't take last '\0' into account when - we count length of key. */ LEX_STRING qname; uint db_length, table_name_length; @@ -3897,19 +3895,26 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) for (; table ; table= table->next_global) if (!table->derived && !table->schema_table) { - char tname[(NAME_LEN + 1) * 3]; // db\0table\0alias\0 - uint tlen, alen; + /* + Structure of key for the multi-set is "db\0table\0alias\0". + Since "alias" part can have arbitrary length we use String + object to construct the key. By default String will use + buffer allocated on stack with NAME_LEN bytes reserved for + alias, since in most cases it is going to be smaller than + NAME_LEN bytes. + */ + char tname_buff[(NAME_LEN + 1) * 3]; + String tname(tname_buff, sizeof(tname_buff), &my_charset_bin); + uint temp_table_key_length; - tlen= table->db_length; - memcpy(tname, table->db, tlen); - tname[tlen++]= '\0'; - memcpy(tname+tlen, table->table_name, table->table_name_length); - tlen+= table->table_name_length; - tname[tlen++]= '\0'; - alen= strlen(table->alias); - memcpy(tname+tlen, table->alias, alen); - tlen+= alen; - tname[tlen]= '\0'; + tname.length(0); + tname.append(table->db, table->db_length); + tname.append('\0'); + tname.append(table->table_name, table->table_name_length); + tname.append('\0'); + temp_table_key_length= tname.length(); + tname.append(table->alias); + tname.append('\0'); /* Upgrade the lock type because this table list will be used @@ -3924,9 +3929,10 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) (and therefore should not be prelocked). Otherwise we will erroneously treat table with same name but with different alias as non-temporary. */ - if ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname, tlen)) || - ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname, - tlen - alen - 1)) && + if ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname.ptr(), + tname.length())) || + ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname.ptr(), + temp_table_key_length)) && tab->temp)) { if (tab->lock_type < table->lock_type) @@ -3945,11 +3951,11 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) lex_for_tmp_check->create_info.options & HA_LEX_CREATE_TMP_TABLE) { tab->temp= TRUE; - tab->qname.length= tlen - alen - 1; + tab->qname.length= temp_table_key_length; } else - tab->qname.length= tlen; - tab->qname.str= (char*) thd->memdup(tname, tab->qname.length + 1); + tab->qname.length= tname.length(); + tab->qname.str= (char*) thd->memdup(tname.ptr(), tab->qname.length); if (!tab->qname.str) return FALSE; tab->table_name_length= table->table_name_length; @@ -4018,7 +4024,7 @@ sp_head::add_used_tables_to_table_list(THD *thd, if (!(tab_buff= (char *)thd->calloc(ALIGN_SIZE(sizeof(TABLE_LIST)) * stab->lock_count)) || !(key_buff= (char*)thd->memdup(stab->qname.str, - stab->qname.length + 1))) + stab->qname.length))) DBUG_RETURN(FALSE); for (uint j= 0; j < stab->lock_count; j++)