1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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.
This commit is contained in:
Yuchen Pei
2025-06-04 15:16:54 +10:00
parent 28d6530571
commit 11d1ac7285
4 changed files with 12 additions and 16 deletions

View File

@@ -426,7 +426,7 @@ create sequence s;
alter table s sequence=0;
insert into s values (3,1,9223372036854775806,1,1,1000,0,0);
alter table s sequence=1;
ERROR HY000: More than one row in the table
ERROR HY000: Internal error: More than one row in the table
drop table s;
create sequence s;
alter table s sequence=0;
@@ -475,17 +475,17 @@ CREATE TABLE `s1` (
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
) ENGINE=innodb;
alter table s1 sequence=1;
ERROR HY000: Fewer than one row in the table
ERROR HY000: Internal error: Fewer than one row in the table
alter table s1 sequence=0;
insert into s1 values (1,1,9223372036854775806,1,1,1000,0,0);
alter table s1 sequence=1;
alter table s1 sequence=0;
insert into s1 values (2,1,9223372036854775806,1,1,1000,0,0);
alter table s1 sequence=1;
ERROR HY000: More than one row in the table
ERROR HY000: Internal error: More than one row in the table
alter table s1 sequence=0;
insert into s1 values (3,1,9223372036854775806,1,1,1000,0,0);
alter table s1 sequence=1;
ERROR HY000: More than one row in the table
ERROR HY000: Internal error: More than one row in the table
drop table s1;
# End of 10.11 tests

View File

@@ -304,7 +304,7 @@ DROP SEQUENCE s2;
create sequence s;
alter table s sequence=0;
insert into s values (3,1,9223372036854775806,1,1,1000,0,0);
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
--error ER_INTERNAL_ERROR
alter table s sequence=1;
drop table s;
@@ -355,7 +355,7 @@ CREATE TABLE `s1` (
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
) ENGINE=innodb;
--error ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS
--error ER_INTERNAL_ERROR
alter table s1 sequence=1;
# (for coverage) alter a non sequence table with sequence=0
alter table s1 sequence=0;
@@ -364,13 +364,13 @@ alter table s1 sequence=1;
alter table s1 sequence=0;
insert into s1 values (2,1,9223372036854775806,1,1,1000,0,0);
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
--error ER_INTERNAL_ERROR
alter table s1 sequence=1;
# (for coverage) alter a non sequence table with sequence=0
alter table s1 sequence=0;
insert into s1 values (3,1,9223372036854775806,1,1,1000,0,0);
--error ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
--error ER_INTERNAL_ERROR
alter table s1 sequence=1;
drop table s1;

View File

@@ -10758,7 +10758,3 @@ ER_CM_OPTION_MISSING_REQUIREMENT
eng "CHANGE MASTER TO option '%s=%s' is missing requirement %s"
ER_SLAVE_STATEMENT_TIMEOUT 70100
eng "Slave log event execution was interrupted (slave_max_statement_time exceeded)"
ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS
eng "Fewer than one row in the table"
ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS
eng "More than one row in the table"

View File

@@ -12159,9 +12159,9 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
from->file->stats.records != 1)
{
if (from->file->stats.records > 1)
my_error(ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS, MYF(0));
my_error(ER_INTERNAL_ERROR, MYF(0), "More than one row in the table");
else
my_error(ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS, MYF(0));
my_error(ER_INTERNAL_ERROR, MYF(0), "Fewer than one row in the table");
goto err;
}
for (Field **ptr=to->field ; *ptr ; ptr++)
@@ -12349,7 +12349,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
}
if (to->s->table_type == TABLE_TYPE_SEQUENCE && found_count == 1)
{
my_error(ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS, MYF(0));
my_error(ER_INTERNAL_ERROR, MYF(0), "More than one row in the table");
error= 1;
break;
}
@@ -12374,7 +12374,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore,
if (to->s->table_type == TABLE_TYPE_SEQUENCE && found_count == 0)
{
my_error(ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS, MYF(0));
my_error(ER_INTERNAL_ERROR, MYF(0), "Fewer than one row in the table");
error= 1;
}