Skip to content

Commit 11d1ac7

Browse files
MDEV-35856 Remove error code introduced to 10.11 in MDEV-36032
Two new error codes ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS and ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS were introduced in MDEV-36032 in both 10.11 and, as part of MDEV-22491, 12.0. Here we remove them from 10.11, but they should remain in 12.0.
1 parent 28d6530 commit 11d1ac7

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

mysql-test/suite/sql_sequence/alter.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ create sequence s;
426426
alter table s sequence=0;
427427
insert into s values (3,1,9223372036854775806,1,1,1000,0,0);
428428
alter table s sequence=1;
429-
ERROR HY000: More than one row in the table
429+
ERROR HY000: Internal error: More than one row in the table
430430
drop table s;
431431
create sequence s;
432432
alter table s sequence=0;
@@ -475,17 +475,17 @@ CREATE TABLE `s1` (
475475
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
476476
) ENGINE=innodb;
477477
alter table s1 sequence=1;
478-
ERROR HY000: Fewer than one row in the table
478+
ERROR HY000: Internal error: Fewer than one row in the table
479479
alter table s1 sequence=0;
480480
insert into s1 values (1,1,9223372036854775806,1,1,1000,0,0);
481481
alter table s1 sequence=1;
482482
alter table s1 sequence=0;
483483
insert into s1 values (2,1,9223372036854775806,1,1,1000,0,0);
484484
alter table s1 sequence=1;
485-
ERROR HY000: More than one row in the table
485+
ERROR HY000: Internal error: More than one row in the table
486486
alter table s1 sequence=0;
487487
insert into s1 values (3,1,9223372036854775806,1,1,1000,0,0);
488488
alter table s1 sequence=1;
489-
ERROR HY000: More than one row in the table
489+
ERROR HY000: Internal error: More than one row in the table
490490
drop table s1;
491491
# End of 10.11 tests

mysql-test/suite/sql_sequence/alter.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ DROP SEQUENCE s2;
304304
create sequence s;
305305
alter table s sequence=0;
306306
insert into s values (3,1,9223372036854775806,1,1,1000,0,0);
307-
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
307+
--error ER_INTERNAL_ERROR
308308
alter table s sequence=1;
309309
drop table s;
310310

@@ -355,7 +355,7 @@ CREATE TABLE `s1` (
355355
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
356356
) ENGINE=innodb;
357357

358-
--error ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS
358+
--error ER_INTERNAL_ERROR
359359
alter table s1 sequence=1;
360360
# (for coverage) alter a non sequence table with sequence=0
361361
alter table s1 sequence=0;
@@ -364,13 +364,13 @@ alter table s1 sequence=1;
364364

365365
alter table s1 sequence=0;
366366
insert into s1 values (2,1,9223372036854775806,1,1,1000,0,0);
367-
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
367+
--error ER_INTERNAL_ERROR
368368
alter table s1 sequence=1;
369369

370370
# (for coverage) alter a non sequence table with sequence=0
371371
alter table s1 sequence=0;
372372
insert into s1 values (3,1,9223372036854775806,1,1,1000,0,0);
373-
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
373+
--error ER_INTERNAL_ERROR
374374
alter table s1 sequence=1;
375375

376376
drop table s1;

sql/share/errmsg-utf8.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10758,7 +10758,3 @@ ER_CM_OPTION_MISSING_REQUIREMENT
1075810758
eng "CHANGE MASTER TO option '%s=%s' is missing requirement %s"
1075910759
ER_SLAVE_STATEMENT_TIMEOUT 70100
1076010760
eng "Slave log event execution was interrupted (slave_max_statement_time exceeded)"
10761-
ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS
10762-
eng "Fewer than one row in the table"
10763-
ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
10764-
eng "More than one row in the table"

sql/sql_table.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12159,9 +12159,9 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
1215912159
from->file->stats.records != 1)
1216012160
{
1216112161
if (from->file->stats.records > 1)
12162-
my_error(ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS, MYF(0));
12162+
my_error(ER_INTERNAL_ERROR, MYF(0), "More than one row in the table");
1216312163
else
12164-
my_error(ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS, MYF(0));
12164+
my_error(ER_INTERNAL_ERROR, MYF(0), "Fewer than one row in the table");
1216512165
goto err;
1216612166
}
1216712167
for (Field **ptr=to->field ; *ptr ; ptr++)
@@ -12349,7 +12349,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
1234912349
}
1235012350
if (to->s->table_type == TABLE_TYPE_SEQUENCE && found_count == 1)
1235112351
{
12352-
my_error(ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS, MYF(0));
12352+
my_error(ER_INTERNAL_ERROR, MYF(0), "More than one row in the table");
1235312353
error= 1;
1235412354
break;
1235512355
}
@@ -12374,7 +12374,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
1237412374

1237512375
if (to->s->table_type == TABLE_TYPE_SEQUENCE && found_count == 0)
1237612376
{
12377-
my_error(ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS, MYF(0));
12377+
my_error(ER_INTERNAL_ERROR, MYF(0), "Fewer than one row in the table");
1237812378
error= 1;
1237912379
}
1238012380

0 commit comments

Comments
 (0)