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
62a46de2
Commit
62a46de2
authored
Nov 21, 2007
by
vasil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip:
Synchronize the utf8 and ucs2 tests.
parent
e1eb788f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+24
-10
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+4
-2
No files found.
mysql-test/innodb-index.result
View file @
62a46de2
...
@@ -596,6 +596,14 @@ insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe'
...
@@ -596,6 +596,14 @@ insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe'
commit;
commit;
alter table t1 add unique index (b);
alter table t1 add unique index (b);
ERROR 23000: Duplicate entry '2' for key 'b'
ERROR 23000: Duplicate entry '2' for key 'b'
insert into t1 values(8,9,'fff','fff');
select * from t1;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
...
@@ -606,7 +614,7 @@ t1 CREATE TABLE `t1` (
...
@@ -606,7 +614,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`)
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
alter table t1 add index (b);
alter table t1 add index (b);
insert into t1 values(
8,9,'fff','fff
');
insert into t1 values(
10,10,'kkk','iii
');
select * from t1;
select * from t1;
a b c d
a b c d
1 1 ab ab
1 1 ab ab
...
@@ -614,6 +622,7 @@ a b c d
...
@@ -614,6 +622,7 @@ a b c d
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 kkk iii
select * from t1 force index(b) order by b;
select * from t1 force index(b) order by b;
a b c d
a b c d
1 1 ab ab
1 1 ab ab
...
@@ -621,9 +630,10 @@ a b c d
...
@@ -621,9 +630,10 @@ a b c d
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 kkk iii
explain select * from t1 force index(b) order by b;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 5 NULL
5
1 SIMPLE t1 index NULL b 5 NULL
6
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
...
@@ -635,7 +645,7 @@ t1 CREATE TABLE `t1` (
...
@@ -635,7 +645,7 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`)
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
alter table t1 add unique index (c), add index (d);
alter table t1 add unique index (c), add index (d);
insert into t1 values(1
0,10,'aaa','kkk
');
insert into t1 values(1
1,11,'aaa','mmm
');
select * from t1;
select * from t1;
a b c d
a b c d
1 1 ab ab
1 1 ab ab
...
@@ -643,7 +653,8 @@ a b c d
...
@@ -643,7 +653,8 @@ a b c d
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 aaa kkk
10 10 kkk iii
11 11 aaa mmm
select * from t1 force index(b) order by b;
select * from t1 force index(b) order by b;
a b c d
a b c d
1 1 ab ab
1 1 ab ab
...
@@ -651,15 +662,17 @@ a b c d
...
@@ -651,15 +662,17 @@ a b c d
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 aaa kkk
10 10 kkk iii
11 11 aaa mmm
select * from t1 force index(c) order by c;
select * from t1 force index(c) order by c;
a b c d
a b c d
1
0 10 aaa kkk
1
1 11 aaa mmm
1 1 ab ab
1 1 ab ab
2 2 ac ac
2 2 ac ac
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 kkk iii
select * from t1 force index(d) order by d;
select * from t1 force index(d) order by d;
a b c d
a b c d
1 1 ab ab
1 1 ab ab
...
@@ -667,16 +680,17 @@ a b c d
...
@@ -667,16 +680,17 @@ a b c d
3 2 ad ad
3 2 ad ad
4 4 afe afe
4 4 afe afe
8 9 fff fff
8 9 fff fff
10 10 aaa kkk
10 10 kkk iii
11 11 aaa mmm
explain select * from t1 force index(b) order by b;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 5 NULL
6
1 SIMPLE t1 index NULL b 5 NULL
7
explain select * from t1 force index(c) order by c;
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL c 21 NULL
6
1 SIMPLE t1 index NULL c 21 NULL
7
explain select * from t1 force index(d) order by d;
explain select * from t1 force index(d) order by d;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL d 43 NULL
6
1 SIMPLE t1 index NULL d 43 NULL
7
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
...
...
mysql-test/innodb-index.test
View file @
62a46de2
...
@@ -190,15 +190,17 @@ insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe'
...
@@ -190,15 +190,17 @@ insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe'
commit
;
commit
;
--
error
ER_DUP_ENTRY
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
);
alter
table
t1
add
unique
index
(
b
);
insert
into
t1
values
(
8
,
9
,
'fff'
,
'fff'
);
select
*
from
t1
;
show
create
table
t1
;
show
create
table
t1
;
alter
table
t1
add
index
(
b
);
alter
table
t1
add
index
(
b
);
insert
into
t1
values
(
8
,
9
,
'fff'
,
'fff
'
);
insert
into
t1
values
(
10
,
10
,
'kkk'
,
'iii
'
);
select
*
from
t1
;
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
show
create
table
t1
;
show
create
table
t1
;
alter
table
t1
add
unique
index
(
c
),
add
index
(
d
);
alter
table
t1
add
unique
index
(
c
),
add
index
(
d
);
insert
into
t1
values
(
1
0
,
10
,
'aaa'
,
'kkk
'
);
insert
into
t1
values
(
1
1
,
11
,
'aaa'
,
'mmm
'
);
select
*
from
t1
;
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
c
)
order
by
c
;
select
*
from
t1
force
index
(
c
)
order
by
c
;
...
...
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