summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Mistakes corrected.Galina Shalygina2017-10-2834-80/+826
| | | | | TVC can be used in IN subquery and in PARTITION BY struct now. Special variable to control working of optimization added.
* New tests on errors added. Comments corrected. Some procedures corrected.Galina Shalygina2017-09-045-90/+190
|
* Post review changes for the optimization of IN predicates into IN subqueries.Galina Shalygina2017-09-0210-147/+306
|
* Remarked opt_tvc.test added.Galina Shalygina2017-09-011-0/+7
|
* Memory allocation corrected. New tests added.Galina Shalygina2017-09-013-88/+88
|
* Some mistakes in opt_range.cc and libmysqld/CMakeLists.txt files correctedGalina Shalygina2017-08-292-1/+2
|
* Mistakes corrected. Now all tests in opt_tvc.test file work correctlyGalina Shalygina2017-08-295-22/+12
|
* Mistakes corrected, new error messages addedGalina Shalygina2017-08-297-11/+32
|
* Summarized results of two previous commits (26 July, 25 August)Galina Shalygina2017-08-2921-803/+3370
|
* Optimization that transforms IN-predicate in IN-subselect made.Galina Shalygina2017-08-252-0/+644
| | | | | | | | | | | | Trasformation goes that way: a in (1,2) -> a in (select * from (values ((1),(2))) as new_tvc) Special variable that controlls optimization added. Now optimization works only in several cases. New tests added. Old tests corrected. Now with TVC explain can be used. TVC also can be used in recursive CTEs.
* Queries where TVCs are used are processed successufully.Galina Shalygina2017-07-262-0/+643
| | | | | | | | TVCs can be used separately, with UNION/UNION ALL, in derived tables, in views and in common table expressions. Tests corrected. Test results added.
* Mistakes corrected, test file corrected.Galina Shalygina2017-06-305-8/+26
|
* New structure Table Value Constructor added in grammar.Galina Shalygina2017-06-298-65/+301
| | | | | | | | TVC can be used in UNION-statement, in view and in subquery. Files where TVC is defined and its methods are stored added. Methods exec and prepare for TVC added. Tests for TVC added.
* MDEV-12292 - port "Report timing with more precision" by @dveedenbb-sachin-gsocSergey Vojtovich2017-06-131-28/+7
| | | | | | CLOCKS_PER_SEC not used anymore. start_timer()/mysql_end_timer() don't make much sense. Buffer size requirement increased by 1 byte.
* replace my_timer_microseconds with microsecond_interval_timerEric Herman2017-06-131-2/+1
| | | | | | | | | | | | As svoj points out, my_timer_microseconds uses gettimeofday which is affected by "discontinuous jumps in the system time", according to man. This patch changes to use microsecond_interval_timer which is "not perfect, but is less affected by these jumps", and also does not require an include of my_rdtsc.h header. https://github.com/MariaDB/server/pull/332#discussion_r114708923
* Fix whitespace in new codeEric Herman2017-06-131-1/+1
| | | | | "No space before "=" and space after cast please" https://github.com/MariaDB/server/pull/332#discussion_r114708923
* Callers of start_timer should have ulonglong data typeEric Herman2017-06-131-1/+2
| | | | | Oversight spotted by svoj: https://github.com/MariaDB/server/pull/332#discussion_r114708923
* port "Report timing with more precision" by @dveedenEric Herman2017-06-131-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | based upon: https://github.com/dveeden/mysql-server/commit/d5e46428075d86dbdc333d27951bb06cb4c11a32 MariaDB [test]> select sleep(0.123); +--------------+ | sleep(0.123) | +--------------+ | 0 | +--------------+ 1 row in set (0.123 sec) "More exact timing for mysql client based on my_timer_microseconds" Based on suggestion from @grooverdan on https://github.com/mysql/mysql-server/pull/112 This patch is slightly bigger because the original did not preserve the return type of my_timer_microseconds and this patch does. (my_timer_microseconds returns ulonglong, not simply ulong) Also I believe the correct place to do the division of microseconds to seconds is better in the caller of nice_time because nice_time takes a "double sec" param, so we should convert before calling; the other caller of nice_time does not call with microseconds.
* 10.3 man pages=Ian Gilfillan2017-06-0653-53/+53
|
* Remove deprecated InnoDB file format parametersMarko Mäkelä2017-06-02112-4492/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following options will be removed: innodb_file_format innodb_file_format_check innodb_file_format_max innodb_large_prefix They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703. The file_format column in two INFORMATION_SCHEMA tables will be removed: innodb_sys_tablespaces innodb_sys_tables Code to update the file format tag at the end of page 0:5 (TRX_SYS_PAGE in the InnoDB system tablespace) will be removed. When initializing a new database, the bytes will remain 0. All references to the Barracuda file format will be removed. Some references to the Antelope file format (meaning ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain. This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1: commit 4a69dc2a95995501ed92d59a1de74414a38540c6 Author: Marko Mäkelä <marko.makela@oracle.com> Date: Wed Mar 11 22:19:49 2015 +0200
* Merge branch 'bb-10.2-ext' into 10.3Marko Mäkelä2017-06-02649-8886/+43995
|\ | | | | | | | | | | This excludes MDEV-12472 (InnoDB should accept XtraDB parameters, warning that they are ignored). In other words, MariaDB 10.3 will not recognize any XtraDB-specific parameters.
| * MDEV-12930 Testing SEQUENCE objectMonty2017-05-3010-7/+181
| | | | | | | | | | | | | | | | | | Fixed the following things from the above MDEV: - Ensure the user has INSERT privilege when generating new sequence values with NEXT VALUE FOR or SETVAL() - Fixed bug in InnoDB when generating several sequence values in one statement - Ensure that read_set is up to date before calling ha_sequence::ha_write_row() - This is only a potential bug with storage engines that trusts the column maps completely
| * Updated test caseMonty2017-05-301-1/+1
| |
| * Add automatic updating of sub modules to BUILD scriptsMonty2017-05-291-0/+1
| |
| * Add locks for sequence's to ensure that there is only one writer or many readersMonty2017-05-296-48/+97
| | | | | | | | | | | | This is needed for MyISAM and other storage engines which normally relies on THR_LOCK's to ensure that one is not writing the same block one could be reading from.
| * SP stack tracehalfspawn2017-05-2916-22/+84
| |
| * MDEV-12803 Improve function parameter data type controlAlexander Barkov2017-05-2925-262/+1288
| |
| * Adding tests for MDEV-9410 VIEW over a ROLLUP query reports too large columnsAlexander Barkov2017-05-272-0/+45
| | | | | | | | The fix for MDEV-12866 fixed this problem as well. Adding tests only.
| * Adding tests for MDEV-12861 FIRST_VALUE() does not preserve the exact data typeAlexander Barkov2017-05-272-0/+24
| | | | | | | | Recent changes in Type_handler fixed this problem. Adding tests only.
| * Adding tests for MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates ↵Alexander Barkov2017-05-272-0/+60
| | | | | | | | | | | | different columns for table vs view Recent fixes in Type_handler fixed this problem. Adding tests only.
| * Adding tests for MDEV-9406 CREATE TABLE..SELECT creates different columns ↵Alexander Barkov2017-05-272-0/+57
| | | | | | | | | | | | | | for IFNULL() and equivalent COALESCE,CASE,IF Recent changes in Type_handler fixed this problem as well. Adding tests only.
| * MDEV-10309 COALESCE(12345678900) makes a column of a wrong type and ↵Alexander Barkov2017-05-272-0/+23
| | | | | | | | | | | | | | | | truncates the data Previous fixes in Type_handler (see the patch for MDEV-12875, MDEV-12886, MDEV-12916) fixed this problem as well. Adding only the test from the report.
| * MDEV-12932 Remove enum Cast_target and use Type_handler to handle CASTAlexander Barkov2017-05-277-256/+280
| |
| * A post-merge fix: loadxml failed on Windows (due to a wrong parameter to ↵Alexander Barkov2017-05-271-6/+6
| | | | | | | | | | | | my_error). Fixing to pass item->name.str rather than item->name to my_error().
| * Merge tag 'mariadb-10.2.6' into bb-10.2-extAlexander Barkov2017-05-26514-5832/+38534
| |\
| | * Additions to 10.2.6 unstable-tests listmariadb-10.2.6Elena Stepanova2017-05-151-8/+9
| | |
| | * MDEV-12674 Post-merge fix: Include accidentally omitted changesMarko Mäkelä2017-05-124-8/+54
| | | | | | | | | | | | | | | In 10.2, the definition of simple_counter resides in the file sync0types.h, not in the file os0sync.h which has been removed.
| | * Merge 10.1 into 10.2Marko Mäkelä2017-05-1215-228/+170
| | |\
| | | * Merge 10.0 into 10.1Marko Mäkelä2017-05-1214-239/+219
| | | |\
| | | | * MDEV-12674 Innodb_row_lock_current_waits has overflowMarko Mäkelä2017-05-1212-233/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race condition related to the variable srv_stats.n_lock_wait_current_count, which is only incremented and decremented by the function lock_wait_suspend_thread(), The incrementing is protected by lock_sys->wait_mutex, but the decrementing does not appear to be protected by anything. This mismatch could allow the counter to be corrupted when a transactional InnoDB table or record lock wait is terminating roughly at the same time with the start of a wait on a (possibly different) lock. ib_counter_t: Remove some unused methods. Prevent instantiation for N=1. Add an inc() method that takes a slot index as a parameter. single_indexer_t: Remove. simple_counter<typename Type, bool atomic=false>: A new counter wrapper. Optionally use atomic memory operations for modifying the counter. Aligned to the cache line size. lsn_ctr_1_t, ulint_ctr_1_t, int64_ctr_1_t: Define as simple_counter<Type>. These counters are either only incremented (and we do not care about losing some increment operations), or the increment/decrement operations are protected by some mutex. srv_stats_t::os_log_pending_writes: Document that the number is protected by log_sys->mutex. srv_stats_t::n_lock_wait_current_count: Use simple_counter<ulint, true>, that is, atomic inc() and dec() operations. lock_wait_suspend_thread(): Release the mutexes before incrementing the counters. Avoid acquiring the lock mutex if the lock wait has already been resolved. Atomically increment and decrement srv_stats.n_lock_wait_current_count. row_insert_for_mysql(), row_update_for_mysql(), row_update_cascade_for_mysql(): Use the inc() method with the trx->id as the slot index. This is a non-functional change, just using inc() instead of add(1). buf_LRU_get_free_block(): Replace the method add(index, n) with inc(). There is no slot index in the simple_counter.
| | | * | MDEV-12253 post-fix: Do not leak memory in crash recoveryMarko Mäkelä2017-05-092-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport from 10.2 where it fixes the cmake -DWITH_ASAN test failure that was mentioned in commit f9cc391863ab962e8c8a8a8a676d730498eb8d6f (merging MDEV-12253 from 10.1 to 10.2). fil_parse_write_crypt_data(): If the tablespace is not found, invoke fil_space_destroy_crypt_data(&crypt_data) to properly free the created object.
| | | * | MDEV-12253 post-push fix: buf_read_page_low() can return DB_ERRORMarko Mäkelä2017-05-092-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function buf_read_page_low() invokes fil_io(), which can return DB_ERROR when the requested page is out of bounds (such as when restoring a buffer pool dump). The callers should be handling that.
| | * | | MDEV-10804 main.stat_tables_par fails sporadically in buildbotMichael Widenius2017-05-114-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was because of two issues: - thr_multi_lock_after_thr_lock needed to be hit 3 times before go2 could be signaled, because 2 of these happened before statistics_update_start was reached. - The original code didn't take into accunt that thr_locks can be executed in any random order, which caused sporadic failures when waiting for 1 lock of 3, as if the locks where in different order, there would be a dead-lock. Fixed by introducing thr_multi_lock_before_thr_lock which is deterministic. - Some of the test failures where not noticed as the DEBUG_SYNC timeout would cause the test to pass (after 300 seconds).
| | * | | Build MyRocks as a plugin (as static compilation doesn't work)Michael Widenius2017-05-111-1/+1
| | | | |
| | * | | MDEV-11197: TrxInInnoDB::is_aborted(const trx_t*): Assertion ↵Jan Lindström2017-05-102-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `srv_read_only_mode || trx->in_depth > 0' failed TrxInInnoDB should be constructed to track if a transaction is executing inside InnoDB code i.e. it is like a gate between Server and InnoDB ::rnd_next() is called from Server and thus construct TrxInInnoDB also there. Applied suggested clean-up to TrxInInnoDB class functions enter() and exit(). Note that exactly original did not work for enter().
| | * | | MDEV-12776 Do not create the InnoDB temporary tablespace in innodb_read_only ↵Marko Mäkelä2017-05-103-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode The InnoDB temporary tablespace is only usable if innodb_read_only=OFF. It is useless to create the tablespace in read-only mode, because CREATE TEMPORARY TABLE is disallowed if innodb_read_only, and nothing can we written to the temporary tablespace if no temporary tables can be created.
| | * | | MDEV-12754 innodb.truncate_debug fails in buildbot with embedded due to ↵Sergei Golubchik2017-05-104-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | semaphore wait fix sporadic innodb.truncate_purge_debug failures
| | * | | fix 32 bit platform testOleksandr Byelkin2017-05-101-64/+201
| | | | |
| | * | | update to the latest C/C to fix failures on WindowsSergei Golubchik2017-05-101-0/+0
| | | | |
| | * | | skip innodb.innodb_xtradb_compat on WindowsSergei Golubchik2017-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | because it tests for variables that aren't compiled for Windows, like --innodb-priority-cleaner