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
6881c96e
Commit
6881c96e
authored
Jul 20, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/ram/work/b28125/b28125.5.0
parents
4a52b5c8
100faf97
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+12
-1
mysql-test/t/innodb_mysql.test
mysql-test/t/innodb_mysql.test
+9
-0
sql/sql_table.cc
sql/sql_table.cc
+4
-2
No files found.
mysql-test/r/innodb_mysql.result
View file @
6881c96e
...
@@ -418,7 +418,7 @@ DROP TABLE t1,t2;
...
@@ -418,7 +418,7 @@ DROP TABLE t1,t2;
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
character set utf8 collate utf8_general_ci;
character set utf8 collate utf8_general_ci;
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 76
5
bytes
Warning 1071 Specified key was too long; max key length is 76
7
bytes
insert into t1 values('aaa');
insert into t1 values('aaa');
drop table t1;
drop table t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
...
@@ -735,6 +735,17 @@ COUNT(*)
...
@@ -735,6 +735,17 @@ COUNT(*)
3072
3072
set @@sort_buffer_size=default;
set @@sort_buffer_size=default;
DROP TABLE t1,t2;
DROP TABLE t1,t2;
create table t1(a text) engine=innodb default charset=utf8;
insert into t1 values('aaa');
alter table t1 add index(a(1024));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text,
KEY `a` (`a`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8
drop table if exists t1;
drop table if exists t1;
create table t1 (a int) engine=innodb;
create table t1 (a int) engine=innodb;
alter table t1 alter a set default 1;
alter table t1 alter a set default 1;
...
...
mysql-test/t/innodb_mysql.test
View file @
6881c96e
...
@@ -754,4 +754,13 @@ create table t1 (a int) engine=innodb;
...
@@ -754,4 +754,13 @@ create table t1 (a int) engine=innodb;
alter
table
t1
alter
a
set
default
1
;
alter
table
t1
alter
a
set
default
1
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #28125: ERROR 2013 when adding index.
#
create
table
t1
(
a
text
)
engine
=
innodb
default
charset
=
utf8
;
insert
into
t1
values
(
'aaa'
);
alter
table
t1
add
index
(
a
(
1024
));
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
sql/sql_table.cc
View file @
6881c96e
...
@@ -1357,6 +1357,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -1357,6 +1357,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
length
);
length
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_TOO_LONG_KEY
,
warn_buff
);
ER_TOO_LONG_KEY
,
warn_buff
);
/* Align key length to multibyte char boundary */
length
-=
length
%
sql_field
->
charset
->
mbmaxlen
;
}
}
else
else
{
{
...
@@ -1387,8 +1389,6 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -1387,8 +1389,6 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
if
(
length
>
file
->
max_key_part_length
()
&&
key
->
type
!=
Key
::
FULLTEXT
)
if
(
length
>
file
->
max_key_part_length
()
&&
key
->
type
!=
Key
::
FULLTEXT
)
{
{
length
=
file
->
max_key_part_length
();
length
=
file
->
max_key_part_length
();
/* Align key length to multibyte char boundary */
length
-=
length
%
sql_field
->
charset
->
mbmaxlen
;
if
(
key
->
type
==
Key
::
MULTIPLE
)
if
(
key
->
type
==
Key
::
MULTIPLE
)
{
{
/* not a critical problem */
/* not a critical problem */
...
@@ -1397,6 +1397,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -1397,6 +1397,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
length
);
length
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_TOO_LONG_KEY
,
warn_buff
);
ER_TOO_LONG_KEY
,
warn_buff
);
/* Align key length to multibyte char boundary */
length
-=
length
%
sql_field
->
charset
->
mbmaxlen
;
}
}
else
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