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
27bf2b3c
Commit
27bf2b3c
authored
May 12, 2010
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't error out on unknown options in the
replication thread or when opening a table
parent
6515d719
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
18 deletions
+70
-18
mysql-test/r/table_options.result
mysql-test/r/table_options.result
+0
-0
mysql-test/suite/rpl/r/rpl_table_options.result
mysql-test/suite/rpl/r/rpl_table_options.result
+25
-0
mysql-test/suite/rpl/t/rpl_table_options-master.opt
mysql-test/suite/rpl/t/rpl_table_options-master.opt
+1
-0
mysql-test/suite/rpl/t/rpl_table_options.test
mysql-test/suite/rpl/t/rpl_table_options.test
+31
-0
mysql-test/t/table_options.test
mysql-test/t/table_options.test
+0
-0
sql/create_options.cc
sql/create_options.cc
+13
-18
No files found.
mysql-test/r/
creat
e_options.result
→
mysql-test/r/
tabl
e_options.result
View file @
27bf2b3c
File moved
mysql-test/suite/rpl/r/rpl_table_options.result
0 → 100644
View file @
27bf2b3c
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
install plugin example soname 'ha_example.so';
set storage_engine=example;
create table t1 (a int not null) ull=12340;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12340
drop table t1;
set storage_engine=default;
select 1;
1
1
uninstall plugin example;
mysql-test/suite/rpl/t/rpl_table_options-master.opt
0 → 100644
View file @
27bf2b3c
$EXAMPLE_PLUGIN_OPT
mysql-test/suite/rpl/t/rpl_table_options.test
0 → 100644
View file @
27bf2b3c
--
source
include
/
not_windows_embedded
.
inc
--
source
include
/
have_example_plugin
.
inc
--
source
include
/
master
-
slave
.
inc
--
replace_regex
/
\
.
dll
/.
so
/
eval
install
plugin
example
soname
$HA_EXAMPLE_SO
;
set
storage_engine
=
example
;
sync_slave_with_master
;
connection
master
;
#
# only master has example engine installed,
# the slave will have the table created in myisam,
# that does not have ULL table option.
# but because the table was created by the replication
# slave thread, the table will be created anyway, even if
# the option is unknown.
#
create
table
t1
(
a
int
not
null
)
ull
=
12340
;
show
create
table
t1
;
sync_slave_with_master
;
connection
slave
;
show
create
table
t1
;
connection
master
;
drop
table
t1
;
set
storage_engine
=
default
;
select
1
;
uninstall
plugin
example
;
mysql-test/t/
creat
e_options.test
→
mysql-test/t/
tabl
e_options.test
View file @
27bf2b3c
File moved
sql/create_options.cc
View file @
27bf2b3c
...
@@ -77,22 +77,18 @@ void engine_option_value::link(engine_option_value **start,
...
@@ -77,22 +77,18 @@ void engine_option_value::link(engine_option_value **start,
static
bool
report_wrong_value
(
THD
*
thd
,
const
char
*
name
,
const
char
*
val
,
static
bool
report_wrong_value
(
THD
*
thd
,
const
char
*
name
,
const
char
*
val
,
my_bool
suppress_warning
)
my_bool
suppress_warning
)
{
{
if
(
!
(
thd
->
variables
.
sql_mode
&
MODE_IGNORE_BAD_TABLE_OPTIONS
))
if
(
suppress_warning
)
return
0
;
if
(
!
(
thd
->
variables
.
sql_mode
&
MODE_IGNORE_BAD_TABLE_OPTIONS
)
&&
!
thd
->
slave_thread
)
{
{
my_error
(
ER_BAD_OPTION_VALUE
,
MYF
(
0
),
val
,
name
);
my_error
(
ER_BAD_OPTION_VALUE
,
MYF
(
0
),
val
,
name
);
return
1
;
return
1
;
}
}
/*
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_BAD_OPTION_VALUE
,
We may need to suppress warnings to avoid duplicate messages
ER
(
ER_BAD_OPTION_VALUE
),
val
,
name
);
about the same option (option list is parsed more than once during
CREATE/ALTER table).
Errors are not suppressed, as they abort the execution on the first parsing.
*/
if
(
!
suppress_warning
)
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_BAD_OPTION_VALUE
,
ER
(
ER_BAD_OPTION_VALUE
),
val
,
name
);
return
0
;
return
0
;
}
}
...
@@ -100,23 +96,22 @@ static bool report_unknown_option(THD *thd, engine_option_value *val,
...
@@ -100,23 +96,22 @@ static bool report_unknown_option(THD *thd, engine_option_value *val,
my_bool
suppress_warning
)
my_bool
suppress_warning
)
{
{
DBUG_ENTER
(
"report_unknown_option"
);
DBUG_ENTER
(
"report_unknown_option"
);
if
(
val
->
parsed
)
if
(
val
->
parsed
||
suppress_warning
)
{
{
DBUG_PRINT
(
"info"
,
(
"parsed => exiting"
));
DBUG_PRINT
(
"info"
,
(
"parsed => exiting"
));
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
if
(
!
(
thd
->
variables
.
sql_mode
&
MODE_IGNORE_BAD_TABLE_OPTIONS
))
if
(
!
(
thd
->
variables
.
sql_mode
&
MODE_IGNORE_BAD_TABLE_OPTIONS
)
&&
!
thd
->
slave_thread
)
{
{
my_error
(
ER_UNKNOWN_OPTION
,
MYF
(
0
),
val
->
name
.
str
);
my_error
(
ER_UNKNOWN_OPTION
,
MYF
(
0
),
val
->
name
.
str
);
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
if
(
!
suppress_warning
)
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_UNKNOWN_OPTION
,
ER
(
ER_UNKNOWN_OPTION
),
val
->
name
.
str
);
ER_UNKNOWN_OPTION
,
ER
(
ER_UNKNOWN_OPTION
),
val
->
name
.
str
);
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
...
...
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