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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a334e87d
Commit
a334e87d
authored
Dec 16, 2012
by
Michael Widenius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remember original table row pack type for ALTER TABLE if table is not copied.
parent
b31909ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
sql/sql_table.cc
sql/sql_table.cc
+13
-2
No files found.
sql/sql_table.cc
View file @
a334e87d
...
...
@@ -4124,7 +4124,8 @@ bool mysql_create_table_no_lock(THD *thd,
set_table_default_charset
(
thd
,
create_info
,
(
char
*
)
db
);
db_options
=
create_info
->
table_options
;
if
(
create_info
->
row_type
!=
ROW_TYPE_FIXED
&&
if
(
!
create_info
->
frm_only
&&
create_info
->
row_type
!=
ROW_TYPE_FIXED
&&
create_info
->
row_type
!=
ROW_TYPE_DEFAULT
)
db_options
|=
HA_OPTION_PACK_RECORD
;
alias
=
table_case_name
(
create_info
,
table_name
);
...
...
@@ -6670,9 +6671,19 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
my_sleep
(
100000
););
/*
Create a table with a temporary name.
With create_info->frm_only == 1 this creates a .frm file only.
With create_info->frm_only == 1 this creates a .frm file only and
we keep the original row format.
We don't log the statement, it will be logged later.
*/
if
(
need_copy_table
==
ALTER_TABLE_METADATA_ONLY
)
{
DBUG_ASSERT
(
create_info
->
frm_only
);
/* Ensure we keep the original table format */
create_info
->
table_options
=
((
create_info
->
table_options
&
~
HA_OPTION_PACK_RECORD
)
|
(
table
->
s
->
db_create_options
&
HA_OPTION_PACK_RECORD
));
}
tmp_disable_binlog
(
thd
);
error
=
mysql_create_table_no_lock
(
thd
,
new_db
,
tmp_name
,
create_info
,
...
...
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