Skip to content
Permalink
Browse files
MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in Lo…
…cked_tables_list::unlock_locked_table

fix_length_and_dec now return result (error/OK)
  • Loading branch information
sanja-byelkin committed Jun 15, 2018
1 parent c55de8d commit 6b8802e
Show file tree
Hide file tree
Showing 26 changed files with 778 additions and 518 deletions.
@@ -2369,5 +2369,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
#
# MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed
# in Locked_tables_list::unlock_locked_tables
#
CREATE TABLE t1 (d DATETIME DEFAULT CURRENT_TIMESTAMP, i INT) ENGINE=InnoDB;
INSERT INTO t1 (i) VALUES (1),(1);
LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD UNIQUE(i);
ERROR 23000: Duplicate entry '1' for key 'i'
UNLOCK TABLES;
DROP TABLE t1;
#
# End of 10.2 tests
#
@@ -1931,6 +1931,22 @@ alter table t1 change b new_b int not null, add column b char(1), add constraint
show create table t1;
drop table t1;

--echo #
--echo # MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed
--echo # in Locked_tables_list::unlock_locked_tables
--echo #

CREATE TABLE t1 (d DATETIME DEFAULT CURRENT_TIMESTAMP, i INT) ENGINE=InnoDB;
INSERT INTO t1 (i) VALUES (1),(1);
LOCK TABLE t1 WRITE;
--error ER_DUP_ENTRY
ALTER TABLE t1 ADD UNIQUE(i);

# Cleanup
UNLOCK TABLES;
DROP TABLE t1;


--echo #
--echo # End of 10.2 tests
--echo #
@@ -4211,7 +4211,7 @@ class Item_func_or_sum: public Item_result_field,
also to make printing of items inherited from Item_sum uniform.
*/
virtual const char *func_name() const= 0;
virtual void fix_length_and_dec()= 0;
virtual bool fix_length_and_dec()= 0;
bool const_item() const { return const_item_cache; }
table_map used_tables() const { return used_tables_cache; }
Item* build_clone(THD *thd, MEM_ROOT *mem_root);

0 comments on commit 6b8802e

Please sign in to comment.