summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24853: Duplicate key generated during cluster configuration changeJulius Goryavsky2021-03-081-131/+177
| | | | | | | | | | | | | | | | | Incorrect processing of an auto-incrementing field in the WSREP-related code during applying transactions results in a duplicate key being created. This is due to the fact that at the beginning of the write_row() and update_row() functions, the values of the auto-increment parameters are used, which are read from the parameters of the current thread, but further along the code other values are used, which are read from global variables (when applying a transaction). This can happen when the cluster configuration has changed while applying a transaction (for example in the high_priority_service mode for Galera 4). Further during IST processing duplicating key is detected, and processing of the DB_DUPLICATE_KEY return code (inside innodb, in the write_row() handler) results in a call to the wsrep_thd_self_abort() function.
* fixup 58b56f14a096285a0e51b2233fc35398f1b01f5a: Remove dead codeMarko Mäkelä2021-03-043-33/+6
| | | | | | | row_prebuilt_t::m_no_prefetch: Remove (it was always false). row_prebuilt_t::m_read_virtual_key: Remove (it was always false). Only ha_innopart ever set these fields.
* MDEV-25051 Race condition between persistent statistics and RENAME TABLE or ↵Marko Mäkelä2021-03-041-14/+18
| | | | | | | | | | | | | | | | | | | TRUNCATE innobase_rename_table(): Invoke dict_stats_wait_bg_to_stop_using_table() to ensure that dict_stats_update() cannot be accessing the table name that we will be modifying. If we are executing RENAME rather than TRUNCATE, reset the flag at the end so that persistent statistics can be calculated again. The race condition was encountered with ASAN and rr. Sorry, there is no test case, like there is for nothing related to dict_stats_wait_bg_to_stop_using_table(). The entire code is an ugly work-around for the failure of dict_stats_process_entry_from_recalc_pool() to acquire MDL. Note: It appears that an ALTER TABLE that is not rebuilding the table will fail to reset the flag that blocks the processing of statistics.
* MDEV-24748 extern column check missing in btr_index_rec_validate()Thirunarayanan Balathandayuthapani2021-03-031-0/+12
| | | | | | | | In btr_index_rec_validate(), externally stored column check is missing while matching the length of the field with the length of the field data stored in record. Fetch the length of the externally stored part and compare it with the fixed field length.
* MDEV-20648 InnoDB: Failing assertion: !(*node)->being_extended, ↵bb-10.2-MDEV-20648Thirunarayanan Balathandayuthapani2021-03-031-14/+26
| | | | | | | innodb.log_data_file_size failed in buildbot, assertion `!space->is_stopping()' InnoDB should check whether the tablespace is being deleted while extending the tablespace.
* MDEV-24532 Table corruption ER_NO_SUCH_TABLE_IN_ENGINE .. on table with ↵Monty2021-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | foreign key When doing a truncate on an Innodb under lock tables, InnoDB would rename the old table to #sql-... and recreate a new 't1' table. The table lock would still be on the #sql-table. When doing ALTER TABLE, Innodb would do the changes on the #sql table (which would disappear on close). When the SQL layer, as part of inline alter table, would close the original t1 table (#sql in InnoDB) and then reopen the t1 table, Innodb would notice that this does not match it's own (old) t1 table and generate an error. Fixed by adding code in truncate table that if we are under lock tables and truncating an InnoDB table, we would close, reopen and lock the table after truncate. This will remove the #sql table and ensure that lock tables is using the new empty table. Reviewer: Marko Mäkelä
* MDEV-24913 Assertion !recv_no_log_write in log_write_up_to()Thirunarayanan Balathandayuthapani2021-02-231-2/+1
| | | | | | | | - The commit 5fd3c7471e3e0673b50d309567c9747d36f09412(MDEV-24709) resets the recv_no_ibuf_operations in recv_recovery_from_checkpoint_start(), but InnoDB fails to reset the variable recv_no_log_write() during that time and that leads to the assert failure.
* Merge branch 'bb-10.2-release' into 10.2Sergei Golubchik2021-02-2214-306/+500
|\
| * Fix connect engine ppc64 failOlivier Bertrand2021-02-052-7/+7
| |
| * Fix of connect engine crashesOlivier Bertrand2021-02-051-0/+2
| |
| * Fix of crashes of connect engine.Oleksandr Byelkin2021-02-053-24/+24
| | | | | | | | Use size_t everywhere and remove suspicious expression.
| * Fix of random crashes of connect engine (probably depend on addresses used)-Oleksandr Byelkin2021-02-051-1/+1
| |
| * Fix compiler warnings of the new connect engine.Oleksandr Byelkin2021-02-051-0/+1
| |
| * Revert "Fix of warnings on aarch64 like:"Oleksandr Byelkin2021-02-022-5/+5
| | | | | | | | | | | | Fixed by the author in other way (char -> short) This reverts commit 496f7090a825ac7ee54a6b5f9700e5f261e4bce0.
| * Merge remote-tracking branch 'connect/10.2' into 10.2Oleksandr Byelkin2021-02-0213-269/+460
| |\
| | * Fix failed test bson and xmlOlivier Bertrand2021-02-021-1/+7
| | |
| | * Fix failed test bson and xmlOlivier Bertrand2021-01-303-4/+2
| | |
| | * Update bson_get_item modified: bsonudf.cppOlivier Bertrand2021-01-291-9/+8
| | |
| | * Fix decimal problems in bson udf'sOlivier Bertrand2021-01-284-138/+116
| | |
| | * - Continue BSON developmentOlivier Bertrand2021-01-2813-131/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/bsonudf.h modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/bson.result modified: storage/connect/mysql-test/connect/r/bson_udf.result modified: storage/connect/mysql-test/connect/t/bson_udf.inc modified: storage/connect/mysql-test/connect/t/bson_udf.test modified: storage/connect/mysql-test/connect/t/bson_udf2.inc modified: storage/connect/tabbson.cpp modified: storage/connect/tabbson.h
* | | MDEV-24863 AHI entries mismatch with the index while reloading the evicted ↵Thirunarayanan Balathandayuthapani2021-02-221-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables. - This is caused by commit ad6171b91cac33e70bb28fa6865488b2c65e858c (MDEV-22456). InnoDB reloads the evicted table again from dictionary. In that case, AHI entries and current index object mismatches happens. When index object mismatches then InnoDB should drop the page hash AHI entries for the block. In btr_search_drop_page_hash_index(), InnoDB should take exclusive lock on the AHI latch if index is already freed to avoid the freed memory access during buf_pool_resize()
* | | MDEV-24873 : galera.galera_as_slave_ctas MTR failed: Assertion ↵Jan Lindström2021-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | `(&(&LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&LOCK_thd_data)->m_mutex)->thread)' failed in sql_class.cc on THD::awake(killed_state) Problem was that thd::awake assumes now that you hold THD::LOCK_thd_data so we need to keep it when we call wsrep_thd_awake from wsrep_abort_transaction.
* | | MDEV-24763 ALTER TABLE fails to rename a column in SYS_FIELDSMarko Mäkelä2021-02-121-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innobase_rename_column_try(): When renaming SYS_FIELDS records for secondary indexes, try to use both formats of SYS_FIELDS.POS as keys, in case the PRIMARY KEY includes a column prefix. Without this fix, an ALTER TABLE that renames a column followed by a server restart (or LRU eviction of the table definition from dict_sys) would make the table inaccessible.
* | | MDEV-24790 CAST('0e1111111111' AS DECIMAL(38,0)) returns a wrong resultAlexander Barkov2021-02-081-3/+2
| | |
* | | Updating test results in rocksdb test suite after MDEV-11172 is fixedVarun Gupta2021-02-013-5/+5
|/ /
* | fix of warning on windowsOleksandr Byelkin2021-01-292-2/+2
| |
* | Fix of warnings on aarch64 like:Oleksandr Byelkin2021-01-292-5/+5
| | | | | | | | | | | | | | bson.cpp:1775:3: error: case label value is less than minimum value for type [-Werror] case TYPE_NULL: bson.cpp:1776:7: error: statement will never be executed [-Werror=switch-unreachable] b = true;
* | fix warnings returned by gcc v10.0Oleksandr Byelkin2021-01-295-9/+12
| |
* | Merge remote-tracking branch 'connect/10.2' 10.2Oleksandr Byelkin2021-01-2994-2184/+18357
|\ \ | |/
| * Fix some Json and Bson bugsOlivier Bertrand2021-01-204-6/+29
| |
| * Fix failed testOlivier Bertrand2021-01-132-0/+4
| |
| * Fix failed testOlivier Bertrand2021-01-122-4/+0
| |
| * - Remove static linkage to cpprestsdk when it is installedOlivier Bertrand2021-01-129-72/+1327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/CMakeLists.txt - Continue BSON development modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/bsonudf.h added: storage/connect/mysql-test/connect/r/bson_udf.result added: storage/connect/mysql-test/connect/t/bson_udf.inc added: storage/connect/mysql-test/connect/t/bson_udf.test added: storage/connect/mysql-test/connect/t/bson_udf2.inc
| * Re-include BSON into CMakeLists.txtOlivier Bertrand2021-01-101-0/+13
| |
| * Remove changes to CMakeLists.txt that cause compile errorOlivier Bertrand2021-01-101-25/+6
| |
| * - add the test on RESTOlivier Bertrand2021-01-104-7/+66
| |
| * - Add the new BSON temporary type for testingOlivier Bertrand2021-01-0821-425/+4226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/CMakeLists.txt modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/bsonudf.h modified: storage/connect/global.h modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/disabled.def modified: storage/connect/mysql-test/connect/t/mongo_test.inc modified: storage/connect/plugutil.cpp modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp
| * - Fix jfile_convert crash on error. modified: jsonudf.cpp (plus BSON UDF's)Olivier Bertrand2020-12-316-152/+2861
| |
| * - Continue BSON implementation + fix create modified ha_connect.ccOlivier Bertrand2020-12-265-125/+132
| |
| * Make REST tables default file name. Commit before continuing BSON developmentOlivier Bertrand2020-12-226-32/+57
| |
| * - Fix json parser (void objects not recognized) modified: json.cppOlivier Bertrand2020-12-182-12/+15
| |
| * - Fix crash with JsonContains UDF + BSON developmentOlivier Bertrand2020-12-174-25/+17
| |
| * - Fix pretty=2 Tabjson bug on INSERT.Olivier Bertrand2020-12-1510-908/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occuring when inserting more than one line in one statement. modified: storage/connect/json.cpp - Fix a wrong if statement modified: storage/connect/tabjson.cpp - Continue BSON implementation modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/filamtxt.cpp modified: storage/connect/filamtxt.h modified: storage/connect/tabbson.cpp modified: storage/connect/tabbson.h - No need anymore deleted: storage/connect/mysql-test/connect/r/bson.result deleted: storage/connect/mysql-test/connect/t/bson.test
| * BSON developmentOlivier Bertrand2020-12-116-103/+249
| |
| * - Fix json_bjson (s was erase by Json_Subset)Olivier Bertrand2020-12-0912-614/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h - Fix compile error (Force_Bson was not conditional by BSON_SUPPORT) modified: storage/connect/ha_connect.cc - Continue Bjson implementation modified: storage/connect/block.h modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/bsonudf.h modified: storage/connect/plugutil.cpp modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp - Typo deleted: storage/connect/Header.h
| * - Continue BSON implementationOlivier Bertrand2020-12-0814-99/+1033
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/cmgfam.cpp modified: storage/connect/cmgfam.h modified: storage/connect/ha_connect.cc modified: storage/connect/jmgfam.cpp modified: storage/connect/jmgfam.h modified: storage/connect/jmgoconn.cpp modified: storage/connect/mycat.cc modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp
| * Remove a push warning causing failing assert. Modified ↵Olivier Bertrand2020-12-0410-570/+400
| | | | | | | | storage/connect/filamap.cpp
| * Fix failed compile modified storage/connect/ha_connect.ccOlivier Bertrand2020-12-021-1/+2
| |
| * Fix failed compile modified storage/connect/ha_connect.cc and mycat.ccOlivier Bertrand2020-12-012-12/+12
| |
| * - Fix memory leak for the JSON table typeOlivier Bertrand2020-12-0116-181/+3214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (and continue BSON implementatio) modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/connect.cc modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/mycat.cc modified: storage/connect/plgdbsem.h modified: storage/connect/plugutil.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/user_connect.cc - Desesperatly trying to fix xml.test failure modified: storage/connect/mysql-test/connect/r/xml.result