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
5df3be70
Commit
5df3be70
authored
Dec 01, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-5.0-keysize
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
9dcae047
4b4f7f76
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
5 deletions
+67
-5
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+14
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+14
-0
mysql-test/t/bdb.test
mysql-test/t/bdb.test
+19
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+19
-0
sql/unireg.h
sql/unireg.h
+1
-5
No files found.
mysql-test/r/bdb.result
View file @
5df3be70
...
...
@@ -1891,3 +1891,17 @@ t1 CREATE TABLE `t1` (
)
ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
create table t1 (a varchar(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
d varchar(255) character set utf8,
key (a,b,c,d)) engine=bdb;
drop table t1;
create table t1 (a varchar(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
d varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=bdb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
End of 5.0 tests
mysql-test/r/innodb.result
View file @
5df3be70
...
...
@@ -2772,3 +2772,17 @@ insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
drop table t1;
drop table t2;
commit;
create table t1 (a varchar(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
d varchar(255) character set utf8,
key (a,b,c,d)) engine=innodb;
drop table t1;
create table t1 (a varchar(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
d varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=innodb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
End of 5.0 tests
mysql-test/t/bdb.test
View file @
5df3be70
...
...
@@ -974,3 +974,22 @@ drop table t1;
# End varchar test
eval
set
storage_engine
=
$default
;
#
# Test that we can create a large key
#
create
table
t1
(
a
varchar
(
255
)
character
set
utf8
,
b
varchar
(
255
)
character
set
utf8
,
c
varchar
(
255
)
character
set
utf8
,
d
varchar
(
255
)
character
set
utf8
,
key
(
a
,
b
,
c
,
d
))
engine
=
bdb
;
drop
table
t1
;
--
error
ER_TOO_LONG_KEY
create
table
t1
(
a
varchar
(
255
)
character
set
utf8
,
b
varchar
(
255
)
character
set
utf8
,
c
varchar
(
255
)
character
set
utf8
,
d
varchar
(
255
)
character
set
utf8
,
e
varchar
(
255
)
character
set
utf8
,
key
(
a
,
b
,
c
,
d
,
e
))
engine
=
bdb
;
--
echo
End
of
5.0
tests
mysql-test/t/innodb.test
View file @
5df3be70
...
...
@@ -1751,3 +1751,22 @@ insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
drop
table
t1
;
drop
table
t2
;
commit
;
#
# Test that we can create a large (>1K) key
#
create
table
t1
(
a
varchar
(
255
)
character
set
utf8
,
b
varchar
(
255
)
character
set
utf8
,
c
varchar
(
255
)
character
set
utf8
,
d
varchar
(
255
)
character
set
utf8
,
key
(
a
,
b
,
c
,
d
))
engine
=
innodb
;
drop
table
t1
;
--
error
ER_TOO_LONG_KEY
create
table
t1
(
a
varchar
(
255
)
character
set
utf8
,
b
varchar
(
255
)
character
set
utf8
,
c
varchar
(
255
)
character
set
utf8
,
d
varchar
(
255
)
character
set
utf8
,
e
varchar
(
255
)
character
set
utf8
,
key
(
a
,
b
,
c
,
d
,
e
))
engine
=
innodb
;
--
echo
End
of
5.0
tests
sql/unireg.h
View file @
5df3be70
...
...
@@ -50,11 +50,7 @@
#define MAX_SYS_VAR_LENGTH 32
#define MAX_KEY 64
/* Max used keys */
#define MAX_REF_PARTS 16
/* Max parts used as ref */
#if SIZEOF_CHARP > 4
#define MAX_KEY_LENGTH 3072
/* max possible key, if 64 bits */
#else
#define MAX_KEY_LENGTH 1024
/* max possible key, if 32 bits */
#endif
#define MAX_KEY_LENGTH 3072
/* max possible key */
#if SIZEOF_OFF_T > 4
#define MAX_REFLENGTH 8
/* Max length for record ref */
#else
...
...
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