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
685f665b
Commit
685f665b
authored
Sep 17, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: ha_innobase::add_index(): Translate DB_TOO_BIG_RECORD
via my_error(). Add a test case to innodb-index.test.
parent
8763d941
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
handler/handler0alter.cc
handler/handler0alter.cc
+4
-0
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+2
-0
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+2
-0
No files found.
handler/handler0alter.cc
View file @
685f665b
...
...
@@ -720,10 +720,14 @@ error_handling:
error
=
row_merge_drop_table
(
trx
,
innodb_table
);
goto
convert_error
;
case
DB_TOO_BIG_RECORD
:
my_error
(
HA_ERR_TO_BIG_ROW
,
MYF
(
0
));
goto
error
;
case
DB_PRIMARY_KEY_IS_NULL
:
my_error
(
ER_PRIMARY_CANT_HAVE_NULL
,
MYF
(
0
));
/* fall through */
case
DB_DUPLICATE_KEY
:
error:
prebuilt
->
trx
->
error_info
=
NULL
;
prebuilt
->
trx
->
error_key_num
=
trx
->
error_key_num
;
/* fall through */
...
...
mysql-test/innodb-index.result
View file @
685f665b
...
...
@@ -1031,6 +1031,8 @@ NULL NULL NULL null
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,b(255),c(255)), add key (b(255));
ERROR HY000: Too big row
alter table t1 add primary key (a), add key (b(20));
select count(*) from t1 where a=44;
count(*)
...
...
mysql-test/innodb-index.test
View file @
685f665b
...
...
@@ -317,6 +317,8 @@ select a,length(b),length(c),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
139
alter
table
t1
add
primary
key
(
a
,
b
(
255
),
c
(
255
)),
add
key
(
b
(
255
));
alter
table
t1
add
primary
key
(
a
),
add
key
(
b
(
20
));
select
count
(
*
)
from
t1
where
a
=
44
;
select
a
,
b
=
repeat
(
d
,
100
*
a
),
c
=
repeat
(
d
,
20
*
a
)
from
t1
;
...
...
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