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
5bdc51ce
Commit
5bdc51ce
authored
Jan 03, 2008
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: innodb-index.test: Work around MySQL bugs and bug fixes.
parent
bb4c7d88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+9
-5
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+8
-2
No files found.
mysql-test/innodb-index.result
View file @
5bdc51ce
...
...
@@ -848,24 +848,28 @@ test.t1 check status OK
explain select * from t1 where b like 'adfd%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 769 NULL 11 Using where
create table t2(a int, b varchar(255), primary key(a,b)) engine=innodb;
insert into t2 select a,left(b,255) from t1;
drop table t1;
rename table t2 to t1;
begin;
select a from t1 limit 1 for update;
a
22
create index t1ba on t1 (b
(10)
,a);
create index t1ba on t1 (b,a);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
begin;
select a from t1 limit 1 lock in share mode;
a
22
create index t1ba on t1 (b
(10)
,a);
create index t1ba on t1 (b,a);
drop index t1ba on t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
explain select a from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL t1ba
16 NULL 60 Using index; Using filesort
1 SIMPLE t1 index NULL t1ba
261 NULL 15 Using index
select a,sleep(2+a/100) from t1 order by b limit 3;
select sleep(1);
sleep(1)
...
...
@@ -877,12 +881,12 @@ a sleep(2+a/100)
66 0
explain select a from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY
1028 NULL 60
Using index; Using filesort
1 SIMPLE t1 index NULL PRIMARY
261 NULL 15
Using index; Using filesort
select a from t1 order by b limit 3;
a
22
44
66
44
commit;
drop table t1;
create table t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
...
...
mysql-test/innodb-index.test
View file @
5bdc51ce
...
...
@@ -264,6 +264,12 @@ explain select * from t1 where b like 'adfd%';
#
# Test locking
#
create
table
t2
(
a
int
,
b
varchar
(
255
),
primary
key
(
a
,
b
))
engine
=
innodb
;
insert
into
t2
select
a
,
left
(
b
,
255
)
from
t1
;
drop
table
t1
;
rename
table
t2
to
t1
;
connect
(
a
,
localhost
,
root
,,);
connect
(
b
,
localhost
,
root
,,);
connection
a
;
...
...
@@ -273,7 +279,7 @@ select a from t1 limit 1 for update;
connection
b
;
# This would require an S lock on the table, conflicting with the IX lock.
--
error
ER_LOCK_WAIT_TIMEOUT
create
index
t1ba
on
t1
(
b
(
10
)
,
a
);
create
index
t1ba
on
t1
(
b
,
a
);
connection
a
;
commit
;
begin
;
...
...
@@ -281,7 +287,7 @@ begin;
select
a
from
t1
limit
1
lock
in
share
mode
;
connection
b
;
# This will require an S lock on the table. No conflict with the IS lock.
create
index
t1ba
on
t1
(
b
(
10
)
,
a
);
create
index
t1ba
on
t1
(
b
,
a
);
# This would require an X lock on the table, conflicting with the IS lock.
--
error
ER_LOCK_WAIT_TIMEOUT
drop
index
t1ba
on
t1
;
...
...
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