mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
don't do a warning for bad table options in replication slave thread
otherwise ALTER TABLE can break replication
This commit is contained in:
@@ -5,24 +5,27 @@ set storage_engine=example;
|
||||
connection slave;
|
||||
connection master;
|
||||
create table t1 (a int not null) ull=12340;
|
||||
alter table t1 ull=12350;
|
||||
Warnings:
|
||||
Note 1105 EXAMPLE DEBUG: ULL 12340 -> 12350
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340
|
||||
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12350
|
||||
connection slave;
|
||||
connection slave;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12340 */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12350 */
|
||||
set sql_mode=ignore_bad_table_options;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12340
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12350
|
||||
connection master;
|
||||
drop table t1;
|
||||
set storage_engine=default;
|
||||
|
@@ -18,6 +18,7 @@ connection master;
|
||||
# the option is unknown.
|
||||
#
|
||||
create table t1 (a int not null) ull=12340;
|
||||
alter table t1 ull=12350;
|
||||
show create table t1;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
@@ -97,14 +97,13 @@ static bool report_unknown_option(THD *thd, engine_option_value *val,
|
||||
{
|
||||
DBUG_ENTER("report_unknown_option");
|
||||
|
||||
if (val->parsed || suppress_warning)
|
||||
if (val->parsed || suppress_warning || thd->slave_thread)
|
||||
{
|
||||
DBUG_PRINT("info", ("parsed => exiting"));
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
if (!(thd->variables.sql_mode & MODE_IGNORE_BAD_TABLE_OPTIONS) &&
|
||||
!thd->slave_thread)
|
||||
if (!(thd->variables.sql_mode & MODE_IGNORE_BAD_TABLE_OPTIONS))
|
||||
{
|
||||
my_error(ER_UNKNOWN_OPTION, MYF(0), val->name.str);
|
||||
DBUG_RETURN(TRUE);
|
||||
|
Reference in New Issue
Block a user