Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
mariadb
Commits
bd21ce08
Commit
bd21ce08
authored
18 years ago
by
unknown
Browse files
Options
Download
Email Patches
Plain Diff
BUG#20397: Crash when alter table t1 engine = x;
Review fixes sql/sql_table.cc: Review fixes
parent
485ca9f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
sql/sql_table.cc
sql/sql_table.cc
+8
-5
No files found.
sql/sql_table.cc
View file @
bd21ce08
...
...
@@ -4993,17 +4993,20 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
old_db_type
=
table
->
s
->
db_type
;
if
(
!
create_info
->
db_type
)
{
if
(
create_info
->
used_fields
&
HA_CREATE_USED_ENGINE
)
if
(
table
->
part_info
&&
create_info
->
used_fields
&
HA_CREATE_USED_ENGINE
)
{
/*
This case happens when the user specified
ENGINE = x where x is a non-existing storage engine
We clear the flag and treat it the same way
as if no storage engine was specified.
We set create_info->db_type to default_engine_type
to ensure we don't change underlying engine type
due to a erroneously given engine name.
*/
create_info
->
used_fields
^=
HA_CREATE_USED_ENGINE
;
create_info
->
db_type
=
table
->
part_info
->
default_engine_type
;
}
create_info
->
db_type
=
old_db_type
;
else
create_info
->
db_type
=
old_db_type
;
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
...
...
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