mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
branches/zip: ha_innobase::add_index(): Translate DB_TOO_BIG_RECORD
via my_error(). Add a test case to innodb-index.test.
This commit is contained in:
parent
8763d94169
commit
685f665b06
3 changed files with 8 additions and 0 deletions
|
@ -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 */
|
||||
|
|
|
@ -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(*)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue