summaryrefslogtreecommitdiff
path: root/mysql-test/suite/handler/handler.inc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-16708: fix in test failures(added ↵Dmitry Shulga2021-06-171-0/+2
| | | | --enable_prepared_warnings/--disable_prepared_warnings)
* Aria will now register it's transactionsMonty2020-05-231-160/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
* Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-0/+2
|\
| * Merge branch '5.5' into 10.0Vicențiu Ciorbaru2018-06-121-0/+2
| |\
| | * mysqltest: Allow HANDLER READ in --ps-protocol testsSergei Golubchik2018-06-111-0/+2
| | | | | | | | | | | | adjust tests
* | | MDEV-7660 - MySQL WL#6671 "Improve scalability by not using thr_lock.c locksSergey Vojtovich2016-11-031-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for InnoDB tables" Don't use thr_lock.c locks for InnoDB tables. Below is list of changes that were needed to implement this: - HANDLER OPEN acquireis MDL_SHARED_READ instead of MDL_SHARED - HANDLER READ calls external_lock() even if SE is not going to be locked by THR_LOCK - InnoDB lock wait timeouts are now honored which are much shorter by default than server lock wait timeouts (1 year vs 50 seconds) - with @@autocommit= 1 LOCK TABLES disables autocommit implicitely, though user still sees @@autocommt= 1 - the above starts implicit transaction - transactions started by LOCK TABLES are now rolled back on disconnect (previously everything was committed due to autocommit) - transactions started by LOCK TABLES are now rolled back by ROLLBACK (previously everything was committed due to autocommit) - it is now impossible to change BINLOG_FORMAT under LOCK TABLES (at least to statement) due to running transaction - LOCK TABLES WRITE is additionally handled by MDL - ...in contrast LOCK TABLES READ protection against DML is pure InnoDB - combining transactional and non-transactional tables under LOCK TABLES may cause rolled back changes in transactional table and "committed" changes in non-transactional table - user may disable innodb_table_locks, which will cause LOCK TABLES to be noop basically Removed tests for BUG#45143 and BUG#55930 which cover InnoDB + THR_LOCK. To operate properly these tests require code flow to go through THR_LOCK debug sync points, which is not the case after this patch. These tests are removed by WL#6671 as well. An alternative is to port them to different storage engine.
* | | MDEV-5535: Cannot reopen temporary tableNirbhay Choubey2016-06-101-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld maintains a list of TABLE objects for all temporary tables created within a session in THD. Here each table is represented by a TABLE object. A query referencing a particular temporary table for more than once, however, failed with ER_CANT_REOPEN_TABLE error because a TABLE_SHARE was allocate together with the TABLE, so temporary tables always had only one TABLE per TABLE_SHARE. This patch lift this restriction by separating TABLE and TABLE_SHARE objects and storing TABLE_SHAREs for temporary tables in a list in THD, and TABLEs in a list within their respective TABLE_SHAREs.
* | | MDEV-6720 - enable connection log in mysqltest by defaultSergey Vojtovich2016-03-311-95/+0
|/ /
* | 10.0-base mergeSergei Golubchik2013-12-161-3/+2
|\ \ | |/
| * mysql-5.5.34 mergeSergei Golubchik2013-11-191-3/+2
| | | | | | | | (some patches reverted, test case added)
* | update handler.* testsSergei Golubchik2013-07-121-1/+1
|/
* merge with 5.3Sergei Golubchik2011-10-191-21/+1063
| | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
* Fixed compiler warningsMichael Widenius2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | client/readline.cc: Initialize not used variable (to kill wrong compiler warning) mysql-test/suite/handler/aria.result: Updated test result mysql-test/suite/handler/handler.inc: Changed index to ensure rows are in a fixed order mysql-test/suite/handler/heap.result: Updated test result mysql-test/suite/handler/innodb.result: Updated test result mysql-test/suite/handler/myisam.result: Updated test result plugin/handler_socket/handlersocket/Makefile.am: Use CXX flags to compile sql/filesort.cc: Initialize variable that may be used sql/log.cc: Initialize not used variable (to kill wrong compiler warning) sql/opt_range_mrr.cc: Fixed cast to avoid compiler warning storage/xtradb/fil/fil0fil.c: Added cast to avoid compiler warning
* Fixed build issuesMichael Widenius2011-02-231-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Linking now with g++ instead of gcc with 'compile-dist' to solve problems with handlersocket/client - Fixed bug in heap tables when doing handler read next-prev over last row BUILD/compile-dist: - Linking now with g++ instead of gcc with 'compile-dist' to solve problems with handlersocket/client cmd-line-utils/libedit/vi.c: Fixed compiler warning about not checking return value for write mysql-test/r/index_intersect.result: Updated results (missed this file in my last push) mysql-test/suite/handler/aria.result: Updated test results mysql-test/suite/handler/handler.inc: Changed test to use read next/read prev on key where there are duplicates that can come in different order depending on system Added testing of read next-prev over last row and read prev-next around first row mysql-test/suite/handler/heap.result: Updated test results mysql-test/suite/handler/init.inc: More rows to test mysql-test/suite/handler/innodb.result: Updated test results mysql-test/suite/handler/interface.result: Updated test results mysql-test/suite/handler/myisam.result: Updated test results mysql-test/t/variables-big.test: Fixed test to not fail on windows mysql-test/valgrind.supp: Removed not matching fun: to get rid of valgrind warning storage/heap/hp_rfirst.c: Added state so that we know if we have an active position in the index. storage/heap/hp_rkey.c: Added state so that we know if we have an active position in the index. storage/heap/hp_rnext.c: Handle reading several next after finding the last row (this caused a crash before) storage/heap/hp_rprev.c: Handle reading several prev after finding the first row (this caused a crash before) storage/xtradb/buf/buf0buf.c: Fixed compiler warning about uninitialized value
* Updated test results for 5.3Michael Widenius2011-01-131-9/+9
| | | | | | | | | | | | | | | | | Changed handler.inc to make test row order independent mysql-test/r/table_elim.result: Updated test results for 5.3 mysql-test/suite/handler/aria.result: Updated result mysql-test/suite/handler/handler.inc: Changed handler.inc to make test row order independent mysql-test/suite/handler/heap.result: Updated result mysql-test/suite/handler/innodb.result: Updated result mysql-test/suite/handler/myisam.result: Updated result
* Added HANDLER support for MEMORY tablesMichael Widenius2011-01-111-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added key and file version numbers to MEMORY tables so that we can detect if someone has changed them between HANDLER calls. mysql-test/suite/handler/aria.result: Fixed result after test changes mysql-test/suite/handler/handler.inc: Changed test to use combined key to ensure rows are returned in a pre-determinated order. mysql-test/suite/handler/heap.result: New result mysql-test/suite/handler/heap.test: Added test for HANDLER + HEAP mysql-test/suite/handler/innodb.result: Fixed result after test changes mysql-test/suite/handler/myisam.result: Fixed result after test changes sql/sql_handler.cc: Fixed wrong parameter to ha_index_next_same() storage/heap/ha_heap.cc: Abort key scan if table has changed. Abort table scan if table has been recreated. storage/heap/ha_heap.h: Added support for HANDLER storage/heap/hp_clear.c: Increase version number so that we can notice changes if using HANDLER storage/heap/hp_delete.c: Increase key data version number on key changes. storage/heap/hp_rfirst.c: Remember version of key data Give error if using read-first on hash key. storage/heap/hp_rkey.c: Remember version of key data storage/heap/hp_rlast.c: Remember version of key data Give error if using read-last on hash key. storage/heap/hp_rnext.c: Fixed that we get next key from last search. storage/heap/hp_rprev.c: Fixed that we get previous key from last search. storage/heap/hp_scan.c: Remember version of key and file data storage/heap/hp_update.c: Increase key data version number on key changes. storage/heap/hp_write.c: Increase key data version number on key changes.
* Merge with 5.1Michael Widenius2011-01-111-1/+75
| | | | | Fixes to get Aria handler tests to work. Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
* - Fixed that Aria works with HANDLER commandsMichael Widenius2011-01-101-0/+465
- Added test case for Aria - Tested HANDLER with HEAP (changes to HEAP code will be pushed in 5.3) - Moved all HANDLER test to suite/handler. mysql-test/Makefile.am: Added suite/handler mysql-test/mysql-test-run.pl: Added suite/handler mysql-test/r/lock_multi.result: Remove test that is already in handler test suite mysql-test/suite/handler/aria.result: Test for HANDLER with Aria storage engine mysql-test/suite/handler/aria.test: Test for HANDLER with Aria storage engine mysql-test/suite/handler/handler.inc: Extended the general handler test Moved interface testing to 'interface.test' mysql-test/suite/handler/init.inc: Common init for handler tests. mysql-test/suite/handler/innodb.result: New results mysql-test/suite/handler/innodb.test: Update to use new include files mysql-test/suite/handler/interface.result: Test of HANDLER interface (not storage engine dependent parts) mysql-test/suite/handler/interface.test: Test of HANDLER interface (not storage engine dependent parts) mysql-test/suite/handler/myisam.result: New results mysql-test/suite/handler/myisam.test: Update to use new include files mysql-test/t/lock_multi.test: Remove test that is already in handler test suite mysys/tree.c: Added missing handling of read previous (showed up in HEAP testing) sql/handler.cc: Don't marka 'HA_ERR_RECORD_CHANGED' as fatal (can be used with HANDLER READ, especially with MEMORY ENGINE) sql/handler.h: Added prototype for can_continue_handler_scan() sql/sql_handler.cc: Re-initialize search if we switch from key to table search. Check if handler can continue searching between calls (via can_continue_handler_scan()) Don't write common not fatal errors to log storage/maria/ma_extra.c: Don't set index 0 as default. This forces call to ma_check_index() to set up index variables. storage/maria/ma_ft_boolean_search.c: Ensure that info->last_key.keyinfo is set storage/maria/ma_open.c: Don't set index 0 as default. This forces call to ma_check_index() to set up index variables. storage/maria/ma_rkey.c: Trivial optimization storage/maria/ma_rnext.c: Added missing code from mi_rnext.c to ensure that handler next/prev works. storage/maria/ma_rsame.c: Simple optimizations storage/maria/ma_search.c: Initialize info->last_key once and for all when we change keys. storage/maria/ma_unique.c: Ensure that info->last_key.keyinfo is up to date.