Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4568a72c
Commit
4568a72c
authored
4 years ago
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't do a warning for bad table options in replication slave thread
otherwise ALTER TABLE can break replication
parent
674be2fd
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
mysql-test/suite/rpl/r/rpl_table_options.result
mysql-test/suite/rpl/r/rpl_table_options.result
+6
-3
mysql-test/suite/rpl/t/rpl_table_options.test
mysql-test/suite/rpl/t/rpl_table_options.test
+1
-0
sql/create_options.cc
sql/create_options.cc
+2
-3
No files found.
mysql-test/suite/rpl/r/rpl_table_options.result
View file @
4568a72c
...
...
@@ -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`=123
4
0
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=123
5
0
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`=123
4
0 */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=123
5
0 */
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`=123
4
0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=123
5
0
connection master;
drop table t1;
set storage_engine=default;
...
...
This diff is collapsed.
Click to expand it.
mysql-test/suite/rpl/t/rpl_table_options.test
View file @
4568a72c
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
sql/create_options.cc
View file @
4568a72c
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment