summaryrefslogtreecommitdiff
path: root/mysql-test/main
Commit message (Collapse)AuthorAgeFilesLines
* perfschema compilation, test and misc fixesSergei Golubchik2020-03-101-8/+56
|
* MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRYAlexander Barkov2020-03-106-0/+493
|
* MDEV-10047: table-based master info repositorySujatha2020-03-102-0/+160
| | | | | | | | | | | | | | Problem: ======= When we upgrade from "mysql" to "mariadb" if slave is using repositories as tables their data is completely ignored and no warning is issued in error log. Fix: === "mysql_upgrade" test should check for the presence of data in "mysql.slave_master_info" and "mysql.slave_relay_log_info" tables. When tables have some data the upgrade script should report a warning which hints users that the data in repository tables will be ignored.
* MDEV-21580: Allow packed sort keys in sort bufferVarun Gupta2020-03-105-8/+526
| | | | | | | | | | | | | | | | | | This task deals with packing the sort key inside the sort buffer, which would lead to efficient usage of the memory allocated for the sort buffer. The changes brought by this feature are 1) Sort buffers would have sort keys of variable length 2) The format for sort keys inside the sort buffer would look like |<sort_length><null_byte><key_part1><null_byte><key_part2>.......| sort_length is the extra bytes that are required to store the variable length of a sort key. 3) When packing of sort key is done we store the ORIGINAL VALUES inside the sort buffer and not the STRXFRM form (mem-comparable sort keys). 4) Special comparison function packed_keys_comparison() is introduced to compare 2 sort keys. This patch also contains contributions from Sergei Petrunia.
* MDEV-20632: Recursive CTE cycle detection using CYCLE clause (nonstandard)Oleksandr Byelkin2020-03-106-9/+308
| | | | Added CYCLE ... RESTRICT (nonstandard) clause to recursive CTE.
* MDEV-15528 Punch holes when pages are freedThirunarayanan Balathandayuthapani2020-03-101-7/+1
| | | | | | | | | | | | | The following parameters are deprecated: innodb-background-scrub-data-uncompressed innodb-background-scrub-data-compressed innodb-background-scrub-data-interval innodb-background-scrub-data-check-interval Removed scrubbing code completely(btr0scrub.h, btr0scrub.cc) Removed information_schema.innodb_tablespaces_scrubbing tables Removed the scrubbing logic from fil_crypt_thread()
* MDEV-21833 Make slave_run_triggers_for_rbr enforce triggers to run on slave, ↵Oleksandr Byelkin2020-03-091-7/+9
| | | | | | | | even when there are triggers on the master A bit changed patch of Anders Karlsson with examples added. New parameters "ENFORCE" to slave-run-triggers-for-rbr added.
* MDEV-21659 XA rollback foreign_xid is allowed inside active XAAndrei Elkin2020-03-092-2/+55
| | | | | | | | | | MDEV-21854 xa commit `xid` one phase for already prepared transaction must always error out Added state and one-phase option checks to XA "external" commit/rollback branches. While the XA standard does not prohibit it, Commit and Rollback of an XA external to the current ongoing transaction is not allowed; after all the current transaction may rollback to not being able to revert that decision.
* MDEV-21856 - xid_t::formatID has to be constrained to 4 byte sizeSergey Vojtovich2020-03-092-0/+12
| | | | | | Engine (InnoDB) and XA replication MDEV-742 requires the XID member be of a constant minimum across supported platform ulong size which is 4 bytes.
* MDEV-7318 RENAME INDEXAleksey Midenkov2020-03-032-0/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support of RENAME INDEX operation to the ALTER TABLE statement. Code which determines if ALTER TABLE can be done in-place for "simple" storage engines like MyISAM, Heap and etc. was updated to handle ALTER TABLE ... RENAME INDEX as an in-place operation. Support for in-place ALTER TABLE ... RENAME INDEX for InnoDB was covered by MDEV-13301. Syntax changes ============== A new type of <alter_specification> is added: <rename index clause> ::= RENAME ( INDEX | KEY ) <oldname> TO <newname> Where <oldname> and <newname> are identifiers for old name and new name of the index. Semantic changes ================ The result of "ALTER TABLE t1 RENAME INDEX a TO b" is a table which contents and structure are identical to the old version of 't1' with the only exception index 'a' being called 'b'. Neither <oldname> nor <newname> can be "primary". The index being renamed should exist and its new name should not be occupied by another index on the same table. Related to: WL#6555, MDEV-13301
* MDEV-16290 ALTER TABLE ... RENAME COLUMN syntaxAleksey Midenkov2020-03-035-0/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | The existing syntax for renaming a column uses "ALTER TABLE ... CHANGE" command. This requires full column specification to rename the column. This patch adds new syntax "ALTER TABLE ... RENAME COLUMN", which do not expect users to provide full column specification. It means that the new syntax would pick in-place or copy algorithm in the same way as that of existing "ALTER TABLE ... CHANGE" command. The existing syntax "ALTER TABLE ... CHANGE" will continue to work. Syntax changes ============== ALTER TABLE tbl_name [alter_specification [, alter_specification] ...] [partition_options] Following is a new <alter_specification> added: | RENAME COLUMN <oldname> TO <newname> Where <oldname> and <newname> are identifiers for old name and new name of the column. Related to: WL#10761
* MDEV-21766 - Forbid XID with empty 'gtrid'Sergey Vojtovich2020-02-282-1/+54
| | | | | | | | | XA specification doesn't permit empty gtrid. It is now enforced by this patch. This solution was agreed in favour of fixing InnoDB, which doesn't expect empty XID since early 10.5. Also fixed wrong assertion (and added a test cases) that didn't permit 64 bytes gtrid + 64 bytes bqual.
* MDEV-21704 Add a new JSON field "version_id" into mysql.global_priv.privAlexander Barkov2020-02-283-0/+221
|
* MDEV-21838: Add information about packed addon fields in ANALYZE FORMAT=JSON10.5-mdev21784-reg1-baseVarun Gupta2020-02-284-0/+90
| | | | | It is useful to know whether sorting uses addon fields[packed|unpacked] or ROWID. Provide this information in ANALYZE FORMAT=JSON output.
* cleanup trailing wsSergey Vojtovich2020-02-272-18/+18
|
* MDEV-10569: Add RELEASE_ALL_LOCKS function. Implementing the SQLDaniel-Solo2020-02-272-1/+149
| | | | function to release all named locks
* MDEV-18650: Options deprecated in previous versions - multi_range_countVicențiu Ciorbaru2020-02-131-3/+0
| | | | Remove deprecated system variable multi_range_count. It was ignored from 5.3.
* MDEV-18650: Options deprecated in previous versions - skip-bdbVicențiu Ciorbaru2020-02-131-2/+0
| | | | Remove the option from mysqld --help text.
* MDEV-18650: Options deprecated in previous versions - thread_concurrencyVicențiu Ciorbaru2020-02-133-28/+0
| | | | thread_concurrency was ignored since 5.5. Remove it.
* MDEV-18650: Options deprecated in previous versions - old_alter_tableVicențiu Ciorbaru2020-02-132-0/+8
| | | | | It was deprecated in 5.5 but it never issued a deprecation warning. Make it issue a warning in 10.5.1.
* MDEV-18650: Options deprecated in previous versions - storage_engineVicențiu Ciorbaru2020-02-13101-507/+507
| | | | | | | Remove usage of deprecated variable storage_engine. It was deprecated in 5.5 but it never issued a deprecation warning. Make it issue a warning in 10.5.1. Replaced with default_storage_engine.
* MDEV-15058: Revert the changes to INFORMATION_SCHEMAMarko Mäkelä2020-02-122-8/+8
| | | | | | | | | | | | | | | For compatibility with diagnostic software, let us return a dummy buffer pool identifier 0 and restore the columns that were initially deleted in commit 1a6f708ec594ac0ae2dd30db926ab07b100fa24b: information_schema.innodb_buffer_page.pool_id information_schema.innodb_buffer_page_lru.pool_id information_schema.innodb_buffer_pool_stats.pool_id information_schema.innodb_cmpmem.buffer_pool_instance information_schema.innodb_cmpmem_reset.buffer_pool_instance Thanks to Vladislav Vaintroub for pointing this out.
* MDEV-21665: Server crashes in my_qsort2 / Filesort_buffer::sort_bufferVarun Gupta2020-02-122-0/+53
| | | | | Allocation should use ALIGN_SIZE when we need to make sure that we have atleast enough space to store one record in MERGEBUFF2 buffers
* MDEV-15058: Deprecate and ignore innodb_buffer_pool_instancesMarko Mäkelä2020-02-122-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our benchmarking efforts indicate that the reasons for splitting the buf_pool in commit c18084f71b02ea707c6461353e6cfc15d7553bc6 have mostly gone away, possibly as a result of mysql/mysql-server@ce6109ebfdedfdf185e391a0c97dc6d33867ed78 or similar work. Only in one write-heavy benchmark where the working set size is ten times the buffer pool size, the buf_pool->mutex would be less contended with 4 buffer pool instances than with 1 instance, in buf_page_io_complete(). That contention could be alleviated further by making more use of std::atomic and by splitting buf_pool_t::mutex further (MDEV-15053). We will deprecate and ignore the following parameters: innodb_buffer_pool_instances innodb_page_cleaners There will be only one buffer pool and one page cleaner task. In a number of INFORMATION_SCHEMA views, columns that indicated the buffer pool instance will be removed: information_schema.innodb_buffer_page.pool_id information_schema.innodb_buffer_page_lru.pool_id information_schema.innodb_buffer_pool_stats.pool_id information_schema.innodb_cmpmem.buffer_pool_instance information_schema.innodb_cmpmem_reset.buffer_pool_instance
* Merge branch '10.4' into 10.5Oleksandr Byelkin2020-02-1244-548/+921
|\
| * Merge branch '10.3' into 10.4Oleksandr Byelkin2020-02-1144-548/+921
| |\
| | * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-02-102-17/+19
| | |
| | * MDEV-21614 Wrong query results with optimizer_switch="split_materialized=on"Igor Babaev2020-02-072-0/+132
| | | | | | | | | | | | | | | | | | | | | Do not materialize a semi-join nest if it contains a materialized derived table /view that potentially can be subject to the split optimization. Splitting of materialization of such nest would help, but currently there is no code to support this technique.
| | * MDEV-20076: SHOW GRANTS does not quote role names properlybb-10.3-MDEV-20076Oleksandr Byelkin2020-02-0534-509/+654
| | | | | | | | | | | | Quotes added to output.
| | * MDEV-21195 INSERT chooses wrong partition for RANGE partitioning by DECIMAL ↵Aleksey Midenkov2020-02-022-0/+90
| | | | | | | | | | | | | | | | | | column Use FLOOR rounding for DECIMAL_RESULT item_expr in partition function.
| | * Merge 10.2 into 10.3Marko Mäkelä2020-01-312-1/+2
| | |
| | * Merge branch 'MDEV-21383' into 10.3Oleksandr Byelkin2020-01-252-0/+121
| | |\
* | | | MDEV-21683 Server crashes in get_quick_keys with not_null_range_scanIgor Babaev2020-02-103-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ANding of the range built from inferred NOT NULL conditions and the range built from other conditions used in WHERE/ON clauses may produce an IMPOSSIBLE range. The code of MDEV-15777 did not take into account this possibility.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-02-074-0/+48
|\ \ \ \ | |/ / /
| * | | MDEV-21616: Server crash when using "SET STATEMENT max_statement_time=0 FOR ↵Oleksandr Byelkin2020-02-052-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | desc xxx" lead to collapse Main select should be pushed first.
| * | | MDEV-20001 Potential dangerous regression: INSERT INTO >=100 rows fail for ↵Sachin2020-02-032-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | myisam table with HASH indexes Problem:- So the issue is when we do bulk insert with rows > MI_MIN_ROWS_TO_DISABLE_INDEXES(100) , We try to disable the indexes to speedup insert. But current logic also disables the long unique indexes. Solution:- In ha_myisam::start_bulk_insert if we find long hash index (HA_KEY_ALG_LONG_HASH) we will not disable the index. This commit also refactors the mi_disable_indexes_for_rebuild function, Since this is function is called at only one place, it is inlined into start_bulk_insert mi_clear_key_active is added into myisamdef.h because now it is also used in ha_myisam.cc file. (Same is done for Aria Storage engine)
| * | | MDEV-18791 Wrong error upon creating Aria table with long index on BLOBSachin Setiya2020-02-022-0/+8
| | | | | | | | | | | | | | | | | | | | If we have long unique key for aria engine return too long key error, because Aria does not support key on virtual generated column.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-01-2816-38/+320
|\ \ \ \ | |/ / /
| * | | Post-merge fixSergei Petrunia2020-01-261-0/+1
| | | |
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-252-0/+121
| |\ \ \ | | | |/ | | |/|
| | * | MDEV-21383: Possible range plan is not used under certain conditionsbb-10.3-mdev21383Sergei Petrunia2020-01-242-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Variant 2 of the fix: collect the attached conditions] Problem: make_join_select() has a section of code which starts with "We plan to scan all rows. Check again if we should use an index." the code in that section will [unnecessarily] re-run the range optimizer using this condition: condition_attached_to_current_table AND current_table's_ON_expr Note that the original invocation of range optimizer in make_join_statistics was done using the whole select's WHERE condition. Taking the whole select's WHERE condition and using multiple-equalities allowed the range optimizer to infer more range restrictions. The fix: - Do range optimization using a condition that is an AND of this table's condition and all of the previous tables' conditions. - Also, fix the range optimizer to prefer SEL_ARGs with type=KEY_RANGE over SEL_ARGS with type=MAYBE_KEY, regardless of the key part. Computing key_and( SEL_ARG(type=MAYBE_KEY key_part=1), SEL_ARG(type=KEY_RANGE, key_part=2) ) will now produce the SEL_ARG with type=KEY_RANGE.
| * | | fix testsOleksandr Byelkin2020-01-241-1/+1
| | | |
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-248-13/+101
| |\ \ \ | | | |/ | | |/|
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-248-13/+101
| | |/
| * | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-217-37/+109
| |\ \ | | |/
| | * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-217-37/+109
| | |
* | | MDEV-21581 Helper functions and methods for CHARSET_INFOAlexander Barkov2020-01-2810-78/+78
| | |
* | | MDEV-21542: main.order_by_pack_big fails sporadically with wrong resultVarun Gupta2020-01-222-207/+207
| | | | | | | | | | | | Made the test order_by_pack_big stable
* | | MDEV-21263: Allow packed values of non-sorted fields in the sort bufferVarun Gupta2020-01-212-0/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This task deals with packing the non-sorted fields (or addon fields). This would lead to efficient usage of the memory allocated for the sort buffer. The changes brought by this feature are 1) Sort buffers would have records of variable length 2) Each record in the sort buffer would be stored like <sort_key1><sort_key2>....<addon_length><null_bytes><field1><field2>.... addon_length is the extra bytes that are required to store the variable length of addon field across different records. 3) Changes in rr_unpack_from_buffer and rr_from_tempfile to take into account the variable length of records. Ported WL#1509 Pack values of non-sorted fields in the sort buffer from MySQL by Tor Didriksen
* | | Merge 10.4 into 10.5Marko Mäkelä2020-01-2052-260/+939
|\ \ \ | |/ /