summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-23 18:38:27 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-23 18:38:27 +0100
commit32f349ed757a265b03b30e3635775ead21bdb54e (patch)
tree4de70d98bf438e372e1b73c5e179846ca768e6c8 /sql/sql_parse.cc
parent5c9d6a68e314cb8492417eb50bb2e8ea8e5c7200 (diff)
parent07d18b0f6761208f1f24e040bfea723274240e3f (diff)
downloadmariadb-git-32f349ed757a265b03b30e3635775ead21bdb54e.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint BitKeeper/etc/collapsed: auto-union configure.in: Auto merged mysql-test/Makefile.am: Auto merged mysql-test/extra/rpl_tests/rpl_deadlock.test: Auto merged mysql-test/mysql-test-run-shell.sh: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/windows.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/windows.test: Auto merged sql/item.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysqld.cc: Auto merged sql-common/my_time.c: Auto merged sql/sql_parse.cc: Auto merged BitKeeper/deleted/.del-ps_not_windows.result: Delete: mysql-test/r/ps_not_windows.result BitKeeper/deleted/.del-ps_not_windows.test: Delete: mysql-test/t/ps_not_windows.test mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/rpl_deadlock_innodb.result: Manual merge
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2a45520af81..5b61a5fb48a 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2550,7 +2550,23 @@ mysql_execute_command(THD *thd)
{
/* we warn the slave SQL thread */
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
- reset_one_shot_variables(thd);
+ if (thd->one_shot_set)
+ {
+ /*
+ It's ok to check thd->one_shot_set here:
+
+ The charsets in a MySQL 5.0 slave can change by both a binlogged
+ SET ONE_SHOT statement and the event-internal charset setting,
+ and these two ways to change charsets do not seems to work
+ together.
+
+ At least there seems to be problems in the rli cache for
+ charsets if we are using ONE_SHOT. Note that this is normally no
+ problem because either the >= 5.0 slave reads a 4.1 binlog (with
+ ONE_SHOT) *or* or 5.0 binlog (without ONE_SHOT) but never both."
+ */
+ reset_one_shot_variables(thd);
+ }
DBUG_RETURN(0);
}
}
@@ -6317,7 +6333,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ptr->alias= alias_str;
if (lower_case_table_names && table->table.length)
- my_casedn_str(files_charset_info, table->table.str);
+ table->table.length= my_casedn_str(files_charset_info, table->table.str);
ptr->table_name=table->table.str;
ptr->table_name_length=table->table.length;
ptr->lock_type= lock_type;