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
80927016
Commit
80927016
authored
Sep 21, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: innodb-index.test: Add yet another CHECK TABLE and add the
column d to two SELECT FROM t1.
parent
619fd43a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
47 deletions
+51
-47
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+48
-45
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+3
-2
No files found.
mysql-test/innodb-index.result
View file @
80927016
...
...
@@ -1026,62 +1026,65 @@ select count(*) from t1 where a=44;
count(*)
5
select a,
length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a) from t1;
a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a)
NULL NULL NULL NULL NULL
22 22000 1 4400 1
22 35200 1 7040 1
22 28600 1 5720 1
22 26400 1 5280 1
22 22000 1 4400 1
33 33000 1 6600 1
33 52800 1 10560 1
33 42900 1 8580 1
33 39600 1 7920 1
33 33000 1 6600 1
44 44000 1 8800 1
44 65535 1 14080 1
44 57200 1 11440 1
44 52800 1 10560 1
44 44000 1 8800 1
55 55000 1 11000 1
55 65535 1 17600 1
55 65535 1 14300 1
55 65535 1 13200 1
55 55000 1 11000 1
66 65535 1 13200 1
66 65535 1 21120 1
66 65535 1 17160 1
66 65535 1 15840 1
66 65535 1 13200 1
length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a)
,d
from t1;
a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a)
d
NULL NULL NULL NULL NULL
null
22 22000 1 4400 1
adfd72nh9k
22 35200 1 7040 1
adfdijn0loKNHJik
22 28600 1 5720 1
adfdijnmnb78k
22 26400 1 5280 1
adfdpplkeock
22 22000 1 4400 1
jejdkrun87
33 33000 1 6600 1
adfd72nh9k
33 52800 1 10560 1
adfdijn0loKNHJik
33 42900 1 8580 1
adfdijnmnb78k
33 39600 1 7920 1
adfdpplkeock
33 33000 1 6600 1
jejdkrun87
44 44000 1 8800 1
adfd72nh9k
44 65535 1 14080 1
adfdijn0loKNHJik
44 57200 1 11440 1
adfdijnmnb78k
44 52800 1 10560 1
adfdpplkeock
44 44000 1 8800 1
jejdkrun87
55 55000 1 11000 1
adfd72nh9k
55 65535 1 17600 1
adfdijn0loKNHJik
55 65535 1 14300 1
adfdijnmnb78k
55 65535 1 13200 1
adfdpplkeock
55 55000 1 11000 1
jejdkrun87
66 65535 1 13200 1
adfd72nh9k
66 65535 1 21120 1
adfdijn0loKNHJik
66 65535 1 17160 1
adfdijnmnb78k
66 65535 1 15840 1
adfdpplkeock
66 65535 1 13200 1
jejdkrun87
alter table t1 add primary key (a), add key (b(20));
ERROR 42000: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
delete from t1 where d='null';
alter table t1 add primary key (a), add key (b(20));
ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
delete from t1 where a%2;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
alter table t1 add primary key (a,b(255),c(255)), add key (b(767));
select count(*) from t1 where a=44;
count(*)
5
select a,
length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a) from t1;
a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a)
22 22000 1 4400 1
22 35200 1 7040 1
22 28600 1 5720 1
22 26400 1 5280 1
22 22000 1 4400 1
44 44000 1 8800 1
44 65535 1 14080 1
44 57200 1 11440 1
44 52800 1 10560 1
44 44000 1 8800 1
66 65535 1 13200 1
66 65535 1 21120 1
66 65535 1 17160 1
66 65535 1 15840 1
66 65535 1 13200 1
length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a)
,d
from t1;
a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a)
d
22 22000 1 4400 1
adfd72nh9k
22 35200 1 7040 1
adfdijn0loKNHJik
22 28600 1 5720 1
adfdijnmnb78k
22 26400 1 5280 1
adfdpplkeock
22 22000 1 4400 1
jejdkrun87
44 44000 1 8800 1
adfd72nh9k
44 65535 1 14080 1
adfdijn0loKNHJik
44 57200 1 11440 1
adfdijnmnb78k
44 52800 1 10560 1
adfdpplkeock
44 44000 1 8800 1
jejdkrun87
66 65535 1 13200 1
adfd72nh9k
66 65535 1 21120 1
adfdijn0loKNHJik
66 65535 1 17160 1
adfdijnmnb78k
66 65535 1 15840 1
adfdpplkeock
66 65535 1 13200 1
jejdkrun87
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/innodb-index.test
View file @
80927016
...
...
@@ -323,17 +323,18 @@ select a,left(repeat(d,100*a),65535),repeat(d,20*a),d from t2,t3;
drop
table
t2
,
t3
;
select
count
(
*
)
from
t1
where
a
=
44
;
select
a
,
length
(
b
),
b
=
left
(
repeat
(
d
,
100
*
a
),
65535
),
length
(
c
),
c
=
repeat
(
d
,
20
*
a
)
from
t1
;
length
(
b
),
b
=
left
(
repeat
(
d
,
100
*
a
),
65535
),
length
(
c
),
c
=
repeat
(
d
,
20
*
a
)
,
d
from
t1
;
--
error
ER_PRIMARY_CANT_HAVE_NULL
alter
table
t1
add
primary
key
(
a
),
add
key
(
b
(
20
));
delete
from
t1
where
d
=
'null'
;
--
error
ER_DUP_ENTRY
alter
table
t1
add
primary
key
(
a
),
add
key
(
b
(
20
));
delete
from
t1
where
a
%
2
;
check
table
t1
;
alter
table
t1
add
primary
key
(
a
,
b
(
255
),
c
(
255
)),
add
key
(
b
(
767
));
select
count
(
*
)
from
t1
where
a
=
44
;
select
a
,
length
(
b
),
b
=
left
(
repeat
(
d
,
100
*
a
),
65535
),
length
(
c
),
c
=
repeat
(
d
,
20
*
a
)
from
t1
;
length
(
b
),
b
=
left
(
repeat
(
d
,
100
*
a
),
65535
),
length
(
c
),
c
=
repeat
(
d
,
20
*
a
)
,
d
from
t1
;
show
create
table
t1
;
check
table
t1
;
explain
select
*
from
t1
where
b
like
'adfd%'
;
...
...
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