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
4c174b62
Commit
4c174b62
authored
Jul 07, 2010
by
Jon Olav Hauglid
Browse files
Options
Browse Files
Download
Plain Diff
manual merge from mysql-5.1-security
parents
b16eaa52
60edcf94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
+37
-5
mysql-test/suite/innodb/r/innodb_mysql.result
mysql-test/suite/innodb/r/innodb_mysql.result
+8
-0
mysql-test/suite/innodb/t/innodb_mysql.test
mysql-test/suite/innodb/t/innodb_mysql.test
+14
-0
sql/sql_table.cc
sql/sql_table.cc
+15
-5
No files found.
mysql-test/suite/innodb/r/innodb_mysql.result
View file @
4c174b62
...
...
@@ -2538,6 +2538,14 @@ ORDER BY f1 DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range f2,f4 f4 1 NULL 11 Using where
DROP TABLE t1;
#
# Bug#54117 crash in thr_multi_unlock, temporary table
#
CREATE TEMPORARY TABLE t1(a INT) ENGINE = InnoDB;
LOCK TABLES t1 READ;
ALTER TABLE t1 COMMENT 'test';
UNLOCK TABLES;
DROP TABLE t1;
End of 5.1 tests
#
# Test for bug #39932 "create table fails if column for FK is in different
...
...
mysql-test/suite/innodb/t/innodb_mysql.test
View file @
4c174b62
...
...
@@ -737,6 +737,20 @@ ORDER BY f1 DESC LIMIT 5;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#54117 crash in thr_multi_unlock, temporary table
--
echo
#
CREATE
TEMPORARY
TABLE
t1
(
a
INT
)
ENGINE
=
InnoDB
;
LOCK
TABLES
t1
READ
;
ALTER
TABLE
t1
COMMENT
'test'
;
UNLOCK
TABLES
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
...
...
sql/sql_table.cc
View file @
4c174b62
...
...
@@ -7331,12 +7331,22 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
if
(
table
->
s
->
tmp_table
!=
NO_TMP_TABLE
)
{
/* Close lock if this is a transactional table */
if
(
thd
->
lock
&&
!
(
thd
->
locked_tables_mode
==
LTM_LOCK_TABLES
||
thd
->
locked_tables_mode
==
LTM_PRELOCKED_UNDER_LOCK_TABLES
))
if
(
thd
->
lock
)
{
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
if
(
thd
->
locked_tables_mode
!=
LTM_LOCK_TABLES
&&
thd
->
locked_tables_mode
!=
LTM_PRELOCKED_UNDER_LOCK_TABLES
)
{
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
}
else
{
/*
If LOCK TABLES list is not empty and contains this table,
unlock the table and remove the table from this list.
*/
mysql_lock_remove
(
thd
,
thd
->
lock
,
table
);
}
}
/* Remove link to old table and rename the new one */
close_temporary_table
(
thd
,
table
,
1
,
1
);
...
...
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