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
9d76b526
Commit
9d76b526
authored
Nov 21, 2007
by
vasil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip:
Move common SQL commands to an .inc file.
parent
62a46de2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
58 deletions
+32
-58
mysql-test/innodb-index.inc
mysql-test/innodb-index.inc
+26
-0
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+2
-4
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+4
-54
No files found.
mysql-test/innodb-index.inc
0 → 100644
View file @
9d76b526
--
eval
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
),
d
varchar
(
20
),
primary
key
(
a
))
engine
=
innodb
default
charset
=
$charset
insert
into
t1
values
(
1
,
1
,
'ab'
,
'ab'
),(
2
,
2
,
'ac'
,
'ac'
),(
3
,
2
,
'ad'
,
'ad'
),(
4
,
4
,
'afe'
,
'afe'
);
commit
;
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
);
insert
into
t1
values
(
8
,
9
,
'fff'
,
'fff'
);
select
*
from
t1
;
show
create
table
t1
;
alter
table
t1
add
index
(
b
);
insert
into
t1
values
(
10
,
10
,
'kkk'
,
'iii'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
show
create
table
t1
;
alter
table
t1
add
unique
index
(
c
),
add
index
(
d
);
insert
into
t1
values
(
11
,
11
,
'aaa'
,
'mmm'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
c
)
order
by
c
;
select
*
from
t1
force
index
(
d
)
order
by
d
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
c
)
order
by
c
;
explain
select
*
from
t1
force
index
(
d
)
order
by
d
;
show
create
table
t1
;
check
table
t1
;
drop
table
t1
;
mysql-test/innodb-index.result
View file @
9d76b526
...
...
@@ -473,8 +473,7 @@ delete from t1;
select * from t2;
a b c d e
drop table t2,t4,t3,t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a))
engine = innodb default charset=utf8;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=utf8;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
commit;
alter table t1 add unique index (b);
...
...
@@ -590,8 +589,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a))
engine = innodb default charset=ucs2;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=ucs2;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
commit;
alter table t1 add unique index (b);
...
...
mysql-test/innodb-index.test
View file @
9d76b526
...
...
@@ -156,61 +156,11 @@ select * from t2;
drop
table
t2
,
t4
,
t3
,
t1
;
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
),
d
varchar
(
20
),
primary
key
(
a
))
engine
=
innodb
default
charset
=
utf8
;
insert
into
t1
values
(
1
,
1
,
'ab'
,
'ab'
),(
2
,
2
,
'ac'
,
'ac'
),(
3
,
2
,
'ad'
,
'ad'
),(
4
,
4
,
'afe'
,
'afe'
);
commit
;
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
);
insert
into
t1
values
(
8
,
9
,
'fff'
,
'fff'
);
select
*
from
t1
;
show
create
table
t1
;
alter
table
t1
add
index
(
b
);
insert
into
t1
values
(
10
,
10
,
'kkk'
,
'iii'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
show
create
table
t1
;
alter
table
t1
add
unique
index
(
c
),
add
index
(
d
);
insert
into
t1
values
(
11
,
11
,
'aaa'
,
'mmm'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
c
)
order
by
c
;
select
*
from
t1
force
index
(
d
)
order
by
d
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
c
)
order
by
c
;
explain
select
*
from
t1
force
index
(
d
)
order
by
d
;
show
create
table
t1
;
check
table
t1
;
drop
table
t1
;
--
let
charset
=
utf8
--
source
include
/
innodb
-
index
.
inc
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
),
d
varchar
(
20
),
primary
key
(
a
))
engine
=
innodb
default
charset
=
ucs2
;
insert
into
t1
values
(
1
,
1
,
'ab'
,
'ab'
),(
2
,
2
,
'ac'
,
'ac'
),(
3
,
2
,
'ad'
,
'ad'
),(
4
,
4
,
'afe'
,
'afe'
);
commit
;
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
);
insert
into
t1
values
(
8
,
9
,
'fff'
,
'fff'
);
select
*
from
t1
;
show
create
table
t1
;
alter
table
t1
add
index
(
b
);
insert
into
t1
values
(
10
,
10
,
'kkk'
,
'iii'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
show
create
table
t1
;
alter
table
t1
add
unique
index
(
c
),
add
index
(
d
);
insert
into
t1
values
(
11
,
11
,
'aaa'
,
'mmm'
);
select
*
from
t1
;
select
*
from
t1
force
index
(
b
)
order
by
b
;
select
*
from
t1
force
index
(
c
)
order
by
c
;
select
*
from
t1
force
index
(
d
)
order
by
d
;
explain
select
*
from
t1
force
index
(
b
)
order
by
b
;
explain
select
*
from
t1
force
index
(
c
)
order
by
c
;
explain
select
*
from
t1
force
index
(
d
)
order
by
d
;
show
create
table
t1
;
check
table
t1
;
drop
table
t1
;
--
let
charset
=
ucs2
--
source
include
/
innodb
-
index
.
inc
create
table
t1
(
a
int
not
null
,
b
int
)
engine
=
innodb
;
insert
into
t1
values
(
1
,
1
),(
1
,
1
),(
1
,
1
),(
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