[MDEV-15036] Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' in Diagnostics_area::set_ok_status or unexpected ER_RANGE_NOT_INCREASING_ERROR Created: 2018-01-22  Updated: 2018-02-23  Resolved: 2018-02-13

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables
Affects Version/s: 10.3
Fix Version/s: 10.3.5

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-15056 Partition pruning doesn't prune in sy... Closed

 Description   

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (a INT) WITH SYSTEM VERSIONING 
  PARTITION BY system_time LIMIT 2 ( PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION p3 HISTORY, PARTITION pn CURRENT );
 
INSERT INTO t1 VALUES (1),(2),(3);
UPDATE t1 SET a = 4;
DELETE FROM t1;
DELETE FROM t1 WHERE a IS NOT NULL;
 
# Cleanup
DROP TABLE t1;

10.3 ec32c050726bad8

mysqld: /data/src/10.3/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
180122 19:53:57 [ERROR] mysqld got signal 6 ;
 
#7  0x00007ffb7b32aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055dd9c373f12 in Diagnostics_area::set_ok_status (this=0x7ffb64005f20, affected_rows=0, last_insert_id=0, message=0x0) at /data/src/10.3/sql/sql_error.cc:335
#9  0x000055dd9c3234b6 in my_ok (thd=0x7ffb64000b00, affected_rows_arg=0, id=0, message=0x0) at /data/src/10.3/sql/sql_class.h:4728
#10 0x000055dd9c84a2b5 in mysql_delete (thd=0x7ffb64000b00, table_list=0x7ffb64014d30, conds=0x7ffb64015478, order_list=0x7ffb64005258, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:490
#11 0x000055dd9c3b3830 in mysql_execute_command (thd=0x7ffb64000b00) at /data/src/10.3/sql/sql_parse.cc:4899
#12 0x000055dd9c3bd2aa in mysql_parse (thd=0x7ffb64000b00, rawbuf=0x7ffb64014c38 "DELETE FROM t1 WHERE a IS NOT NULL", length=34, parser_state=0x7ffb755995f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7981
#13 0x000055dd9c3aaaef in dispatch_command (command=COM_QUERY, thd=0x7ffb64000b00, packet=0x7ffb6400b141 "DELETE FROM t1 WHERE a IS NOT NULL", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1826
#14 0x000055dd9c3a9523 in do_command (thd=0x7ffb64000b00) at /data/src/10.3/sql/sql_parse.cc:1370
#15 0x000055dd9c510768 in do_handle_one_connection (connect=0x55dd9f1ad0c0) at /data/src/10.3/sql/sql_connect.cc:1401
#16 0x000055dd9c5104f5 in handle_one_connection (arg=0x55dd9f1ad0c0) at /data/src/10.3/sql/sql_connect.cc:1307
#17 0x000055dd9c9ae0b8 in pfs_spawn_thread (arg=0x55dd9f1c88a0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#18 0x00007ffb7d001494 in start_thread (arg=0x7ffb7559a700) at pthread_create.c:333
#19 0x00007ffb7b3e793f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible with at least InnoDB and MyISAM.

Non-debug version produces an odd error:

DELETE FROM t1 WHERE a IS NOT NULL;
bug.assert1a                             [ fail ]
        Test ended at 2018-01-22 19:58:33
 
CURRENT_TEST: bug.assert1a
mysqltest: At line 9: query 'DELETE FROM t1 WHERE a IS NOT NULL' failed: 1493: VALUES LESS THAN value must be strictly increasing for each partition



 Comments   
Comment by Elena Stepanova [ 2018-02-03 ]

Another test case which causes unexpected ER_RANGE_NOT_INCREASING_ERROR, might be related. If not, please extract it into a separate JIRA item or let me know and I'll do so.

--source include/have_partition.inc
 
CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
INSERT INTO t1 VALUES (1),(2);
UPDATE t1 SET i = 3;
 
ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL 1 MONTH (PARTITION p1 HISTORY, PARTITION pn CURRENT);
ALTER TABLE t1 ADD PARTITION (PARTITION p2 HISTORY);
 
# Cleanup
DROP TABLE t1;

10.3 1951e7f05ae7

CURRENT_TEST: bug.t2
mysqltest: At line 8: query 'ALTER TABLE t1 ADD PARTITION (PARTITION p2 HISTORY)' failed: 1493: VALUES LESS THAN value must be strictly increasing for each partition

Comment by Elena Stepanova [ 2018-02-03 ]

Also, there is MDEV-15189 for vanilla and MDEV-15191 for versioning, might be related as well.

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