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
8af4b43b
Commit
8af4b43b
authored
Feb 22, 2008
by
gluh@mgluh.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/gluh/MySQL/mysql-5.0-opt
parents
682f0e0d
4f0873c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
mysql-test/r/tablelock.result
mysql-test/r/tablelock.result
+9
-0
mysql-test/t/tablelock.test
mysql-test/t/tablelock.test
+13
-0
sql/sql_base.cc
sql/sql_base.cc
+6
-2
No files found.
mysql-test/r/tablelock.result
View file @
8af4b43b
...
...
@@ -46,3 +46,12 @@ CREATE TABLE t2 (a int);
lock tables t1 write,t1 as b write, t2 write, t2 as c read;
drop table t2,t1;
unlock tables;
create temporary table t1(f1 int);
lock tables t1 write;
insert into t1 values (1);
show columns from t1;
Field Type Null Key Default Extra
f1 int(11) YES NULL
insert into t1 values(2);
drop table t1;
unlock tables;
mysql-test/t/tablelock.test
View file @
8af4b43b
...
...
@@ -49,3 +49,16 @@ drop table t2,t1;
unlock
tables
;
# End of 4.1 tests
#
# Bug#23588 SHOW COLUMNS on a temporary table causes locking issues
#
create
temporary
table
t1
(
f1
int
);
lock
tables
t1
write
;
insert
into
t1
values
(
1
);
show
columns
from
t1
;
insert
into
t1
values
(
2
);
drop
table
t1
;
unlock
tables
;
# End of 5.0 tests
sql/sql_base.cc
View file @
8af4b43b
...
...
@@ -2852,8 +2852,12 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
}
if
(
tables
->
lock_type
!=
TL_UNLOCK
&&
!
thd
->
locked_tables
)
tables
->
table
->
reginfo
.
lock_type
=
tables
->
lock_type
==
TL_WRITE_DEFAULT
?
thd
->
update_lock_default
:
tables
->
lock_type
;
{
if
(
tables
->
lock_type
==
TL_WRITE_DEFAULT
)
tables
->
table
->
reginfo
.
lock_type
=
thd
->
update_lock_default
;
else
if
(
tables
->
table
->
s
->
tmp_table
==
NO_TMP_TABLE
)
tables
->
table
->
reginfo
.
lock_type
=
tables
->
lock_type
;
}
tables
->
table
->
grant
=
tables
->
grant
;
process_view_routines:
...
...
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