Hi Alfranio,
Great work!
Please find my review comments below.
STATUS
------
Not Approved.
REQUIRED CHANGES
----------------
RC1.
+ 13 + table_name_len + // "INTO TABLE `table`"
It should be table_name_len * 2.
REQUESTS
--------
SUGGESTIONS
-----------
DETAILS
-------
On Wed, 2011-01-19 at 15:48 +0000, Alfranio Correia wrote:
> #At
> file:///home/acorreia/workspace.oracle/repository.mysql/bzrwork/bug-57873/mysql-trunk/
> based on revid:alexander.barkov@stripped
>
> 3527 Alfranio Correia 2011-01-19
> BUG#57873 Backtick in savepoint name causes replication failure
>
> Backticks can be used as part of a name which may be wrongly interpreted if
> appropriated quotes are not used. This patch thus quotes names that are
> written to the binary log in the following cases:
>
> . User variable events;
> . Create database;
> . Create table;
> . Savepoint/Rollback;
> . Load data;
> . Drop table;
> . Drop database;
> . Other cases, where statements are constructed
> and injected in the binary log.
>
> When an event is read from the binary log and used in the mysqlbinlog, the
> current database must have its name quoted before being processed. Such data
> is not quoted before being written to binary log in order to avoid problems
> with filters as they are not expecting quoted names.
> @ client/mysqldump.c
> Refactored this routine in order to avoid duplicated code.
> The code removed from here is used in the quote_str() in
> strings/strfill.c
> @ include/m_string.h
> Created quote_str() to quote strings.
> @ mysql-test/r/mysqlbinlog.result
> Updated result file.
> @ mysql-test/r/mysqlbinlog2.result
> Updated result file.
> @ mysql-test/r/user_var-binlog.result
> Updated result file.
> @ mysql-test/suite/binlog/r/binlog_base64_flag.result
> Updated result file.
> @ mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result
> Updated result file.
> @ mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
> Updated result file.
> @ mysql-test/suite/rpl/r/rpl_backtick.result
> Added result file.
> @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
> Updated result file.
> @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
> Updated result file.
> @ mysql-test/suite/rpl/r/rpl_sp.result
> Updated result file.
> @ mysql-test/suite/rpl/t/rpl_backtick-master.opt
> Added test case.
> @ mysql-test/suite/rpl/t/rpl_backtick-slave.opt
> Added test case.
> @ mysql-test/suite/rpl/t/rpl_backtick.test
> Added test case.
> @ sql/binlog.cc
> Quoted "Savepoint" and "Rollback".
> @ sql/ha_ndbcluster_binlog.cc
> The name of the table is quoted before being written to the
> binary log.
> @ sql/log_event.cc
> Quoted the current database and information related to Load_log_event.
> @ sql/log_event.h
> Created a wrapper to quote_str in strings/strfill.c.
> @ sql/sql_base.cc
> The name of the table is quoted before being written to the
> binary log.
> @ sql/sql_db.cc
> The name of the table is quoted before being written to the
> binary log.
> @ sql/sql_load.cc
> The name of the table is quoted before being written to the
> binary log.
> @ sql/sql_show.cc
> Added a return to append_identifier as in the future you should check
> if operations do not go wrong.
> @ sql/sql_show.h
> Added a return to append_identifier as in the future you should check
> if operations do not go wrong.
> @ sql/sql_table.cc
> Quoted "Drop table".
> @ strings/strfill.c
> Created function to quote names.
>
> added:
> mysql-test/suite/rpl/r/rpl_backtick.result
> mysql-test/suite/rpl/t/rpl_backtick-master.opt
> mysql-test/suite/rpl/t/rpl_backtick-slave.opt
> mysql-test/suite/rpl/t/rpl_backtick.test
> modified:
> client/mysqldump.c
> include/m_string.h
> mysql-test/r/mysqlbinlog.result
> mysql-test/r/mysqlbinlog2.result
> mysql-test/r/user_var-binlog.result
> mysql-test/suite/binlog/r/binlog_base64_flag.result
> mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result
> mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
> mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
> mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
> mysql-test/suite/rpl/r/rpl_sp.result
> sql/binlog.cc
> sql/ha_ndbcluster_binlog.cc
> sql/log_event.cc
> sql/log_event.h
> sql/sql_base.cc
> sql/sql_db.cc
> sql/sql_load.cc
> sql/sql_show.cc
> sql/sql_show.h
> sql/sql_table.cc
> strings/strfill.c
> === modified file 'client/mysqldump.c'
> --- a/client/mysqldump.c 2011-01-16 04:02:29 +0000
> +++ b/client/mysqldump.c 2011-01-19 15:48:29 +0000
> @@ -533,7 +533,7 @@ static int init_dumping_tables(char *);
> static int init_dumping(char *, int init_func(char*));
> static int dump_databases(char **);
> static int dump_all_databases();
> -static char *quote_name(const char *name, char *buff, my_bool force);
> +static char *quote_name(const char *name, char *buffer, my_bool force);
> char check_if_ignore_table(const char *table_name, char *table_type);
> static char *primary_key_fields(const char *table_name);
> static my_bool get_view_structure(char *table, char* db);
> @@ -1574,23 +1574,14 @@ static my_bool test_if_special_chars(con
> buff quoted string
>
> */
> -static char *quote_name(const char *name, char *buff, my_bool force)
> +static char *quote_name(const char *name, char *buffer, my_bool force)
> {
> - char *to= buff;
> char qtype= (opt_compatible_mode & MASK_ANSI_QUOTES) ? '\"' : '`';
>
> if (!force && !opt_quoted && !test_if_special_chars(name))
> return (char*) name;
> - *to++= qtype;
> - while (*name)
> - {
> - if (*name == qtype)
> - *to++= qtype;
> - *to++= *name++;
> - }
> - to[0]= qtype;
> - to[1]= 0;
> - return buff;
> +
> + return (quote_str(buffer, name, qtype));
> } /* quote_name */
>
>
>
> === modified file 'include/m_string.h'
> --- a/include/m_string.h 2010-11-22 10:02:01 +0000
> +++ b/include/m_string.h 2011-01-19 15:48:29 +0000
> @@ -101,6 +101,7 @@ extern void strappend(char *s,size_t len
> extern char *strend(const char *s);
> extern char *strcend(const char *, pchar);
> extern char *strfill(char * s,size_t len,pchar fill);
> +extern char *quote_str(char *buffer, const char *name, char qtype);
> extern char *strmake(char *dst,const char *src,size_t length);
>
> #ifndef strmov
> @@ -291,5 +292,4 @@ static inline void lex_string_set(LEX_ST
> lex_str->str= (char *) c_str;
> lex_str->length= strlen(c_str);
> }
> -
> #endif
>
> === modified file 'mysql-test/r/mysqlbinlog.result'
> --- a/mysql-test/r/mysqlbinlog.result 2010-12-29 05:35:31 +0000
> +++ b/mysql-test/r/mysqlbinlog.result 2011-01-19 15:48:29 +0000
> @@ -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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -111,7 +111,7 @@ SET @@session.lc_time_names=0/*!*/;
> SET @@session.collation_database=DEFAULT/*!*/;
> BEGIN
> /*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1000000000/*!*/;
> LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS
> TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
> /*!*/;
> @@ -202,7 +202,7 @@ SET @@session.lc_time_names=0/*!*/;
> SET @@session.collation_database=DEFAULT/*!*/;
> BEGIN
> /*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1000000000/*!*/;
> insert into t1 values ("Alas")
> /*!*/;
> @@ -219,7 +219,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -312,7 +312,7 @@ SET @@session.lc_time_names=0/*!*/;
> SET @@session.collation_database=DEFAULT/*!*/;
> BEGIN
> /*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1000000000/*!*/;
> LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS
> TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
> /*!*/;
> @@ -403,7 +403,7 @@ SET @@session.lc_time_names=0/*!*/;
> SET @@session.collation_database=DEFAULT/*!*/;
> BEGIN
> /*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1000000000/*!*/;
> insert into t1 values ("Alas")
> /*!*/;
> @@ -420,7 +420,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/*!*/;
> @@ -438,7 +438,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=1108844556/*!*/;
> SET @@session.pseudo_thread_id=999999999/*!*/;
> SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
> @@ -498,7 +498,7 @@ ERROR 42000: PROCEDURE test.p1 does not
> /*!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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -548,7 +548,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -725,7 +725,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/*!*/;
> @@ -822,22 +822,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")
> /*!*/;
> @@ -865,7 +865,7 @@ SET @@session.lc_time_names=0/*!*/;
> SET @@session.collation_database=DEFAULT/*!*/;
> BEGIN
> /*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1266652094/*!*/;
> SavePoint mixed_cases
> /*!*/;
>
> === modified file 'mysql-test/r/mysqlbinlog2.result'
> --- a/mysql-test/r/mysqlbinlog2.result 2010-01-07 15:39:11 +0000
> +++ b/mysql-test/r/mysqlbinlog2.result 2011-01-19 15:48:29 +0000
> @@ -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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -103,7 +103,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=1/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609942/*!*/;
> insert into t1 values(null, "a")
> /*!*/;
> @@ -172,7 +172,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -209,7 +209,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -263,7 +263,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -289,7 +289,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -326,7 +326,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -369,7 +369,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -445,7 +445,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -474,7 +474,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=1/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609942/*!*/;
> insert into t1 values(null, "a")
> /*!*/;
> @@ -535,7 +535,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -564,7 +564,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -605,7 +605,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -622,7 +622,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -720,7 +720,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -761,7 +761,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -778,7 +778,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -820,7 +820,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -904,7 +904,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=1/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609942/*!*/;
> insert into t1 values(null, "a")
> /*!*/;
> @@ -972,7 +972,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -1009,7 +1009,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -1062,7 +1062,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -1088,7 +1088,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -1125,7 +1125,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -1167,7 +1167,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -1243,7 +1243,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -1272,7 +1272,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=1/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609942/*!*/;
> insert into t1 values(null, "a")
> /*!*/;
> @@ -1333,7 +1333,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -1361,7 +1361,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -1402,7 +1402,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -1419,7 +1419,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -1516,7 +1516,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=3/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609944/*!*/;
> insert into t1 values(null, "c")
> /*!*/;
> @@ -1557,7 +1557,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET INSERT_ID=6/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=1579609943/*!*/;
> insert into t1 values(null, "f")
> /*!*/;
> @@ -1574,7 +1574,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -1616,7 +1616,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
>
> === modified file 'mysql-test/r/user_var-binlog.result'
> --- a/mysql-test/r/user_var-binlog.result 2010-01-07 15:39:11 +0000
> +++ b/mysql-test/r/user_var-binlog.result 2011-01-19 15:48:29 +0000
> @@ -34,7 +34,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=10000/*!*/;
> INSERT INTO t1 VALUES(@`a b`)
> /*!*/;
>
> === modified file 'mysql-test/suite/binlog/r/binlog_base64_flag.result'
> --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result 2010-12-02 13:44:21 +0000
> +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result 2011-01-19 15:48:29 +0000
> @@ -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/*!*/;
>
> === modified file 'mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result'
> --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result 2009-10-14
> 13:25:11 +0000
> +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_verbose.result 2011-01-19
> 15:48:29 +0000
> @@ -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;
>
> === modified file 'mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result'
> --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result 2010-01-07 15:39:11
> +0000
> +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result 2011-01-19 15:48:29
> +0000
> @@ -26,7 +26,7 @@ SET @@session.collation_database=DEFAULT
> BEGIN
> /*!*/;
> SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/;
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=10000/*!*/;
> insert into t2 values (@v)
> /*!*/;
>
> === added file 'mysql-test/suite/rpl/r/rpl_backtick.result'
> --- a/mysql-test/suite/rpl/r/rpl_backtick.result 1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_backtick.result 2011-01-19 15:48:29 +0000
> @@ -0,0 +1,217 @@
> +include/master-slave.inc
> +[connection master]
> +set timestamp=1000000000;
> +select @@session.read_buffer_size - @@session.max_allowed_packet > 0;
> +@@session.read_buffer_size - @@session.max_allowed_packet > 0
> +1
> +============== 1. USER VARIABLE ==============
> +SET @`var``var` = '```';
> +SELECT @`var``var`;
> +@`var``var`
> +```
> +============== 2. CREATE DATABASE ==============
> +CREATE DATABASE `db``db`;
> +USE `db``db`;
> +============== 3. CREATE TABLE ==============
> +USE test;
> +CREATE TABLE `db``db`.```t``import_1` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_2` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``.``import_3` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_4` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_5` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``.``import_6` (`id``` int not null primary key
> auto_increment, other TEXT);
> +============== 4. SAVEPOINT/ROLLBACK ==============
> +USE test;
> +BEGIN;
> +INSERT INTO `db``db`.```t``import_1` VALUES (1, @`var``var`);
> +SAVEPOINT `s``p`;
> +ROLLBACK TO `s``p`;
> +Warnings:
> +Warning 1196 Some non-transactional changed tables couldn't be rolled back
> +DELETE FROM `db``db`.```t``import_1`;
> +COMMIT;
> +============== 5. LOAD DATA ==============
> +USE `db``db`;
> +USE test;
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_1` (`id```, other);
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_2` (`id```, other);
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``.``import_3` (`id```, other);
> +USE `db``db`;
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_4` (`id```, other);
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_5` (`id```, other);
> +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``.``import_6` (`id```, other);
> +USE `db``db`;
> +SELECT count(*) FROM ```t``import_1` where other = '```';
> +count(*)
> +5000
> +SELECT count(*) FROM ```t``import_2` where other = '```';
> +count(*)
> +5000
> +SELECT count(*) FROM ```t``.``import_3` where other = '```';
> +ERROR 42S02: Table 'db`db.`t`.`import_3' doesn't exist
> +SELECT count(*) FROM ```t``import_4` where other = '```';
> +count(*)
> +5000
> +SELECT count(*) FROM ```t``import_5` where other = '```';
> +count(*)
> +5000
> +SELECT count(*) FROM ```t``.``import_6` where other = '```';
> +ERROR 42S02: Table 'db`db.`t`.`import_6' doesn't exist
> +============== 6. DROP TABLE ==============
> +USE test;
> +DROP TABLE `db``db`.```t``import_1`;
> +DROP TABLE `db``db`.```t``import_2`;
> +DROP TABLE `db``db`.```t``.``import_3`;
> +DROP TABLE `db``db`.```t``import_4`;
> +DROP TABLE `db``db`.```t``import_5`;
> +DROP TABLE `db``db`.```t``.``import_6`;
> +============== 7. DROP DATABASE ==============
> +DROP DATABASE `db``db`;
> +/*!40019 SET @@session.max_insert_delayed_threads=0*/;
> +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
> +DELIMITER /*!*/;
> +ROLLBACK/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +SET @@session.pseudo_thread_id=999999999/*!*/;
> +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> +SET @@session.sql_mode=0/*!*/;
> +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
> +/*!\C latin1 *//*!*/;
> +SET
> @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
> +SET @@session.lc_time_names=0/*!*/;
> +SET @@session.collation_database=DEFAULT/*!*/;
> +CREATE DATABASE `db``db`
> +/*!*/;
> +use `test`/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``import_1` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``import_2` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``.``import_3` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``import_4` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``import_5` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +CREATE TABLE `db``db`.```t``.``import_6` (`id``` int not null primary key
> auto_increment, other TEXT)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET @`var``var`:=_latin1 0x606060 COLLATE `latin1_swedish_ci`/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +INSERT INTO `db``db`.```t``import_1` VALUES (1, @`var``var`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DELETE FROM `db``db`.```t``import_1`
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +SAVEPOINT `s``p`
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +ROLLBACK TO `s``p`
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> `db``db`.```t``import_1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES
> TERMINATED BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> `db``db`.```t``import_2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES
> TERMINATED BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> `db``db`.```t``.``import_3` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES
> TERMINATED BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +use `db``db`/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> ```t``import_4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED
> BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> ```t``import_5` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED
> BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +BEGIN
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE
> ```t``.``import_6` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES
> TERMINATED BY '\n' (`id```, `other`)
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +COMMIT
> +/*!*/;
> +use `test`/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``import_1` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``import_2` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``.``import_3` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``import_4` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``import_5` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP TABLE `db``db`.```t``.``import_6` /* generated by server */
> +/*!*/;
> +SET TIMESTAMP=1000000000/*!*/;
> +DROP DATABASE `db``db`
> +/*!*/;
> +DELIMITER ;
> +# End of log file
> +ROLLBACK /* added by mysqlbinlog */;
> +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
> +set @@session.binlog_rows_query_log_events= 0;
> +include/rpl_end.inc
>
> === modified file 'mysql-test/suite/rpl/r/rpl_row_ignorable_event.result'
> --- a/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result 2010-12-19 17:22:30
> +0000
> +++ b/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result 2011-01-19 15:48:29
> +0000
> @@ -155,7 +155,7 @@ DELIMITER /*!*/;
> ROLLBACK/*!*/;
> # at #
> #server id # end_log_pos # Query thread_id=# exec_time=# error_code=#
> -use test/*!*/;
> +use `test`/*!*/;
> SET TIMESTAMP=t/*!*/;
> SET @@session.pseudo_thread_id=#/*!*/;
> SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -179,11 +179,11 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t1` mapped to number #
> # at #
> #server id # 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=1 /* INT meta=0 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=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -204,7 +204,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t1` mapped to number #
> # at #
> #server id # 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=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -228,7 +228,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t1` mapped to number #
> # at #
> #server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
> -### DELETE FROM test.t1
> +### DELETE FROM `test`.`t1`
> ### WHERE
> ### @1=6 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -254,11 +254,11 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t2` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t2
> +### INSERT INTO `test`.`t2`
> ### SET
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 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=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -269,14 +269,14 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t2` mapped to number #
> # at #
> #server id # end_log_pos # Update_rows: table id # flags: STMT_END_F
> -### UPDATE test.t2
> +### UPDATE `test`.`t2`
> ### WHERE
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> ### SET
> ### @1=7 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> -### UPDATE test.t2
> +### UPDATE `test`.`t2`
> ### WHERE
> ### @1=3 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -290,7 +290,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t2` mapped to number #
> # at #
> #server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
> -### DELETE FROM test.t2
> +### DELETE FROM `test`.`t2`
> ### WHERE
> ### @1=7 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -309,7 +309,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t1` mapped to number #
> # at #
> #server id # 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=5 /* INT meta=0 nullable=1 is_null=0 */
> @@ -330,7 +330,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t1` mapped to number #
> # at #
> #server id # 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=7 /* INT meta=0 nullable=1 is_null=0 */
> @@ -351,7 +351,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t2` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t2
> +### INSERT INTO `test`.`t2`
> ### SET
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=5 /* INT meta=0 nullable=1 is_null=0 */
> @@ -362,7 +362,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t2` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t2
> +### INSERT INTO `test`.`t2`
> ### SET
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=6 /* INT meta=0 nullable=1 is_null=0 */
> @@ -401,7 +401,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t3` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t3
> +### INSERT INTO `test`.`t3`
> ### SET
> ### @1=1 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -422,7 +422,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t4` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t4
> +### INSERT INTO `test`.`t4`
> ### SET
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -447,14 +447,14 @@ BEGIN
> #server id # end_log_pos # Update_rows: table id #
> # at #
> #server id # end_log_pos # Update_rows: table id # flags: STMT_END_F
> -### UPDATE test.t3
> +### UPDATE `test`.`t3`
> ### WHERE
> ### @1=1 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> ### SET
> ### @1=3 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> -### UPDATE test.t4
> +### UPDATE `test`.`t4`
> ### WHERE
> ### @1=2 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -478,7 +478,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t5` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t5
> +### INSERT INTO `test`.`t5`
> ### SET
> ### @1=3 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -501,7 +501,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t5` mapped to number #
> # at #
> #server id # end_log_pos # Update_rows: table id # flags: STMT_END_F
> -### UPDATE test.t5
> +### UPDATE `test`.`t5`
> ### WHERE
> ### @1=3 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=1 /* INT meta=0 nullable=1 is_null=0 */
> @@ -525,7 +525,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t3` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t3
> +### INSERT INTO `test`.`t3`
> ### SET
> ### @1=1 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=5 /* INT meta=0 nullable=1 is_null=0 */
> @@ -533,7 +533,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t3` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t3
> +### INSERT INTO `test`.`t3`
> ### SET
> ### @1=1 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=6 /* INT meta=0 nullable=1 is_null=0 */
> @@ -541,7 +541,7 @@ BEGIN
> #server id # end_log_pos # Table_map: `test`.`t3` mapped to number #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t3
> +### INSERT INTO `test`.`t3`
> ### SET
> ### @1=1 /* INT meta=0 nullable=1 is_null=0 */
> ### @2=7 /* INT meta=0 nullable=1 is_null=0 */
> @@ -569,214 +569,214 @@ BEGIN
> #server id # end_log_pos # Write_rows: table id #
> # at #
> #server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Aarhus' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Aaron' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Ababa' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='aback' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abaft' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandon' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandoned' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandoning' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandonment' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abandons' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abase' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abased' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abasement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abasements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abases' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abash' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abashed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abashes' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abashing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abasing' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abatement' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abatements' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abater' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abba' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbey' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbeys' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbot' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbots' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abbott' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviate' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviated' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviates' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviating' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviation' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abbreviations' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abby' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abdomen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abdomens' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abdominal' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abduct' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abducted' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abduction' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abductions' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abductor' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abductors' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abducts' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abe' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='abed' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abel' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abelian' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abelson' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Aberdeen' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='Abernathy' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='aberrant' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> -### INSERT INTO test.t6
> +### INSERT INTO `test`.`t6`
> ### SET
> ### @1='aberration' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
> # at #
>
> === modified file 'mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result'
> --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result 2010-12-19 17:22:30 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result 2011-01-19 15:48:29 +0000
> @@ -154,7 +154,7 @@ c1 c3 c4 c5
> /*!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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -176,7 +176,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -287,7 +287,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
> @@ -318,7 +318,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=0,
> @@session.unique_checks=1, @@session.autocommit=1/*!*/;
>
> === modified file 'mysql-test/suite/rpl/r/rpl_sp.result'
> --- a/mysql-test/suite/rpl/r/rpl_sp.result 2010-12-19 17:22:30 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_sp.result 2011-01-19 15:48:29 +0000
> @@ -670,7 +670,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))
> /*!*/;
> @@ -1015,7 +1015,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
> /*!*/;
> @@ -1112,7 +1112,7 @@ create database mysqltest
> SET TIMESTAMP=t/*!*/;
> create database mysqltest2
> /*!*/;
> -use mysqltest2/*!*/;
> +use `mysqltest2`/*!*/;
> SET TIMESTAMP=t/*!*/;
> create table t ( t integer )
> /*!*/;
> @@ -1139,7 +1139,7 @@ end
> SET TIMESTAMP=t/*!*/;
> BEGIN
> /*!*/;
> -use mysqltest/*!*/;
> +use `mysqltest`/*!*/;
> SET TIMESTAMP=t/*!*/;
> SELECT `mysqltest2`.`f1`()
> /*!*/;
> @@ -1152,14 +1152,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`:
>
> === added file 'mysql-test/suite/rpl/t/rpl_backtick-master.opt'
> --- a/mysql-test/suite/rpl/t/rpl_backtick-master.opt 1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_backtick-master.opt 2011-01-19 15:48:29 +0000
> @@ -0,0 +1 @@
> +--read_buffer_size=12K --max_allowed_packet=8K --binlog-rows-query-log-events=1
>
> === added file 'mysql-test/suite/rpl/t/rpl_backtick-slave.opt'
> --- a/mysql-test/suite/rpl/t/rpl_backtick-slave.opt 1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_backtick-slave.opt 2011-01-19 15:48:29 +0000
> @@ -0,0 +1 @@
> +--max_allowed_packet=8K --replicate-ignore-table=db`db.`t`.`import_3
> --replicate-ignore-table=db`db.`t`.`import_6 --binlog-rows-query-log-events=1
>
> === added file 'mysql-test/suite/rpl/t/rpl_backtick.test'
> --- a/mysql-test/suite/rpl/t/rpl_backtick.test 1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_backtick.test 2011-01-19 15:48:29 +0000
> @@ -0,0 +1,119 @@
> +###############################################################################
> +# This test case aims at checking if names with backticks are correctly #
> +# replicated. Specificially, we focus on seven cases: #
> +# #
> +# 1. User variable; #
> +# 2. Create database; #
> +# 3. Create table; #
> +# 4. Savepoint/Rollback; #
> +# 5. Load data; #
> +# 6. Drop table; #
> +# 7. Drop database; #
> +# #
> +# We ensure that names with backticks are correclty replicated by checking if #
> +# slave is in sycn with master and through mysqlbinlog #
> +###############################################################################
> +--source include/master-slave.inc
> +--source include/have_binlog_format_statement.inc
> +set timestamp=1000000000;
> +# We are going to replicate big transactions through LOAD DATA. So, we must
> +# ensure that buffers are correclty configured.
> +--connection slave
> +select @@session.read_buffer_size - @@session.max_allowed_packet > 0;
> +--connection master
> +
> +--echo ============== 1. USER VARIABLE ==============
> +SET @`var``var` = '```';
> +SELECT @`var``var`;
> +
> +--echo ============== 2. CREATE DATABASE ==============
> +CREATE DATABASE `db``db`;
> +USE `db``db`;
> +
> +--echo ============== 3. CREATE TABLE ==============
> +USE test;
> +CREATE TABLE `db``db`.```t``import_1` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_2` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``.``import_3` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_4` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``import_5` (`id``` int not null primary key
> auto_increment, other TEXT);
> +CREATE TABLE `db``db`.```t``.``import_6` (`id``` int not null primary key
> auto_increment, other TEXT);
> +
> +--echo ============== 4. SAVEPOINT/ROLLBACK ==============
> +USE test;
> +BEGIN;
> +INSERT INTO `db``db`.```t``import_1` VALUES (1, @`var``var`);
> +SAVEPOINT `s``p`;
> +ROLLBACK TO `s``p`;
> +DELETE FROM `db``db`.```t``import_1`;
> +COMMIT;
> +
> +--echo ============== 5. LOAD DATA ==============
> +# In what follows, We are creating information to be load in tables.
> +USE `db``db`;
> +--disable_query_log
> +SET @@sql_log_bin= 0;
> +let $rows= 5000;
> +CREATE TABLE ```t``export` (`id``` int not null primary key auto_increment, other
> TEXT);
> +while($rows)
> +{
> + INSERT INTO ```t``export` VALUES (null, @`var``var`);
> + dec $rows;
> +}
> +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' FROM
> ```t``export`;
> +SET @@sql_log_bin= 1;
> +--enable_query_log
> +
> +USE test;
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_1` (`id```, other);
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_2` (`id```, other);
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``.``import_3` (`id```, other);
> +USE `db``db`;
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_4` (`id```, other);
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``import_5` (`id```, other);
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug-57873.txt' into table
> `db``db`.```t``.``import_6` (`id```, other);
> +
> +--sync_slave_with_master
> +
> +USE `db``db`;
> +SELECT count(*) FROM ```t``import_1` where other = '```';
> +SELECT count(*) FROM ```t``import_2` where other = '```';
> +--error 1146
> +SELECT count(*) FROM ```t``.``import_3` where other = '```';
> +SELECT count(*) FROM ```t``import_4` where other = '```';
> +SELECT count(*) FROM ```t``import_5` where other = '```';
> +--error 1146
> +SELECT count(*) FROM ```t``.``import_6` where other = '```';
> +
> +--connection master
> +
> +--echo ============== 6. DROP TABLE ==============
> +USE test;
> +DROP TABLE `db``db`.```t``import_1`;
> +DROP TABLE `db``db`.```t``import_2`;
> +DROP TABLE `db``db`.```t``.``import_3`;
> +DROP TABLE `db``db`.```t``import_4`;
> +DROP TABLE `db``db`.```t``import_5`;
> +DROP TABLE `db``db`.```t``.``import_6`;
> +
> +--echo ============== 7. DROP DATABASE ==============
> +DROP DATABASE `db``db`;
> +
> +# Clean up the test case.
> +--sync_slave_with_master
> +--connection master
> +
> +let $MYSQLD_DATADIR= `select @@datadir`;
> +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
> +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
> +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/
> $MYSQLD_DATADIR/master-bin.000001
> +
> +set @@session.binlog_rows_query_log_events= 0;
> +--remove_file $MYSQLTEST_VARDIR/tmp/bug-57873.txt
> +--source include/rpl_end.inc
>
> === modified file 'sql/binlog.cc'
> --- a/sql/binlog.cc 2010-12-17 02:01:32 +0000
> +++ b/sql/binlog.cc 2011-01-19 15:48:29 +0000
> @@ -17,6 +17,7 @@
> #include "my_global.h"
> #include "log.h"
> #include "binlog.h"
> +#include "sql_show.h"
> #include "log_event.h"
> #include "rpl_filter.h"
> #include "rpl_rli.h"
> @@ -856,12 +857,20 @@ static int binlog_savepoint_set(handlert
> {
> DBUG_ENTER("binlog_savepoint_set");
> int error= 1;
> + /*
> + Statically allocates room to store savepoint, '\0' and an
> + identifier: savepoint name.
> +
> + Each identifier may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char buffer[10 + 1 + NAME_LEN * 2 + 2];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
>
> - 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("`"))
> + append_identifier(thd, &log_query, thd->lex->ident.str,
> + thd->lex->ident.length))
> DBUG_RETURN(error);
>
> int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
> @@ -889,7 +898,6 @@ static int binlog_savepoint_set(handlert
> static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv)
> {
> DBUG_ENTER("binlog_savepoint_rollback");
> -
> /*
> Write ROLLBACK TO SAVEPOINT to the binlog cache if we have updated some
> non-transactional table. Otherwise, truncate the binlog cache starting
> @@ -898,11 +906,20 @@ static int binlog_savepoint_rollback(han
> if (unlikely(trans_has_updated_non_trans_table(thd) ||
> (thd->variables.option_bits & OPTION_KEEP_LOG)))
> {
> - String log_query;
> + /*
> + Statically allocates room to store rollback to, '\0' and
> + an identifier: savepoint name.
> +
> + Each identifier may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char buffer[12 + 1 + NAME_LEN * 2 + 2];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
> +
> 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("`"))
> + append_identifier(thd, &log_query, thd->lex->ident.str,
> + thd->lex->ident.length))
> DBUG_RETURN(1);
> int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
> Query_log_event qinfo(thd, log_query.c_ptr_safe(), log_query.length(),
> @@ -4302,7 +4319,6 @@ err1:
> return 1;
> }
>
> -
> /*
> These functions are placed in this file since they need access to
> binlog_hton, which has internal linkage.
>
> === modified file 'sql/ha_ndbcluster_binlog.cc'
> --- a/sql/ha_ndbcluster_binlog.cc 2010-10-21 09:49:16 +0000
> +++ b/sql/ha_ndbcluster_binlog.cc 2011-01-19 15:48:29 +0000
> @@ -1291,8 +1291,19 @@ int ndbcluster_log_schema_op(THD *thd, N
> {
> DBUG_RETURN(0);
> }
> +
> + /*
> + Statically allocates room to store either drop or rename,
> + dots, '\0' and some identifiers: db, new_db, table_name
> + and new_table_name.
> +
> + Each identifier may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char buffer[13 + 1 + 2 + (NAME_LEN * 8) + 8];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
>
> - char tmp_buf2[FN_REFLEN];
> const char *type_str;
> switch (type)
> {
> @@ -1300,18 +1311,35 @@ int ndbcluster_log_schema_op(THD *thd, N
> /* drop database command, do not log at drop table */
> if (thd->lex->sql_command == SQLCOM_DROP_DB)
> 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);
> + if (log_query.append("drop table ") ||
> + append_identifier(thd_ndb, &log_query, table_name,
> + strlen(table_name)))
> + DBUG_RETURN(1);
> +
> + query= log_query.c_safe_ptr();
> + query_length= log_query.length();
> 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);
> +
> + if (query_log.append("rename table ") ||
> + append_identifier(thd_ndb, &log_query, db,
> + strlen(db)) ||
> + query_log.append(".") ||
> + append_identifier(thd_ndb, &log_query, table_name,
> + strlen(table_name)) ||
> + append_identifier(thd_ndb, &log_query, new_db,
> + strlen(new_db)) ||
> + query_log.append(".") ||
> + append_identifier(thd_ndb, &log_query, new_table_name,
> + strlen(new_table_name)))
> + DBUG_RETURN(1);
> +
> + query= log_query.c_safe_ptr();
> + query_length= log_query.length();
> type_str= "rename table";
> break;
> case SOT_CREATE_TABLE:
>
> === modified file 'sql/log_event.cc'
> --- a/sql/log_event.cc 2011-01-11 05:13:23 +0000
> +++ b/sql/log_event.cc 2011-01-19 15:48:29 +0000
> @@ -2190,6 +2190,13 @@ Rows_log_event::print_verbose_one_row(IO
> void Rows_log_event::print_verbose(IO_CACHE *file,
> PRINT_EVENT_INFO *print_event_info)
> {
> + /*
> + 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];
> + char quoted_table[1 + NAME_LEN * 2 + 2];
> Table_map_log_event *map;
> table_def *td;
> const char *sql_command, *sql_clause1, *sql_clause2;
> @@ -2226,17 +2233,20 @@ void Rows_log_event::print_verbose(IO_CA
> /* If the write rows event contained no values for the AI */
> if (((type_code == WRITE_ROWS_EVENT) && (m_rows_buf==m_rows_end)))
> {
> - my_b_printf(file, "### INSERT INTO `%s`.`%s` VALUES ()\n",
> - map->get_db_name(), map->get_table_name());
> + Log_event::quote_name(quoted_db, map->get_db_name());
> + Log_event::quote_name(quoted_table, map->get_table_name());
> + my_b_printf(file, "### INSERT INTO %s.%s VALUES ()\n",
> + quoted_db, quoted_table);
> goto end;
> }
>
> for (const uchar *value= m_rows_buf; value < m_rows_end; )
> {
> size_t length;
> + Log_event::quote_name(quoted_db, map->get_db_name());
> + Log_event::quote_name(quoted_table, map->get_table_name());
> my_b_printf(file, "### %s %s.%s\n",
> - sql_command,
> - map->get_db_name(), map->get_table_name());
> + sql_command, quoted_db, quoted_table);
> /* Print the first image */
> if (!(length= print_verbose_one_row(file, td, print_event_info,
> &m_cols, value,
> @@ -2399,15 +2409,27 @@ void Query_log_event::pack_info(Protocol
> {
> // TODO: show the catalog ??
> char *buf, *pos;
> - if (!(buf= (char*) my_malloc(9 + db_len + q_len, MYF(MY_WME))))
> + if (!(buf= (char*) my_malloc(6 + q_len + 1 + (db_len * 2) + 2, MYF(MY_WME))))
> return;
> pos= buf;
> if (!(flags & LOG_EVENT_SUPPRESS_USE_F)
> && 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];
> + size_t size= 0;
> +
> + pos= strmov(buf, "use ");
> +
> + Log_event::quote_name(quoted_db, db);
> + size= strlen(quoted_db);
> + memcpy(pos, quoted_db, size);
> +
> + pos= strmov(pos + size, "; ");
> }
> if (query && q_len)
> {
> @@ -3241,8 +3263,17 @@ void Query_log_event::print_query_header
> 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);
> + if (db[0] && different_db)
> + {
> + /*
> + 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];
> + Log_event::quote_name(quoted_db, db);
> + my_b_printf(file, "use %s%s\n", quoted_db, print_event_info->delimiter);
> + }
> }
>
> end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
> @@ -4656,34 +4687,46 @@ uint8 get_checksum_alg(const char* buf,
>
> #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
> uint Load_log_event::get_query_buffer_length()
> -{
> +{
> return
> - 5 + db_len + 3 + // "use DB; "
> - 18 + fname_len + 2 + // "LOAD DATA INFILE 'file''"
> - 11 + // "CONCURRENT "
> - 7 + // LOCAL
> - 9 + // " REPLACE or IGNORE "
> - 13 + table_name_len*2 + // "INTO TABLE `table`"
> - 21 + sql_ex.field_term_len*4 + 2 + // " FIELDS TERMINATED BY 'str'"
> - 23 + sql_ex.enclosed_len*4 + 2 + // " OPTIONALLY ENCLOSED BY 'str'"
> - 12 + sql_ex.escaped_len*4 + 2 + // " ESCAPED BY 'str'"
> - 21 + sql_ex.line_term_len*4 + 2 + // " LINES TERMINATED BY 'str'"
> - 19 + sql_ex.line_start_len*4 + 2 + // " LINES STARTING BY 'str'"
> - 15 + 22 + // " IGNORE xxx LINES"
> - 3 + (num_fields-1)*2 + field_block_len; // " (field1, field2, ...)"
> + 5 + (NAME_LEN * 2) + 3 + // "use DB; "
> + 18 + fname_len + 2 + // "LOAD DATA INFILE 'file''"
> + 11 + // "CONCURRENT "
> + 7 + // LOCAL
> + 9 + // " REPLACE or IGNORE "
> + 13 + table_name_len + // "INTO TABLE `table`"
> + 21 + sql_ex.field_term_len*4 + 2 + // " FIELDS TERMINATED BY 'str'"
> + 23 + sql_ex.enclosed_len*4 + 2 + // " OPTIONALLY ENCLOSED BY 'str'"
> + 12 + sql_ex.escaped_len*4 + 2 + // " ESCAPED BY 'str'"
> + 21 + sql_ex.line_term_len*4 + 2 + // " LINES TERMINATED BY 'str'"
> + 19 + sql_ex.line_start_len*4 + 2 + // " LINES STARTING BY 'str'"
> + 15 + 22 + // " IGNORE xxx LINES"
> + 3 + (num_fields - 1) * 2 + field_block_len; // " (field1, field2, ...)"
> }
>
>
> void Load_log_event::print_query(bool need_db, const char *cs, char *buf,
> char **end, char **fn_start, char **fn_end)
> {
> + /*
> + 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_id[1 + NAME_LEN * 2 + 2];
> + size_t 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, "`; ");
> + String buffer;
> +
> + buffer.set_charset(&my_charset_bin);
> + buffer.append("use ");
> + buffer.append(Log_event::quote_name(quoted_id, db));
> + buffer.append("; ");
> +
> + pos= strmov(pos, buffer.c_ptr_safe());
> }
>
> pos= strmov(pos, "LOAD DATA ");
> @@ -4710,17 +4753,15 @@ void Load_log_event::print_query(bool ne
> 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 ");
> @@ -4760,8 +4801,12 @@ void Load_log_event::print_query(bool ne
> *pos++= ' ';
> *pos++= ',';
> }
> - memcpy(pos, field, field_lens[i]);
> - pos+= field_lens[i];
> +
> + Log_event::quote_name(quoted_id, field);
> + quoted_id_len= strlen(quoted_id);
> + memcpy(pos, quoted_id, quoted_id_len);
> + pos+= quoted_id_len;
> +
> field+= field_lens[i] + 1;
> }
> *pos++= ')';
> @@ -5006,10 +5051,15 @@ void Load_log_event::print(FILE* file, P
> print(file, print_event_info, 0);
> }
>
> -
> void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info,
> bool commented)
> {
> + /*
> + 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_id[1 + NAME_LEN * 2 + 2];
> IO_CACHE *const head= &print_event_info->head_cache;
>
> DBUG_ENTER("Load_log_event::print");
> @@ -5033,11 +5083,14 @@ void Load_log_event::print(FILE* file_ar
> !commented)
> memcpy(print_event_info->db, db, db_len + 1);
> }
> -
> +
> if (db && db[0] && different_db)
> + {
> + Log_event::quote_name(quoted_id, db);
> my_b_printf(head, "%suse %s%s\n",
> commented ? "# " : "",
> - db, print_event_info->delimiter);
> + quoted_id, print_event_info->delimiter);
> + }
>
> if (flags & LOG_EVENT_THREAD_SPECIFIC_F)
> my_b_printf(head,"%sSET @@session.pseudo_thread_id=%lu%s\n",
> @@ -5053,8 +5106,15 @@ void Load_log_event::print(FILE* file_ar
> my_b_printf(head,"REPLACE ");
> else if (sql_ex.opt_flags & IGNORE_FLAG)
> my_b_printf(head,"IGNORE ");
> -
> - my_b_printf(head, "INTO TABLE `%s`", table_name);
> +
> + /*
> + This part of the code is called for old Load_log_event events and will
> + not work correctly if table is fully qualified (e.g. db`.`table) as we
> + cannot distinguish this case from tables with names like xxx`.`yyy or
> + xxx.yyy, i.e. with dots. See also write_execute_load_query_log_event.
> + */
> + Log_event::quote_name(quoted_id, table_name);
> + my_b_printf(head, "INTO TABLE %s", quoted_id);
> my_b_printf(head, " FIELDS TERMINATED BY ");
> pretty_print_str(head, sql_ex.field_term, sql_ex.field_term_len);
>
> @@ -5069,7 +5129,6 @@ void Load_log_event::print(FILE* file_ar
> my_b_printf(head," LINES TERMINATED BY ");
> pretty_print_str(head, sql_ex.line_term, sql_ex.line_term_len);
>
> -
> if (sql_ex.line_start)
> {
> my_b_printf(head," STARTING BY ");
> @@ -5087,8 +5146,9 @@ void Load_log_event::print(FILE* file_ar
> {
> if (i)
> my_b_printf(head, ",");
> - my_b_printf(head, "%s", field);
>
> + Log_event::quote_name(quoted_id, field);
> + my_b_printf(head, "%s", quoted_id);
> field += field_lens[i] + 1;
> }
> my_b_printf(head, ")");
> @@ -6062,7 +6122,15 @@ Xid_log_event::do_shall_skip(Relay_log_i
> void User_var_log_event::pack_info(Protocol* protocol)
> {
> char *buf= 0;
> - uint val_offset= 4 + name_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_id[1 + NAME_LEN * 2 + 2];
> + Log_event::quote_name(quoted_id, name);
> + size_t size= strlen(quoted_id);
> + uint val_offset= 2 + size;
> uint event_len= val_offset;
>
> if (is_null)
> @@ -6131,16 +6199,13 @@ void User_var_log_event::pack_info(Proto
> }
> }
> buf[0]= '@';
> - buf[1]= '`';
> - memcpy(buf+2, name, name_len);
> - buf[2+name_len]= '`';
> - buf[3+name_len]= '=';
> + memcpy(buf + 1, quoted_id, size);
> + buf[1 + size]= '=';
> protocol->store(buf, event_len, &my_charset_bin);
> my_free(buf);
> }
> #endif /* !MYSQL_CLIENT */
>
> -
> User_var_log_event::
> User_var_log_event(const char* buf,
> const Format_description_log_event* description_event)
> @@ -6281,6 +6346,12 @@ bool User_var_log_event::write(IO_CACHE*
> #ifdef MYSQL_CLIENT
> void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
> {
> + /*
> + 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_id[1 + NAME_LEN * 2 + 2];
> IO_CACHE *const head= &print_event_info->head_cache;
>
> if (!print_event_info->short_form)
> @@ -6289,9 +6360,9 @@ void User_var_log_event::print(FILE* fil
> my_b_printf(head, "\tUser_var\n");
> }
>
> - my_b_printf(head, "SET @`");
> - my_b_write(head, (uchar*) name, (uint) (name_len));
> - my_b_printf(head, "`");
> + my_b_printf(head, "SET @");
> + Log_event::quote_name(quoted_id, name);
> + my_b_write(head, (uchar*) quoted_id, (uint) strlen(quoted_id));
>
> if (is_null)
> {
> @@ -6367,7 +6438,7 @@ void User_var_log_event::print(FILE* fil
> else
> my_b_printf(head, ":=_%s %s COLLATE `%s`%s\n",
> cs->csname, hex_str, cs->name,
> - print_event_info->delimiter);
> + print_event_info->delimiter); // Alfranio
> my_afree(hex_str);
> }
> break;
> @@ -7426,14 +7497,24 @@ void Execute_load_query_log_event::print
> 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];
> + size_t size= 0;
> + Log_event::quote_name(quoted_db, db);
> + size= strlen(quoted_db);
> +
> + pos= strmov(buf, "use ");
> + memcpy(pos, quoted_db, size);
> + pos= strmov(pos + size, "; ");
> }
> if (query && q_len)
> {
> @@ -7446,7 +7527,6 @@ void Execute_load_query_log_event::pack_
> my_free(buf);
> }
>
> -
> int
> Execute_load_query_log_event::do_apply_event(Relay_log_info const *rli)
> {
> @@ -8910,10 +8990,19 @@ void Table_map_log_event::print(FILE *,
> {
> if (!print_event_info->short_form)
> {
> + /*
> + 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];
> + char quoted_table[1 + NAME_LEN * 2 + 2];
> print_header(&print_event_info->head_cache, print_event_info, TRUE);
> + Log_event::quote_name(quoted_db, m_dbnam);
> + Log_event::quote_name(quoted_table, m_tblnam);
> my_b_printf(&print_event_info->head_cache,
> - "\tTable_map: `%s`.`%s` mapped to number %lu\n",
> - m_dbnam, m_tblnam, m_table_id);
> + "\tTable_map: %s.%s mapped to number %lu\n",
> + quoted_db, quoted_table, m_table_id);
> print_base64(&print_event_info->body_cache, print_event_info, TRUE);
> }
> }
>
> === modified file 'sql/log_event.h'
> --- a/sql/log_event.h 2011-01-11 05:13:23 +0000
> +++ b/sql/log_event.h 2011-01-19 15:48:29 +0000
> @@ -33,6 +33,7 @@
> #endif
>
> #include <my_bitmap.h>
> +#include <m_string.h>
> #include "rpl_constants.h"
>
> #ifdef MYSQL_CLIENT
> @@ -1123,6 +1124,10 @@ public:
> return my_time(0);
> }
> #endif
> + static char *quote_name(char *buffer, const char *name)
> + {
> + return (quote_str(buffer, name, '`'));
> + }
> virtual Log_event_type get_type_code() = 0;
> virtual bool is_valid() const = 0;
> void set_artificial_event() { flags |= LOG_EVENT_ARTIFICIAL_F; }
>
> === modified file 'sql/sql_base.cc'
> --- a/sql/sql_base.cc 2011-01-11 11:45:02 +0000
> +++ b/sql/sql_base.cc 2011-01-19 15:48:29 +0000
> @@ -3758,22 +3758,45 @@ static bool open_table_entry_fini(THD *t
> 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))))
> + /*
> + Dynamically allocates room to store delete from, '\0', dot
> + and some identifiers: db and table_name.
> +
> + Each identifier may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char *buffer= NULL;
> + uint buffer_size= 13 + 1 + 1 + (share->db.length * 2) + 2 +
> + (share->table_name.length * 2) + 2;
> + if ((buffer= (char*) my_malloc(buffer_size, MYF(MY_WME))))
> {
> + /*
> + Defines a buffer in the stack to avoid having dynamic allocation
> + issues within the String object.
> + */
> + String log_query(buffer, buffer_size, system_charset_info);
> + log_query.length(0);
> +
> /* this DELETE FROM is needed even with row-based binlogging */
> - end = strxmov(strmov(query, "DELETE FROM `"),
> - share->db.str,"`.`",share->table_name.str,"`", NullS);
> + if (log_query.append("DELETE FROM ") ||
> + append_identifier(thd, &log_query, share->db.str,
> + share->db.length) ||
> + log_query.append(".") ||
> + append_identifier(thd, &log_query, share->table_name.str,
> + share->table_name.length))
> + {
> + my_free(buffer);
> + return TRUE;
> + }
> +
> int errcode= query_error_code(thd, TRUE);
> - if (thd->binlog_query(THD::STMT_QUERY_TYPE,
> - query, (ulong)(end-query),
> - FALSE, FALSE, FALSE, errcode))
> + if (thd->binlog_query(THD::STMT_QUERY_TYPE, log_query.c_ptr_safe(),
> + log_query.length(), FALSE, FALSE, FALSE, errcode))
> {
> - my_free(query);
> + my_free(buffer);
> return TRUE;
> }
> - my_free(query);
> + my_free(buffer);
> }
> else
> {
>
> === modified file 'sql/sql_db.cc'
> --- a/sql/sql_db.cc 2010-12-10 12:52:55 +0000
> +++ b/sql/sql_db.cc 2011-01-19 15:48:29 +0000
> @@ -30,6 +30,7 @@
> #include "log_event.h" // Query_log_event
> #include "sql_base.h" // lock_table_names, tdc_remove_table
> #include "sql_handler.h" // mysql_ha_rm_tables
> +#include "sql_show.h" // append_identifier
> #include <mysys_err.h>
> #include "sp.h"
> #include "events.h"
> @@ -541,7 +542,6 @@ int mysql_create_db(THD *thd, char *db,
> bool silent)
> {
> char path[FN_REFLEN+16];
> - char tmp_query[FN_REFLEN+16];
> long result= 1;
> int error= 0;
> MY_STAT stat_info;
> @@ -618,12 +618,25 @@ not_silent:
> {
> char *query;
> uint query_length;
> + /*
> + Statically allocates room to store create database, '\0' and
> + an identifier that may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char buffer[16 + 1 + NAME_LEN * 2 + 2];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
>
> if (!thd->query()) // Only in replication
> {
> - query= tmp_query;
> - query_length= (uint) (strxmov(tmp_query,"create database `",
> - db, "`", NullS) - tmp_query);
> + if (log_query.append("create database ") ||
> + append_identifier(thd, &log_query, db, strlen(db)))
> + {
> + error= -1;
> + goto exit;
> + }
> + query= log_query.c_ptr_safe();
> + query_length= log_query.length();
> }
> else
> {
> @@ -885,12 +898,26 @@ update_binlog:
> {
> const char *query;
> ulong query_length;
> + /*
> + Statically allocates room to store drop database, '\0' and
> + an identifier that may have NAME_LEN * 2 due to quoting and
> + there are two quoting characters that wrap them.
> + */
> + char buffer[16 + 1 + NAME_LEN * 2 + 2];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
> +
> if (!thd->query())
> {
> /* The client used the old obsolete mysql_drop_db() call */
> - query= path;
> - query_length= (uint) (strxmov(path, "drop database `", db, "`",
> - NullS) - path);
> + if (log_query.append("drop database ") ||
> + append_identifier(thd, &log_query, db, strlen(db)))
> + {
> + error= true;
> + goto exit;
> + }
> + query= log_query.c_ptr_safe();
> + query_length= log_query.length();
> }
> else
> {
> @@ -938,11 +965,22 @@ update_binlog:
>
> for (tbl= tables; tbl; tbl= tbl->next_local)
> {
> - uint tbl_name_len;
> -
> - /* 3 for the quotes and the comma*/
> - tbl_name_len= strlen(tbl->table_name) + 3;
> - if (query_pos + tbl_name_len + 1 >= query_end)
> + size_t size= 0;
> + /*
> + Statically allocates room to store an identifier that may
> + have NAME_LEN * 2 due to quoting and there are two quoting
> + characters that wrap them.
> + */
> + char buffer[1 + NAME_LEN * 2 + 2];
> + String log_query(buffer, sizeof(buffer), system_charset_info);
> + log_query.length(0);
> +
> + append_identifier(thd, &log_query, tbl->table_name,
> + strlen(tbl->table_name));
> +
> + /* we add 1 to the size for the comma*/
> + size= log_query.length() + 1;
> + if (query_pos + size + 1 >= query_end)
> {
> /*
> These DDL methods and logging are protected with the exclusive
> @@ -956,9 +994,7 @@ update_binlog:
> query_pos= query_data_start;
> }
>
> - *query_pos++ = '`';
> - query_pos= strmov(query_pos,tbl->table_name);
> - *query_pos++ = '`';
> + query_pos= strmov(query_pos, log_query.c_ptr_safe());
> *query_pos++ = ',';
> }
>
>
> === modified file 'sql/sql_load.cc'
> --- a/sql/sql_load.cc 2010-12-10 16:55:50 +0000
> +++ b/sql/sql_load.cc 2011-01-19 15:48:29 +0000
> @@ -29,6 +29,7 @@
> // prepare_triggers_for_insert_stmt,
> // write_record
> #include "sql_acl.h" // INSERT_ACL, UPDATE_ACL
> +#include "sql_show.h" // append_identifier
> #include "log_event.h" // Delete_file_log_event,
> // Execute_load_query_log_event,
> // LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F
> @@ -672,10 +673,23 @@ static bool write_execute_load_query_log
> Item *item, *val;
> String pfield, pfields;
> int n;
> - const char *tbl= table_name_arg;
> + const char *tbl= NULL;
> const char *tdb= (thd->db != NULL ? thd->db : db_arg);
> String string_buf;
>
> + /*
> + The SQL statement is not written to the event and is automaticaly
> + constructed based on information, such as table and fields, that
> + is stored in the event.
> +
> + In the future, if we decide to filter on the master, this may
> + cause problems because the table name is written to the binary
> + log with quote information. See WL#2387.
> +
> + This is necessary because we need to ensure that tables with
> + names like xxx`.`yyy or xxx.yyy, i.e. with dots, are correctly
> + replicated.
> + */
> if (!thd->db || strcmp(db_arg, thd->db))
> {
> /*
> @@ -684,13 +698,18 @@ static bool write_execute_load_query_log
> 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));
> + }
> + else
> + {
> + string_buf.set_charset(system_charset_info);
> + 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, is_concurrent,
> duplicates, ignore, transactional_table);
> @@ -716,11 +735,8 @@ static bool write_execute_load_query_log
> if (n++)
> pfields.append(", ");
> if (item->type() == Item::FIELD_ITEM)
> - {
> - pfields.append("`");
> - pfields.append(item->name);
> - pfields.append("`");
> - }
> + append_identifier(thd, &pfields, item->name,
> + strlen(item->name));
> else
> item->print(&pfields, QT_ORDINARY);
> }
> @@ -740,9 +756,8 @@ static bool write_execute_load_query_log
> 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);
> }
>
> === modified file 'sql/sql_show.cc'
> --- a/sql/sql_show.cc 2011-01-07 12:03:21 +0000
> +++ b/sql/sql_show.cc 2011-01-19 15:48:29 +0000
> @@ -940,7 +940,9 @@ static const char *require_quotes(const
>
> /*
> Quote the given identifier if needed and append it to the target string.
> - If the given identifier is empty, it will be quoted.
> + If the given identifier is empty, it will be quoted. Note that this routine
> + does not check errors. So, either the packet has enough room to get the
> + identifier or the server will crash. / Alfranio
>
> SYNOPSIS
> append_identifier()
> @@ -950,7 +952,7 @@ static const char *require_quotes(const
> name_length length of the appending identifier
> */
>
> -void
> +bool
> append_identifier(THD *thd, String *packet, const char *name, uint length)
> {
> const char *name_end;
> @@ -960,7 +962,7 @@ append_identifier(THD *thd, String *pack
> if (q == EOF)
> {
> packet->append(name, length, packet->charset());
> - return;
> + return FALSE;
> }
>
> /*
> @@ -990,6 +992,8 @@ append_identifier(THD *thd, String *pack
> packet->append(name, length, system_charset_info);
> }
> packet->append("e_char, 1, system_charset_info);
> +
> + return FALSE;
> }
>
>
>
> === modified file 'sql/sql_show.h'
> --- a/sql/sql_show.h 2010-10-22 12:37:58 +0000
> +++ b/sql/sql_show.h 2011-01-19 15:48:29 +0000
> @@ -90,8 +90,8 @@ int view_store_create_info(THD *thd, TAB
>
> int copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table);
>
> -void append_identifier(THD *thd, String *packet, const char *name,
> - uint length);
> +bool append_identifier(THD *thd, String *packet, const char *name,
> + uint length);
> void mysqld_list_fields(THD *thd,TABLE_LIST *table, const char *wild);
> bool mysqld_show_create(THD *thd, TABLE_LIST *table_list);
> bool mysqld_show_create_db(THD *thd, char *dbname, HA_CREATE_INFO *create);
>
> === modified file 'sql/sql_table.cc'
> --- a/sql/sql_table.cc 2010-12-17 18:43:38 +0000
> +++ b/sql/sql_table.cc 2011-01-19 15:48:29 +0000
> @@ -2161,6 +2161,7 @@ int mysql_rm_table_no_locks(THD *thd, TA
> bool non_tmp_table_deleted= 0;
> String built_query;
> String built_trans_tmp_query, built_non_trans_tmp_query;
> +
> DBUG_ENTER("mysql_rm_table_no_locks");
>
> /*
> @@ -2280,14 +2281,14 @@ int mysql_rm_table_no_locks(THD *thd, TA
> Don't write the database name if it is the current one (or if
> thd->db is NULL).
> */
> - built_ptr_query->append("`");
> if (thd->db == NULL || strcmp(db,thd->db) != 0)
> {
> - built_ptr_query->append(db);
> - built_ptr_query->append("`.`");
> + append_identifier(thd, built_ptr_query, db, strlen(db));
> + built_ptr_query->append(".");
> }
> - built_ptr_query->append(table->table_name);
> - built_ptr_query->append("`,");
> + append_identifier(thd, built_ptr_query, table->table_name,
> + strlen(table->table_name));
> + built_ptr_query->append(",");
> }
> /*
> This means that a temporary table was droped and as such there
> @@ -2346,15 +2347,14 @@ int mysql_rm_table_no_locks(THD *thd, TA
> 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, strlen(db));
> + 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(",");
> }
> }
> DEBUG_SYNC(thd, "rm_table_no_locks_before_delete_table");
> @@ -4107,7 +4107,6 @@ bool mysql_create_table_no_lock(THD *thd
> DBUG_PRINT("enter", ("db: '%s' table: '%s' tmp: %d",
> db, table_name, internal_tmp_table));
>
> -
> /* Check for duplicate fields and check type of table to create */
> if (!alter_info->create_list.elements)
> {
>
> === modified file 'strings/strfill.c'
> --- a/strings/strfill.c 2007-05-10 09:59:39 +0000
> +++ b/strings/strfill.c 2011-01-19 15:48:29 +0000
> @@ -32,3 +32,30 @@ char * strfill(char *s, size_t len, pcha
> *(s) = '\0';
> return(s);
> } /* strfill */
> +
> +/**
> + Wraps up name with qtype, doubles any qtype in name and stores the
> + result string in buffer, i.e., this function quotes name.
> +
> + @param[in,out] buffer Where the quoted name is stored.
> + @param[in] name String that will be quoted.
> + @param[in] qtype Token used to quote name.
> +
> + @return
> + @c buffer where the result string is placed.
> +*/
> +char *quote_str(char *buffer, const char *name, char qtype)
> +{
> + char *to= buffer;
> +
> + *to++= qtype;
> + while (*name)
> + {
> + if (*name == qtype)
> + *to++= qtype;
> + *to++= *name++;
> + }
> + to[0]= qtype;
> + to[1]= 0;
> + return buffer;
> +}
>
> text/bzr-bundle type attachment
> (bzr/alfranio.correia@stripped)
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: alfranio.correia@stripped\
> # x0je4xfyztmw27i7
> # target_branch: file:///home/acorreia/workspace.oracle\
> # /repository.mysql/bzrwork/bug-57873/mysql-trunk/
> # testament_sha1: a8f0beb5f35b6d1b80d1b4e8f0782748c5ab37b0
> # timestamp: 2011-01-19 15:48:44 +0000
> # base_revision_id: alexander.barkov@stripped\
> # 6ayyh3xrhkje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AEt+zzZk0iIiCIYgjmfiHpZtR4In2gLzIayAJ
> uBgHkZIbQHdoKmqGTAOkgEE6s7L6SEQgofOwD0OdGMuu5NrSaYBe10NKGxptzuRrQrD36Xa4Q4Mc
> IOCdYvWarftc3BwCcyam9qIz/J3troE/garYjC2bWPx4Z7+zqOctU3VgHWUX+TAiFu8VaGBeThdn
> jeaQOH+3DJjOzW4QTnepJMLzvnje7S8kV9ReUGR0NCTQoOnX0NgBwdor95AEQApoLbdrgbzoocjo
> yskM7mZB+8n1gp9UKl9wpR5ami0wJLDfgkA6nCJrdD4amsD5vU0NTc+LQ4a0kuTrPqBIZHqL5scr
> lUbIIs7KWSIbWBpXgBcY33O79U3A17HhK1F5pNljJwuD1By+Ml7mt9bwfF4+LxZ2xGxHW5wF3m3x
> bXvfg221v9Oxvqw4GTi730PSMbWlOj06/Y9jeQPCp4Y2gLISmA6yMD1W2Ol3gFW5r3U0IFkLbAXA
> cWLXa80b9koQkZAFqYelk62by1dXncXcuoM3oHCYnU4Xa6q6Sp4gLYzDGDa33c8ZNbQzpOpk6HLZ
> 3w87mHeLfoFHTU40zO49sGxyatcShAtBJTovymrSSUb+c+C+Vx9OwM+6LGJoZUpnBDVFdTfwOBkw
> 0vTUFF/chE5MAww1BnePF3vYybu1w4nsaHLc8zja3A835sRN1lStbmaeZ1Op0iAUAdTq53OGZ9J3
> GsBbmqx9DdhCfQ2ydzRY5XYivpex6WrfDlAXocQ86VZWtrex2h1e093g/gDSDNNBgHS9gXckU4UJ
> A/pcqQA=
>
>
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe: http://lists.mysql.com/commits?unsub=1
--
Your Sincerely,
Libing Song
==================================
MySQL Replication Team
Software Engineer
Email : Anders.Song@stripped
Skype : libing.song
MSN : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038
==================================