Commit graph

9 commits

Author SHA1 Message Date
unknown
c23c38fa31 BUG#14157: utf8 encoding in binlog without set character_set_client e.g DROP temporary
Binlog lacks encoding info about DROPped temporary table.

Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, that automatically, but not the client, who generates the query
the binlog should be updated on the server's encoding for the coming DROP.
The `write_binlog_with_system_charset()' is introduced to replace similar problematic places in the code.


mysql-test/r/drop_temp_table.result:
  results changed
mysql-test/r/mix_innodb_myisam_binlog.result:
  results changed
mysql-test/r/mysqlbinlog.result:
  results changed
mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/mysqlbinlog.test:
  Check roll-forward recovery from binlog where there are DROP temporary tables created
  in koi8r.
mysql-test/t/rpl_temporary.test:
  Check slave digests binlog with DROP temporary tables created in koi8r.
sql/mysql_priv.h:
  `write_binlog_with_system_charset()' is added to be called when a binlog event
  is created "implicitly" like DROP temporary table is case of closing connection.
sql/sql_base.cc:
  Idea of the fix is to switch temporary to system_charset_info when a temporary table
  is DROPped for binlog. Since that is the server, not the client, who generates the query
  the binlog should be updated on server's encoding for the coming DROP.
2006-05-09 23:01:31 +03:00
unknown
4cead8c8a5 1) undoing my fix for BUG#8055 "Trouble with replication from temporary tables and ignores"
and fixing it another way (per Monty; a simpler solution which does not increase the number
of binlog events is to always execute DROP TEMPORARY TABLE IF EXISTS on slave). A new test rpl_drop_temp.
2) fixing BUG#8436 "Multiple "stacked" SQL statements cause replication to stop" by setting
thd->query_length to the length of the query being executed, not counting the next queries
if this is a multi-query. Should also improve display of SHOW PROCESSLIST. A new test rpl_multi_query.



mysql-test/r/drop_temp_table.result:
  back to one single DROP
sql/sql_base.cc:
  undoing the fix I had made some days ago: we are back to one single DROP TEMPORARY TABLE for all temp tables.
sql/sql_parse.cc:
  1) set thd->query_length to the length of the query being executed, excluding the other next queries
  if this is a multi-query. The setting happens ASAP, ie. just after we know it's a multi-query, ie. just after yyparse().
  Don't include the ';' in thd->query_length, because this is not good for storage in binlog.
  2) always execute a DROP TEMPORARY TABLE IF EXISTS on slave, don't skip it even if --replicate-ignore-table
2005-02-14 23:47:17 +01:00
unknown
ededf83143 Fix for BUG#8055 "Trouble with replication from temporary tables and ignores":
when we close the session's temp tables at session end, we automatically write to binlog *one* DROP TEMPORARY TABLE *per tmp table*.


mysql-test/r/drop_temp_table.result:
  result update (note: one DROP TEMPORARY TABLE per tmp table)
mysql-test/t/drop_temp_table.test:
  checking that we have one DROP TEMPORARY TABLE per tmp table now, not one multi-table DROP.
  Hiding columns Log_pos/End_log_pos per Monty's request.
sql/sql_base.cc:
  When we close the session's temp tables at session end, we automatically write to binlog one DROP TEMPORARY TABLE per tmp table, 
  not one single multi-table DROP TEMPORARY TABLE (because it causes problems if slave has --replicate*table rules).
2005-02-04 22:43:54 +01:00
unknown
220acb328e Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the
  database created when checking conditions for replication.
  CREATE/DROP/ALTER DATABASE statements are now replicated based on
  the manipulated database.


mysql-test/t/rpl_until.test:
  Longer sleep to allow slave to stop.
mysql-test/t/rpl_charset.test:
  Position change in binary file.
mysql-test/r/drop_temp_table.result:
  Position change in binlog.
mysql-test/r/rpl_loaddata_rule_m.result:
  Position change in binlog.
mysql-test/r/rpl_charset.result:
  Position change in binlog.
sql/log_event.h:
  Added new flag and parameter to suppress generation of
  USE statements.
sql/log_event.cc:
  Added parameter and code to suppress generation of
  USE statements.
sql/sql_db.cc:
  Suppress generation of USE before CREATE/ALTER/DROP DATABASE
  statements.
sql/log.cc:
  Query_log_event have new extra parameter.
sql/sql_table.cc:
  Query_log_event have new extra parameter.
sql/sql_base.cc:
  Query_log_event have new extra parameter.
sql/sql_update.cc:
  Query_log_event have new extra parameter.
sql/sql_insert.cc:
  Query_log_event have new extra parameter.
sql/sql_rename.cc:
  Query_log_event have new extra parameter.
sql/sql_delete.cc:
  Query_log_event have new extra parameter.
sql/sql_acl.cc:
  Query_log_event have new extra parameter.
sql/handler.cc:
  Query_log_event have new extra parameter.
sql/item_func.cc:
  Query_log_event have new extra parameter.
sql/sql_parse.cc:
  Query_log_event have new extra parameter.
2004-12-03 12:13:51 +01:00
unknown
918519ea1e After merge fixes + simple optimizations
mysql-test/r/alter_table.result:
  Updated results after merge
mysql-test/r/drop_temp_table.result:
  Updated results after merge
mysql-test/r/union.result:
  Updated results after merge
sql/sql_db.cc:
  optimization: Use my_stat() instead of my_dir() to test if directory exists
sql/sql_union.cc:
  Fixed error in merge
2004-03-26 11:06:53 +02:00
unknown
1ead85e678 Fixes after merge
mysql-test/std_data/trunc_binlog.000001:
  Rename: mysql-test/std_data/trunc_binlog.001 -> mysql-test/std_data/trunc_binlog.000001
client/mysqltest.c:
  Fixed merge problem
mysql-test/mysql-test-run.sh:
  Fixed merge problem
mysql-test/r/distinct.result:
  Fix after merge
mysql-test/r/drop_temp_table.result:
  Fix after merge
mysql-test/r/join_outer.result:
  Fix after merge
mysql-test/r/mysqldump.result:
  Fix after merge
mysql-test/r/null_key.result:
  Fix after merge
mysql-test/r/order_by.result:
  Fix after merge
mysql-test/r/rpl_alter.result:
  Fix after merge
mysql-test/r/rpl_loaddata.result:
  Fix after merge
mysql-test/r/rpl_loaddata_rule_m.result:
  Fix after merge
mysql-test/r/rpl_trunc_binlog.result:
  Fix after merge
mysql-test/r/select_safe.result:
  Fix after merge
mysql-test/t/insert.test:
  Fix after merge
mysql-test/t/mysqlbinlog.test:
  Fix after merge
mysql-test/t/rpl000009.test:
  Fix after merge
mysql-test/t/rpl_alter.test:
  Fix after merge
mysql-test/t/rpl_loaddata_rule_m.test:
  Fix after merge
mysql-test/t/rpl_trunc_binlog.test:
  Fix after merge
sql-common/client.c:
  Fix after merge
sql/item_subselect.cc:
  Fix after merge
sql/repl_failsafe.cc:
  Fix after merge
sql/slave.cc:
  Fix after merge
sql/sql_insert.cc:
  Fix after merge
2003-10-08 12:01:58 +03:00
unknown
4e24aff59c fix for a random test failure on hpux/ia64
(a missing synchronization in the test)


mysql-test/r/drop_temp_table.result:
  result update
mysql-test/t/drop_temp_table.test:
  synchronize to be sure that the ending connection has finished binlogging.
2003-09-29 22:56:31 +02:00
unknown
e03265d4d5 Removed random chars after filename for LOAD DATA INFILE (in mysqlbinlog)
Add quoting for use `database` for mysqlbinlog
Removed test ins0000001
Add support for --replace for exec in mysqltest
Don't refer to install dir in mysqlbinlog.result


BitKeeper/deleted/.del-ins000001.result~f45c599efdf8352b:
  Delete: mysql-test/r/ins000001.result
BitKeeper/deleted/.del-ins000001.test~2428ee5c9b1bc483:
  Delete: mysql-test/t/ins000001.test
client/mysqlbinlog.cc:
  Removed random chars after filename for LOAD DATA INFILE
client/mysqltest.c:
  Add support for --replace for 'exec'
mysql-test/r/drop_temp_table.result:
  Updated results after quoting change
mysql-test/r/fulltext_multi.result:
  Updated results after quoting change
mysql-test/r/fulltext_order_by.result:
  Updated results after quoting change
mysql-test/r/insert.result:
  New tests
mysql-test/r/insert_select.result:
  Updated results after quoting change
mysql-test/r/mix_innodb_myisam_binlog.result:
  Updated results after quoting change
mysql-test/r/mysqlbinlog.result:
  Updated results after quoting change
mysql-test/r/rpl_log.result:
  Updated results after quoting change
mysql-test/t/fulltext_multi.test:
  Remove 'use'
mysql-test/t/fulltext_order_by.test:
  Remove 'use'
mysql-test/t/insert.test:
  Merge test with ins0000001.test
mysql-test/t/mysqlbinlog.test:
  Don't refer to install dir in result
sql/log_event.cc:
  Add quoting for use `database` for mysqlbinlog
support-files/mysql.server.sh:
  Move pid_file test after arguments have been parsed
2003-09-29 12:31:35 +03:00
unknown
3106e3119a Fix for BUG#1345 "SQL Syntax Error in binarylog with DROP TABLES":
it's just backquoting the db's and table's names
when writing DROP TEMPORARY TABLE to the binlog when a connection ends.
A testcase for this.


sql/sql_base.cc:
  backquote db and table name when writing DROP TEMPORARY TABLE to the binlog
  when a connection ends.
2003-09-28 18:31:49 +02:00