[MDEV-17580] Assertion `! is_set()' failed in Diagnostics_area::set_ok_status upon ADD CHECK on table with unsupported option Created: 2018-10-31  Updated: 2021-04-03  Resolved: 2021-04-03

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.0, 10.1
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

SET SESSION SQL_MODE='';
CREATE TABLE t1 (a INT) ENGINE=MyISAM TRANSACTIONAL=1;
SET SESSION SQL_MODE='STRICT_ALL_TABLES';
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ADD CHECK (a <= 1);
 
# Cleanup
DROP TABLE t1;

10.1 5b735e8f09c

mysqld: /data/src/10.1/sql/sql_error.cc:378: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `! is_set()' failed.
181031 15:16:49 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f8acd926ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000563f27e689c6 in Diagnostics_area::set_ok_status (this=0x7f8ac68da000, affected_rows=0, last_insert_id=0, message=0x7f8acf9a4750 "Records: 0  Duplicates: 0  Warnings: 1") at /data/src/10.1/sql/sql_error.cc:378
#9  0x0000563f27e2120b in my_ok (thd=0x7f8ac68d5070, affected_rows=0, id=0, message=0x7f8acf9a4750 "Records: 0  Duplicates: 0  Warnings: 1") at /data/src/10.1/sql/sql_class.h:4183
#10 0x0000563f27f5bde8 in mysql_alter_table (thd=0x7f8ac68d5070, new_db=0x7f8ac4c43768 "test", new_name=0x0, create_info=0x7f8acf9a5300, table_list=0x7f8ac4c43178, alter_info=0x7f8acf9a5270, order_num=0, order=0x0, ignore=false) at /data/src/10.1/sql/sql_table.cc:9419
#11 0x0000563f27fcc3d3 in Sql_cmd_alter_table::execute (this=0x7f8ac4c43a68, thd=0x7f8ac68d5070) at /data/src/10.1/sql/sql_alter.cc:330
#12 0x0000563f27e9af2c in mysql_execute_command (thd=0x7f8ac68d5070) at /data/src/10.1/sql/sql_parse.cc:5699
#13 0x0000563f27e9f7cf in mysql_parse (thd=0x7f8ac68d5070, rawbuf=0x7f8ac4c43088 "ALTER TABLE t1 ADD CHECK (a <= 1)", length=33, parser_state=0x7f8acf9a65e0) at /data/src/10.1/sql/sql_parse.cc:7465
#14 0x0000563f27e8e042 in dispatch_command (command=COM_QUERY, thd=0x7f8ac68d5070, packet=0x7f8ac93f9071 "ALTER TABLE t1 ADD CHECK (a <= 1)", packet_length=33) at /data/src/10.1/sql/sql_parse.cc:1495
#15 0x0000563f27e8cdc7 in do_command (thd=0x7f8ac68d5070) at /data/src/10.1/sql/sql_parse.cc:1124
#16 0x0000563f27fc790e in do_handle_one_connection (thd_arg=0x7f8ac68d5070) at /data/src/10.1/sql/sql_connect.cc:1330
#17 0x0000563f27fc7672 in handle_one_connection (arg=0x7f8ac68d5070) at /data/src/10.1/sql/sql_connect.cc:1242
#18 0x0000563f283855fe in pfs_spawn_thread (arg=0x7f8acd039ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
#19 0x00007f8acf62a494 in start_thread (arg=0x7f8acf9a7b00) at pthread_create.c:333
#20 0x00007f8acd9e393f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible on 10.0, 10.1 with at least MyISAM and InnoDB.
Not reproducible on 5.5, 10.2, 10.3, 10.4.
No visible effect on a non-debug build.



 Comments   
Comment by Elena Stepanova [ 2021-04-03 ]

Closing as 10.2+ are not affected, and 10.1 is now EOL.

Generated at Thu Feb 08 08:37:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.