1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Files
mariadb/sql
Ramil Kalimullin bce4c76ae0 Fix for bug#35383: binlog playback and replication breaks
due to name_const substitution

Problem:
"In general, statements executed within a stored procedure
are written to the binary log using the same rules that
would apply were the statements to be executed in standalone
fashion. Some special care is taken when logging procedure
statements because statement execution within procedures
is not quite the same as in non-procedure context".

For example, each reference to a local variable in SP's
statements is replaced by NAME_CONST(var_name, var_value).
Queries like
"CREATE TABLE ... SELECT FUNC(local_var ..."
are logged as
"CREATE TABLE ... SELECT FUNC(NAME_CONST("local_var", var_value) ..."
that leads to differrent field names and
might result in "Incorrect column name" if var_value is long enough.

Fix: in 5.x we'll issue a warning in such a case.
In 6.0 we should get rid of NAME_CONST().

Note: this issue and change should be described in the documentation
("Binary Logging of Stored Programs").


mysql-test/r/binlog.result:
  Fix for bug#35383: binlog playback and replication breaks
  due to name_const substitution
    - test result.
mysql-test/t/binlog.test:
  Fix for bug#35383: binlog playback and replication breaks
  due to name_const substitution
    - test case.
sql/sp_head.cc:
  Fix for bug#35383: binlog playback and replication breaks 
  due to name_const substitution
    - set thd->query_name_consts if there's NAME_CONST()
  substitution(s).
sql/sql_parse.cc:
  Fix for bug#35383: binlog playback and replication breaks 
  due to name_const substitution
    - issue a warning if there's NAME_CONST() substitution and
  binary logging is on for "CREATE TABLE ... SELECT ...".
2009-03-25 20:48:10 +04:00
..
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2007-07-12 00:55:40 +05:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2009-03-19 09:44:58 -04:00
2007-11-05 20:18:22 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2008-12-12 14:59:10 +04:00
2008-04-10 15:55:37 -04:00
2009-03-19 09:44:58 -04:00
2009-01-16 16:48:41 +02:00
2006-12-23 20:17:15 +01:00
2009-03-19 09:44:58 -04:00
2009-02-06 18:25:08 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2009-03-19 09:58:56 -04:00
2009-03-19 09:44:58 -04:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-23 20:17:15 +01:00
2009-03-19 09:44:58 -04:00
2009-03-19 09:44:58 -04:00
2006-12-31 01:02:27 +01:00
2009-03-19 09:44:58 -04:00
2008-03-18 16:38:12 +04:00
2006-12-31 01:02:27 +01:00
2006-12-23 20:17:15 +01:00
2006-12-23 20:17:15 +01:00
2008-01-23 13:26:41 -07:00
2006-12-23 20:17:15 +01:00
2009-03-19 09:44:58 -04:00
2009-03-19 09:44:58 -04:00
2006-12-23 20:17:15 +01:00
2009-03-19 09:44:58 -04:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2009-03-19 09:44:58 -04:00
2009-03-24 15:29:04 +08:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2006-12-31 01:02:27 +01:00
2009-03-19 09:44:58 -04:00
2009-03-19 09:44:58 -04:00
2007-07-01 15:33:28 -07:00
2006-12-23 20:17:15 +01:00
2009-03-19 09:44:58 -04:00
2009-03-19 09:44:58 -04:00
2006-12-31 01:02:27 +01:00
2008-09-16 13:16:41 +02:00
2007-03-22 20:32:07 +02:00
2009-03-19 09:44:58 -04:00
2006-12-23 20:17:15 +01:00