summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.0bb-10.0-merge-sanjaOleksandr Byelkin2018-09-032-0/+14
|\
| * MDEV-16682 Assertion `(buff[7] & 7) == HEAD_PAGE' failedMonty2018-08-302-0/+14
| | | | | | | | | | | | | | | | | | Problem was that SQL level tried to read a record with rnd_pos() that was already deleted by the same statement. In the case where the page for the record had been deleted, this caused an assert. Fixed by extending the assert to also handle empty pages and return HA_ERR_RECORD_DELETED for reads to deleted pages.
* | MDEV-17067 Server crash in write_block_recordMonty2018-08-242-1/+19
| | | | | | | | | | | | | | Problem was that Create_field::create_length_to_internal_length() calculated a different pack_length for NEWDECIMAL compared to Field_new_decimal constructor which lead to some unused bytes in the middle of the record, which Aria didn't like.
* | MDEV-17021 Server crash or assertion `length <= column->length' failure in ↵Monty2018-08-242-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | write_block_record Problem was that the number of NULL bit's was record wrong in the .frm file because there could be more fields marked NOT_NULL after the number of not_null fields where recorded. Fixed by copying test for virtual fields from prepare_create_field() The code change, only the test, doesn't have to be merged to 10.3 as this is fixed there.
* | Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-06-202-0/+53
|\ \ | |/
| * MDEV-16534 PPC64: Unexpected error with a negative value into auto-increment ↵Alexander Barkov2018-06-202-0/+54
| | | | | | | | columns in HEAP, MyISAM, ARIA
* | Fixes for Aria transaction handling with lock tablesMonty2018-05-222-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-10130 Assertion `share->in_trans == 0' failed in storage/maria/ma_close.c MDEV-10378 Assertion `trn' failed in virtual int ha_maria::start_stmt The problem was that maria_handler->trn was not properly reset at commit/rollback and ha_maria::exernal_lock() could get confused because. There was some old code in ha_maria::implicit_commit() that tried to take care of this, but it was not bullet proof. Fixed by adding list of all tables that is part of the maria transaction to TRN. A nice side effect was of the fix is that loops in ha_maria::implict_commit() got to be much simpler. Other things: - Fixed a bug in mysql_admin_table() where argument open_for_modify was wrongly reset for the next table in the chain - rollback admin command also in case of fatal error. - Split _ma_set_trn_for_table() to three version to simplify code and debugging. - Several new asserts to detect the original problem (that file was not properly removed from trn before calling ma_close())
* | Fix that FLUSH TABLES FOR EXPORT also works for Aria tables.Monty2018-05-162-0/+21
| | | | | | | | - Added missing test case for MyISAM
* | MDEV-14943 Alter table ORDER BY bugMonty2018-05-152-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that if copy_data_between_tables() didn't do proper clean up in case of failures: - copy object was not properly freed - end_bulk_insert() was not called - mysql_trans_prepare_alter_copy_data() set THD->transaction.on to false which was not properly restored The last part caused a crash in Aria as Aria depends on that THD is correct. Other things: - Reset info->switched_transactional after usage (safety) - Reset bulk_insert_single_undo (safety)
* | Merge branch '5.5' into 10.0Sergei Golubchik2018-02-222-0/+11
|\ \ | |/
| * MDEV-13748 Assertion `status_var.local_memory_used == 0 || ↵Sergei Golubchik2018-02-142-0/+11
| | | | | | | | | | | | | | | | | | !debug_assert_on_not_freed_memory' failed in virtual THD::~THD after query with INTERSECT my_safe_alloca()/my_safe_afree() work as alloca() or malloc()/free() depending on the memory size to allocate, that is, depending on reclength here. They only work correctly if reclength doesn't change in the middle.
* | MDEV-11539 test_if_reopen: Assertion ↵Sergei Golubchik2018-01-252-0/+48
| | | | | | | | | | | | | | | | | | `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S remove HA_EXTRA_PREPARE_FOR_RENAME - neither OPTIMIZE nor REPAIR need it (was introduced in b58e79566c5 when replacing remove_table_from_cache() with wait_while_table_is_used() even though remove_table_from_cache() did not have it).
* | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-244-0/+150
|\ \ | |/
| * MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_partOleksandr Byelkin2018-01-112-0/+26
| | | | | | | | | | Fix the call to correspond protocoll of pagecache call. Fix of misleading variables names.
| * MDEV-8200 aria bug with insert select and lock tablesMonty2018-01-112-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug happens when locking the same Aria "transactional" table (page format) more then once with LOCK TABLES and inserting into one of them with INSERT ... SELECT when the table is empty. Fixed by ensuring we don't use fast bulk insert if table is opened twice with LOCK TABLES (as this changes table->s->state) Code changes: - Added use_count to MARIA_USED_TABLES to be able to check if table is opened twice for a statement/lock table - Don't clear history or reset info->start_state if we don't have versioning. One reason for the bug was was that info->start_state was set to point to different states for the two tables. If there is no versioning info->start_state should always point to info->s->state.common. Other things: - Fixed also some typos that was noticed while scanning the code - More DBUG_PRINT
* | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-182-2/+10
|\ \ | |/
| * MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535Alexander Barkov2017-10-132-2/+10
| |
* | Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-2/+2
|\ \ | |/
| * Adjusted test results after the fix for mdev-12429.Igor Babaev2017-04-071-2/+2
| |
* | MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECTSergei Golubchik2016-12-042-5/+5
| | | | | | | | | | | | | | be consistent and don't include the table name into the error message, no other CREATE TABLE error does it. (the crash happened, because thd->lex->query_tables was NULL)
* | Merge branch '5.5' into 10.0Sergei Golubchik2015-06-112-0/+21
|\ \ | |/
| * MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabledSergey Vojtovich2015-06-092-0/+21
| | | | | | | | | | | | | | keys Fixed that OPTIMIZE TABLE against MyISAM/Aria table may write uninitialized key root position for disabled keys.
* | 5.5 mergeSergei Golubchik2015-01-214-25/+52
|\ \ | |/
| * MDEV-4010 Deadlock on concurrent INSERT .. SELECT into an Aria table with ↵Michael Widenius2014-12-152-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | statement binary logging There was a bug in lock handling when mixing INSERT ... SELECT on the same table. mysql-test/suite/maria/insert_select.result: Test case for MDEV_4010 mysql-test/suite/maria/insert_select.test: Test case for MDEV_4010 mysys/thr_lock.c: We wrongly alldoed TL_WRITE_CONCURRENT_INSERT when there was a TL_READ_NO_INSERT lock
* | Fixed MDEV-7314: Deadlock when doing insert-select with AriaMichael Widenius2015-01-182-0/+44
| | | | | | | | | | | | | | | | | | mysql-test/suite/maria/insert_select.result: Added test case mysql-test/suite/maria/insert_select.test: Added test case mysys/thr_lock.c: Ensure we don't allow concurrent_insert when a read_no_write lock is in use
* | 5.5.39 mergeSergei Golubchik2014-08-072-0/+37
|\ \ | |/
| * Fix for MDEV-6493: Assertion `table->file->stats.records > 0 || error' ↵Michael Widenius2014-07-302-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure, or 'Invalid write' valgrind warnings, or crash on scenario with Aria table, view, LOCK TABLES This bug only happens in case of paritioned tables used in LOCK TABLES and implicit_commit() was called (as part of trying to execute a CREATE TABLE withing lock tables) The problem was that Aria could not move the tables from one transaction to the new one, as thd->open_tables contained a partitioned tables and not an Aria table. Fix: - Store a list of all open tables that are part of a share in share->open_tables - In maria::implict_commit() use transaction->used_tables & share->open_tables to find out which tables was part of the current transaction instead of using thd->open_tables, which may contain partitioned tables. mysql-test/suite/maria/maria_partition.result: Added test case mysql-test/suite/maria/maria_partition.test: Added test case storage/maria/ha_maria.cc: Use trn->used tables and share->open_tables to find out which tables was part of the current transaction instead of using thd->open_tables. storage/maria/ma_close.c: Remove closed table from share->open_list storage/maria/ma_open.c: Add table to share->open_list storage/maria/ma_state.c: Added comment storage/maria/maria_def.h: Added share->open_list, a list of all tables that is using this share.
* | Fixed problem with very slow shutdown when using 100,000 MyISAM tables with ↵Michael Widenius2014-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | delay_key_write Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable. - Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria. - Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write mysql-test/r/features.result: Added test of Feature_delay_key_write mysql-test/r/key_cache.result: Updated tests as the number of blocks has changed mysql-test/r/mysqld--help.result: Updated result mysql-test/suite/maria/maria3.result: Updated result mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result: Test new variable mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test: Test new variable mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test: Test new variable mysql-test/t/features.test: Added test of Feature_delay_key_write mysql-test/t/key_cache.test: Updated tests as the number of blocks has changed mysys/mf_keycache.c: Made CHANGED_BLOCKS_HASH dynamic sql/handler.cc: Updated call to init_key_cache() sql/mysqld.cc: Added "Feature_delay_key_write" Added support for key-cache-file-hash-size sql/mysqld.h: Added support for key-cache-file-hash-size sql/sql_class.h: Added feature_files_opened_with_delayed_keys sql/sys_vars.cc: Added key_cache_file_hash_size storage/maria/ha_maria.cc: Added pagecache_file_hash_size Added counting of files with delay_key_write storage/maria/ma_checkpoint.c: Fixed compiler warning storage/maria/ma_pagecache.c: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_pagecache.h: Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable storage/maria/ma_rt_test.c: Updated parameters for init_pagecache() storage/maria/ma_test1.c: Updated parameters for init_pagecache() storage/maria/ma_test2.c: Updated parameters for init_pagecache() storage/maria/ma_test3.c: Updated parameters for init_pagecache() storage/maria/maria_chk.c: Updated parameters for init_pagecache() storage/maria/maria_ftdump.c: Updated parameters for init_pagecache() storage/maria/maria_pack.c: Updated parameters for init_pagecache() storage/maria/maria_read_log.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_consist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_rwconsist2.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_pagecache_single.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated parameters for init_pagecache() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated parameters for init_pagecache() storage/myisam/ha_myisam.cc: Added counting of files with delay_key_write storage/myisam/mi_check.c: Updated call to init_key_cache() storage/myisam/mi_test1.c: Updated call to init_key_cache() storage/myisam/mi_test2.c: Updated call to init_key_cache() storage/myisam/mi_test3.c: Updated call to init_key_cache() storage/myisam/mi_test_all.sh: Fixed broken test storage/myisam/myisam_ftdump.c: Updated call to init_key_cache() storage/myisam/myisamchk.c: Updated call to init_key_cache() storage/myisam/myisamlog.c: Updated call to init_key_cache()
* | MDEV-6287 Bad warning level when inserting a DATETIME value into a TIME columnAlexander Barkov2014-06-021-4/+4
| |
* | Fixed MDEV-3815: Aria engine return "The table is full" (ERROR 1114) ↵Michael Widenius2014-02-114-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inserting record, while MyISAM and InnoDB doesn't Increase default pointer length for Aria tables to be able to handle big files without having to specify MAX_ROWS mysql-test/suite/maria/icp.result: Updated result mysql-test/suite/maria/maria-preload.result: More pages are needed with longer pointer length mysql-test/suite/maria/maria.result: Added more tests mysql-test/suite/maria/maria.test: Added more tests storage/maria/ma_create.c: Increase default pointer length for Aria tables to be able to handle big files without having to specify MAX_ROWS storage/maria/ma_range.c: Optimize records_in_range() to be more exact storage/maria/ma_static.c: Increase default pointer size storage/maria/ma_test2.c: Allow a bit larger errors in records_in_range
* | 10.0-base mergeSergei Golubchik2014-02-032-0/+60
|\ \
| * \ 5.5 mergeSergei Golubchik2014-02-012-0/+60
| |\ \ | | |/
| | * Fixed MDEV-4970: Wrong result with Aria table populated with disabled keysMichael Widenius2014-01-252-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that ALTER TABLE DISABLE KEYS incremented create_trid for the table, which made the new index entries invisible until the global trid catched up. Fixed by only updating create_trid if we are rewriting all rows and indexes. mysql-test/suite/maria/alter.result: Added test case mysql-test/suite/maria/alter.test: Added test case storage/maria/ha_maria.cc: Only updating create_trid if we are doing a full repair (and thus rewriting all rows and indexes). storage/maria/trnman.c: More DBUG_PRINT
* | | Check for duplicate index (port from mysql)unknown2013-09-202-0/+8
| | | | | | | | | | | | (pre fts)
* | | 10.0-base merge.Sergei Golubchik2013-09-211-6/+6
|\ \ \ | |/ / | | | | | | | | | Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
| * | 5.5 merge and fixes for compiler/test errorsSergei Golubchik2013-09-181-6/+6
| |\ \ | | |/
| | * Merge from 5.3.Alexander Barkov2013-09-131-6/+6
| | |\ | | | | | | | | | | | | | | | | | | | | pending merges: Alexander Barkov 2013-09-12 MDEV-4724 Some temporal functions do not pre...
| | | * MDEV-4724 Some temporal functions do not preserve microsecondsAlexander Barkov2013-09-121-6/+6
| | | |
| | | * MDEV-4651 Crash in my_decimal2decimal in a ORDER BY queryAlexander Barkov2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/ps_2myisam.result mysql-test/r/ps_3innodb.result mysql-test/r/ps_4heap.result mysql-test/r/ps_5merge.result mysql-test/r/type_datetime_hires.result mysql-test/suite/maria/r/ps_maria.result mysql-test/t/type_datetime_hires.test sql/item_timefunc.h
| | | * fixes for buildbotSergei Golubchik2013-05-212-2/+2
| | | |
* | | | 10.0-monty mergeSergei Golubchik2013-07-2112-121/+120
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | includes: * remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING" * introduce LOCK_share, now LOCK_ha_data is strictly for engines * rea_create_table() always creates .par file (even in "frm-only" mode) * fix a 5.6 bug, temp file leak on dummy ALTER TABLE
| * | | fix for maria.maria testSergei Golubchik2013-07-132-108/+108
| | | |
| * | | fix the maria suiteSergei Golubchik2013-07-123-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/handler.h: not "unused" sql/sql_table.cc: move this check where it is in 10.0
| * | | More trivial test result updatesSergey Petrunya2013-07-085-6/+6
| | | |
| * | | Update test results to fix trivial test failures in parts testsuiteSergey Petrunya2013-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | - New error message text - PARTITION is now a reserved word in SQL, so it should be quoted
| * | | Post-merge buildbot fixes: Sergey Petrunya2013-07-052-3/+3
| | | | | | | | | | | | | | | | - Update trivial .reject/.result differences (all checked)
* | | | 5.5 mergeSergei Golubchik2013-07-172-2/+29
|\ \ \ \ | | |/ / | |/| |
| * | | MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix ↵Sergey Petrunya2013-07-161-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | length on TEXT column Backport the fix olav.sandstaa@sun.com-20101102184747-qfuntqwj021imy9r: "Fix for Bug#52660 Perf. regr. using ICP for MyISAM on range queries on an index containing TEXT" (together with further fixes in that code) into MyISAM and Aria.
| * | | -Run test suite with smaller aria keybuffer size (to make it possible to run ↵Michael Widenius2013-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more tests in parallel) -Added test and extra code to ensure we don't leave keyread on for a handler table. -Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. mysql-test/include/default_mysqld.cnf: Run test suite with smaller aria keybuffer size mysql-test/suite/maria/maria3.result: Run test suite with smaller aria keybuffer size mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result: Run test suite with smaller aria keybuffer size sql/handler.cc: Disable key read (extra safety if something went wrong) sql/multi_range_read.cc: Ensure we have don't leave keyread on for secondary_file sql/opt_range.cc: Simplify code with mark_columns_used_by_index_no_reset() Ensure that read_keys_and_merge() disableds keyread if it enables it sql/opt_subselect.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_derived.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_select.cc: Use 'enable_keyread()' instead of calling HA_EXTRA_RESET. (Makes debugging easier) Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. Remove not anymore used argument for create_internal_tmp_table() More DBUG sql/sql_select.h: Remove not anymore used argument for create_internal_tmp_table()
* | | | 5.5 mergeSergei Golubchik2013-06-066-7/+89
|\ \ \ \ | |/ / /