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
7e58102b
Commit
7e58102b
authored
Jan 23, 2006
by
ingo@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-4.0-bug5390
into mysql.com:/home/mydev/mysql-4.1-bug5390
parents
d8c16914
87f9c10d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
79 deletions
+200
-79
mysql-test/r/lock.result
mysql-test/r/lock.result
+11
-0
mysql-test/t/lock.test
mysql-test/t/lock.test
+18
-0
sql/lock.cc
sql/lock.cc
+168
-79
sql/table.h
sql/table.h
+3
-0
No files found.
mysql-test/r/lock.result
View file @
7e58102b
...
@@ -47,6 +47,17 @@ unlock tables;
...
@@ -47,6 +47,17 @@ unlock tables;
lock tables t1 write, t1 as t1_alias read;
lock tables t1 write, t1 as t1_alias read;
insert into t1 select index1,nr from t1 as t1_alias;
insert into t1 select index1,nr from t1 as t1_alias;
drop table t1,t2;
drop table t1,t2;
create table t1 (c1 int);
create table t2 (c1 int);
create table t3 (c1 int);
lock tables t1 write, t2 write, t3 write;
drop table t2, t3, t1;
create table t1 (c1 int);
create table t2 (c1 int);
create table t3 (c1 int);
lock tables t1 write, t2 write, t3 write, t1 as t4 read;
alter table t2 add column c2 int;
drop table t1, t2, t3;
create table t1 ( a int(11) not null auto_increment, primary key(a));
create table t1 ( a int(11) not null auto_increment, primary key(a));
create table t2 ( a int(11) not null auto_increment, primary key(a));
create table t2 ( a int(11) not null auto_increment, primary key(a));
lock tables t1 write, t2 read;
lock tables t1 write, t2 read;
...
...
mysql-test/t/lock.test
View file @
7e58102b
...
@@ -61,6 +61,24 @@ insert into t1 select index1,nr from t1 as t1_alias;
...
@@ -61,6 +61,24 @@ insert into t1 select index1,nr from t1 as t1_alias;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
#
# BUG#5390 - problems with merge tables
# Supplement test for the after-fix optimization
# Check that a dropped table is correctly removed from a lock.
create
table
t1
(
c1
int
);
create
table
t2
(
c1
int
);
create
table
t3
(
c1
int
);
lock
tables
t1
write
,
t2
write
,
t3
write
;
# This removes one table after the other from the lock.
drop
table
t2
,
t3
,
t1
;
#
# Check that a lock merge works.
create
table
t1
(
c1
int
);
create
table
t2
(
c1
int
);
create
table
t3
(
c1
int
);
lock
tables
t1
write
,
t2
write
,
t3
write
,
t1
as
t4
read
;
alter
table
t2
add
column
c2
int
;
drop
table
t1
,
t2
,
t3
;
# Bug7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
# Bug7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
#
#
create
table
t1
(
a
int
(
11
)
not
null
auto_increment
,
primary
key
(
a
));
create
table
t1
(
a
int
(
11
)
not
null
auto_increment
,
primary
key
(
a
));
...
...
sql/lock.cc
View file @
7e58102b
This diff is collapsed.
Click to expand it.
sql/table.h
View file @
7e58102b
...
@@ -138,6 +138,9 @@ struct st_table {
...
@@ -138,6 +138,9 @@ struct st_table {
uint
next_number_index
;
uint
next_number_index
;
uint
blob_ptr_size
;
/* 4 or 8 */
uint
blob_ptr_size
;
/* 4 or 8 */
uint
next_number_key_offset
;
uint
next_number_key_offset
;
uint
lock_position
;
/* Position in MYSQL_LOCK.table */
uint
lock_data_start
;
/* Start pos. in MYSQL_LOCK.locks */
uint
lock_count
;
/* Number of locks */
int
current_lock
;
/* Type of lock on table */
int
current_lock
;
/* Type of lock on table */
enum
tmp_table_type
tmp_table
;
enum
tmp_table_type
tmp_table
;
my_bool
copy_blobs
;
/* copy_blobs when storing */
my_bool
copy_blobs
;
/* copy_blobs when storing */
...
...
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