mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-17725 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status upon ALTER failing due to error from engine
This commit is contained in:
@ -22,3 +22,19 @@ alter table t1 change column id2 id4 varchar(100) not null;
|
|||||||
select * from t1 where id4 like 'a';
|
select * from t1 where id4 like 'a';
|
||||||
id1 id4 id3
|
id1 id4 id3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-17725 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status upon ALTER failing due to error from engine
|
||||||
|
#
|
||||||
|
SET sql_mode=STRICT_ALL_TABLES;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ORDER BY a;
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET sql_mode='';
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ORDER BY a;
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET sql_mode=DEFAULT;
|
||||||
|
@ -22,3 +22,19 @@ create table t1 (
|
|||||||
alter table t1 change column id2 id4 varchar(100) not null;
|
alter table t1 change column id2 id4 varchar(100) not null;
|
||||||
select * from t1 where id4 like 'a';
|
select * from t1 where id4 like 'a';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-17725 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status upon ALTER failing due to error from engine
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET sql_mode=STRICT_ALL_TABLES;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ORDER BY a;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET sql_mode='';
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ORDER BY a;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET sql_mode=DEFAULT;
|
||||||
|
@ -10021,11 +10021,14 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
|||||||
to->file->ha_table_flags() & HA_TABLE_SCAN_ON_INDEX)
|
to->file->ha_table_flags() & HA_TABLE_SCAN_ON_INDEX)
|
||||||
{
|
{
|
||||||
char warn_buff[MYSQL_ERRMSG_SIZE];
|
char warn_buff[MYSQL_ERRMSG_SIZE];
|
||||||
|
bool save_abort_on_warning= thd->abort_on_warning;
|
||||||
|
thd->abort_on_warning= false;
|
||||||
my_snprintf(warn_buff, sizeof(warn_buff),
|
my_snprintf(warn_buff, sizeof(warn_buff),
|
||||||
"ORDER BY ignored as there is a user-defined clustered index"
|
"ORDER BY ignored as there is a user-defined clustered index"
|
||||||
" in the table '%-.192s'", from->s->table_name.str);
|
" in the table '%-.192s'", from->s->table_name.str);
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
|
||||||
warn_buff);
|
warn_buff);
|
||||||
|
thd->abort_on_warning= save_abort_on_warning;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user