summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sql_sequence
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2021-08-312-0/+22
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-08-312-0/+22
| |\
| | * MDEV 22785 Crash with prepared statements and NEXTVAL()Michael Widenius2021-08-262-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | The problem was that a PREARE followed by a non prepared statement using DEFAULT NEXT_VALUE() could change table->next_local to point to a not persitent memory aria. The next EXECUTE would then try to use the wrong pointer, which could cause a crash. Fixed by reseting the pointer to it's old value when doing EXECUTE.
| * | Merge branch 10.3 into 10.4Daniel Black2021-07-021-0/+2
| |\ \ | | |/
| | * mtr: fix tests funcs_1.is_tables_is & sql_sequence.rebuildDaniel Black2021-07-021-0/+2
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2021-04-272-0/+32
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2021-04-272-0/+32
| |\ \ | | |/
| | * MDEV-24545 Sequence created by one connection remains invisible to anotherst-10.3Marko Mäkelä2021-04-272-0/+32
| | | | | | | | | | | | | | | | | | row_merge_is_index_usable(): Allow access to any SEQUENCE, even if it was created after the read view. SQL sequences are no-rollback tables with no history at all.
* | | Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-152-0/+53
|\ \ \ | |/ /
| * | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-122-0/+53
| |\ \ | | |/ | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | * MDEV-21785: sequences used as default by other table not dumped in right ↵bb-10.3-MDEV-21785Oleksandr Byelkin2021-01-262-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order by mysqldump Dump sequences first. This atch made to keep it small and to keep number of queries to the server the same. Order of tables in a dump can not be changed (except sequences first) because mysql_list_tables uses SHOW TABLES and I used SHOW FULL TABLES.
* | | Merge commit '10.4' into 10.5Oleksandr Byelkin2021-01-062-0/+120
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-12-234-2/+125
| |\ \ | | |/
| | * MDEV-19273: Server crash in MDL_ticket::has_stronger_or_equal_type or ↵bb-10.3-MDEV-19273Oleksandr Byelkin2020-12-094-2/+125
| | | | | | | | | | | | | | | | | | | | | | | | Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str, table->table_name.str, MDL_SHARED)' failed in mysql_rm_table_no_locks Early report error in case of DROP SEQUENCE <non-sequence> Do not use error variable for other purposes except error.
* | | Merge 10.4 into 10.5Marko Mäkelä2020-10-303-28/+16
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-10-293-28/+16
| |\ \ | | |/
| | * MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVALAnel Husakovic2020-10-272-0/+12
| | | | | | | | | | | | Reviewed-by: wlad@mariadb.com
| | * MDEV-21786 mysqldump will forget sequence definition details on --no-data dumpAnel Husakovic2020-10-231-28/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Original patch was contributed by Jani Tolonen <jani.k.tolonen@gmail.com> https://github.com/an3l/server/commits/bb-10.3-anel-MDEV-21786-dump-sequence which distinguishes data structure (linked list) of sequences from tables. - Added standard sql output to prevent future changes of sequences and disabled locks for sequences. - Added test case for `MDEV-20070: mysqldump won't work correct on sequences` where table column depends on sequence value. - Restore sequence last value in the following way: - Find `next_not_cached_value` and use it to `setval()` - We just need for logical restore, so don't execute `setval()` - `setval()` should be showed also in case of `--no-data` option. Reviewed-by: daniel@mariadb.org
* | | Merge branch '10.4' into 10.5Sujatha2020-09-292-0/+19
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Sujatha2020-09-282-0/+19
| |\ \ | | |/
| | * MDEV-23823 Crash in SELECT NEXT VALUE on locked viewVladislav Vaintroub2020-09-282-0/+19
| | | | | | | | | | | | | | | Make open_table() fail if sequence should be opened, but it turns out to be locked view.
* | | Merge 10.4 into 10.5Marko Mäkelä2020-07-212-0/+32
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-07-212-0/+32
| |\ \ | | |/
| | * MDEV-16929 Assertion ... in close_thread_tables upon killing connectionMonty2020-07-212-0/+32
| | | | | | | | | | | | | | | Problem was that the code didn't handle a transaction created in innodb as part of a failed mysql_lock_tables()
* | | Make error messages from DROP TABLE and DROP TABLE IF EXISTS consistentMonty2020-06-143-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - IF EXISTS ends with a list of all not existing object, instead of a separate note for every not existing object - Produce a "Note" for all wrongly dropped objects (like trying to do DROP SEQUENCE for a normal table) - Do not write existing tables that could not be dropped to binlog Other things: MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to drop parent table referenced by FK This was caused by an older version of this commit patch and later fixed
* | | Merge 10.4 into 10.5Marko Mäkelä2020-06-084-0/+108
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-06-084-0/+108
| |\ \ | | |/
| | * Don't allow ALTER TABLE ... ORDER BY on SEQUENCE objectsMonty2020-06-072-0/+18
| | | | | | | | | | | | | | | MDEV-19320 Sequence gets corrupted and produces ER_KEY_NOT_FOUND (Can't find record) after ALTER .. ORDER BY
| | * Don't allow illegal create options for SEQUENCEMonty2020-06-074-0/+90
| | | | | | | | | | | | | | | MDEV-19977 Assertion `(0xFUL & mode) == LOCK_S || (0xFUL & mode) == LOCK_X' failed in lock_rec_lock
* | | Merge 10.4 into 10.5Marko Mäkelä2020-04-291-0/+1
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2020-04-271-0/+1
| |\ \ | | |/
| | * Flag a result dependency on PLUGIN_PERFSCHEMAMarko Mäkelä2020-04-271-0/+1
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2020-04-251-1/+1
|\ \ \ | |/ / | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | Merge 10.3 into 10.4Marko Mäkelä2020-04-161-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| | * Merge 10.2 into 10.3Marko Mäkelä2020-04-151-1/+1
| | |
* | | perfschema compilation, test and misc fixesSergei Golubchik2020-03-102-145/+2
|/ /
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-094-0/+202
|\ \ | |/
| * Merge pull request #1261 from robertbindar/mdev-17978Robert Bindar2019-12-052-0/+21
| | | | | | MDEV-17978 Server crash in SHOW CREATE SEQUENCE on a broken view
| * Re-record sql_sequence.rebuild with sorted_resultVicențiu Ciorbaru2019-12-032-110/+112
| |
| * MDEV-15977 Assertion !thd->in_sub_stmt failed in trans_commit_stmtRobert Bindar2019-12-022-0/+179
| |
* | Merge 10.3 into 10.4Marko Mäkelä2019-11-012-0/+227
|\ \ | |/
| * MDEV-20074: Lost connection on update triggerOleksandr Byelkin2019-10-172-0/+227
| | | | | | | | | | Instead of checking lex->sql_command which does not corect in case of triggers mark tables for insert.
* | Write information about restart in .resultMichael Widenius2019-04-011-0/+2
|/ | | | Idea comes from MySQL which does something similar
* MDEV-17503 CREATE SEQUENCE failed with innodb_force_primary_key =1Monty2018-10-292-0/+20
| | | | | | | Fixed by adding table flag HA_WANTS_PRIMARY_KEY, which is like HA_REQUIRE_PRIMARY_KEY but tells SQL upper layer that the storage engine internally can handle tables without primary keys (for example for sequences or trough user variables)
* Sequences with negative numbers and auto_increment_increment crashesMonty2018-08-304-0/+86
| | | | | | | This also fixes MDEV-16313 Assertion `next_free_value % real_increment == offset' fails upon CREATE SEQUENCE in galera cluster Fixed by adding llabs() to assert. Also adjusted auto_increment_offset to mod auto_increment_increment.
* MDEV-16234 CREATE TABLE .. SELECT LASTVAL breaks replicationMonty2018-05-222-0/+62
| | | | Fixed by marking NEXTVAL() and LASTVAL() to be replicated row based
* MDEV-15970 Crash when doing truncate on locked sequenceMichael Widenius2018-05-142-1/+17
| | | | | | | | | 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)
* sql_sequence.debug_sync fails upon server startupElena Stepanova2018-05-091-1/+1
| | | | | Debug command-line option should be loose, otherwise the test fails before it has a chance to be skipped
* Added test case for MDEV-13029Monty2018-05-083-0/+23
| | | | | | | | MDEV 13029 Assertion `ds_control' failed in debug_sync upon closing connection after creating temporary sequence This test doesn't fail anymore. Adding it to ensure that the bug doesn't appear again.
* Added test case for MDEV-13007 ALTER .. ENGINE on temporary sequence may go ↵Monty2018-05-072-0/+42
| | | | | | | wrong Looks like the bug was fixed some time ago (at least I can't repeat it). I added the test case just have this case tested properly.