Commit graph

4 commits

Author SHA1 Message Date
Michael Widenius
1cb4caa66d MDEV-15970 Crash when doing truncate on locked sequence
Problem was that we used table->s->db_type() for accessing
handlerton of opened file instead of table->file->ht

Other bug fixed:
- Ensure that we set error if reopen_tables() fails
  (This was the cause of assert)
2018-05-14 10:08:05 +03:00
Monty
57c3dd991b MDEV-15106 Unexpected ER_WRONG_INSERT_INTO_SEQUENCE upon INSERT with multiple locks on sequences
Fixed by removing the check of single lock in sequence insert and let MDL
code handle deadlock detection
2018-05-03 17:49:39 +03:00
Michael Widenius
e27bfeca6a Added test case for MDEV-15742 to prove that it works
MDEV-15742 Assertion `table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type == 1' failed in handler::ha_write_row
2018-04-06 12:31:13 +03:00
Monty
7d2e283562 Fix for MDEV-14831
MDEV-14831 CREATE OR REPLACE SEQUENCE under LOCK TABLE corrupts the
sequence, causes ER_KEY_NOT_FOUND

The problem was that sequence_insert didn't properly handle the case
where there where there was a LOCK TABLE while creating the sequence.

Fixed by opening the sequence table, for inserting the first record, in
a new environment without any other open tables.

Found also a bug in Locked_tables_list::reopen_tables() where the lock
structure for the new tables was allocated in THD::mem_root, which causes
crashes. This could cause problems with other create tables done under
LOCK TABLES.
2018-04-02 12:42:48 +03:00