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
a4e6061a
Commit
a4e6061a
authored
Jun 04, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/b28652/b28652.5.0
into mysql.com:/home/ram/work/b28652/b28652.5.1
parents
e411ccf8
2b2a8073
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
16 deletions
+25
-16
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+8
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+8
-0
sql/sql_table.cc
sql/sql_table.cc
+9
-16
No files found.
mysql-test/include/mix1.inc
View file @
a4e6061a
...
...
@@ -633,6 +633,14 @@ EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
DROP
TABLE
t1
,
t2
;
#
# Bug #28652: assert when alter innodb table operation
#
create
table
t1
(
a
int
)
engine
=
innodb
;
alter
table
t1
comment
'123'
;
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
#
...
...
mysql-test/r/innodb_mysql.result
View file @
a4e6061a
...
...
@@ -621,6 +621,14 @@ EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx1,idx2 idx1 9 NULL 2 Using where; Using index
DROP TABLE t1,t2;
create table t1(a int) engine=innodb;
alter table t1 comment '123';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='123'
drop table t1;
End of 5.0 tests
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
...
...
sql/sql_table.cc
View file @
a4e6061a
...
...
@@ -6385,6 +6385,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
alter_info
->
keys_onoff
);
table
->
file
->
ha_external_lock
(
thd
,
F_UNLCK
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
error
=
ha_commit_stmt
(
thd
);
if
(
ha_commit
(
thd
))
error
=
1
;
}
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
...
...
@@ -6787,20 +6790,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
broadcast_refresh
();
/*
The ALTER TABLE is always in its own transaction.
Commit must not be called while LOCK_open is locked. It could call
wait_if_global_read_lock(), which could create a deadlock if called
with LOCK_open.
*/
if
(
!
committed
)
{
error
=
ha_commit_stmt
(
thd
);
if
(
ha_commit
(
thd
))
error
=
1
;
if
(
error
)
goto
err
;
}
thd
->
proc_info
=
"end"
;
ha_binlog_log_query
(
thd
,
create_info
->
db_type
,
LOGCOM_ALTER_TABLE
,
...
...
@@ -7045,8 +7034,12 @@ copy_data_between_tables(TABLE *from,TABLE *to,
}
to
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
ha_enable_transaction
(
thd
,
TRUE
);
if
(
ha_enable_transaction
(
thd
,
TRUE
))
{
error
=
1
;
goto
err
;
}
/*
Ensure that the new table is saved properly to disk so that we
can do a rename
...
...
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