summaryrefslogtreecommitdiff
path: root/storage/spider
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmergeOleksandr Byelkin2021-02-163-45/+44
|\
| * Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-153-45/+44
| |\
| | * Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-123-45/+44
| | |\ | | | | | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | | * MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-273-45/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
| | | * MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2021-01-122-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | following constant declarations. Add test cases.
| | | * MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2021-01-1210-4/+216
| | | | | | | | | | | | | | | | | | | | | | | | following constant declarations. When executing a query like "select id, 0 as const, val from ...", there are 3 columns(items) in Query->select at handlerton->create_group_by(). After that, MariaDB makes a temporary table with 2 columns. The skipped items are const item, so fixing Spider to skip const items for items at Query->select.
| | | * MDEV-20100 MariaDB 13.3.9 Crash "[ERROR] mysqld got signal 11 ;"Kentoku SHIBA2020-10-205-0/+264
| | | | | | | | | | | | | | | | Some functions on ha_partition call functions on all partitions, but handler->reset() is only called that pruned by m_partitions_to_reset. So Spider didn't clear pointer on unpruned partitions, if the unpruned partitions are used by next query, Spider reference the pointer that is already freed.
| | | * MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-078-543/+1622
| | | | | | | | | | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
| | | * MDEV-18993 The keep-alive connection (set spider_conn_recycle_mode = 1) in ↵Kentoku SHIBA2020-06-272-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spider would cause cash in MariaDB (#1269) Fix the following valgrind error. ==94390== Thread 29: ==94390== Invalid read of size 8 ==94390== at 0x78389D: thd_increment_bytes_sent (sql_class.cc:4265) ==94390== by 0xC8EC46: net_real_write (net_serv.cc:730) ==94390== by 0xC8E0C8: net_flush (net_serv.cc:383) ==94390== by 0xC8E4D0: net_write_command (net_serv.cc:521) ==94390== by 0xADCE61: cli_advanced_command (client.c:468) ==94390== by 0xAE3CAF: mysql_close_slow_part (client.c:3671) ==94390== by 0xAE3D28: mysql_close (client.c:3683) ==94390== by 0x149E69A8: spider_db_mbase::disconnect() (spd_db_mysql.cc:2217) ==94390== by 0x1491EA26: spider_db_disconnect(st_spider_conn*) (spd_db_conn.cc:297) ==94390== by 0x14948EBE: spider_free_conn_alloc(st_spider_conn*) (spd_conn.cc:196) ==94390== by 0x1494B26A: spider_free_conn(st_spider_conn*) (spd_conn.cc:1251) ==94390== by 0x1494941F: spider_free_conn_from_trx(st_spider_transaction*, st_spider_conn*, bool, bool, int*) (spd_conn.cc:315) ==94390== Address 0x1f0e0990 is 4,832 bytes inside a block of size 25,728 free'd ==94390== at 0x4C2ACBD: free (vg_replace_malloc.c:530) ==94390== by 0x13F5545: my_free (my_malloc.c:222) ==94390== by 0x6C75B7: ilink::operator delete(void*, unsigned long) (sql_list.h:618) ==94390== by 0x77B9F6: THD::~THD() (sql_class.cc:1724) ==94390== by 0x1494FCE0: spider_bg_conn_action(void*) (spd_conn.cc:2580) ==94390== by 0x4E3DDD4: start_thread (in /usr/lib64/libpthread-2.17.so) ==94390== by 0x5FBFEAC: clone (in /usr/lib64/libc-2.17.so) ==94390== Block was alloc'd at ==94390== at 0x4C29BC3: malloc (vg_replace_malloc.c:299) ==94390== by 0x13F4DFA: my_malloc (my_malloc.c:101) ==94390== by 0x1491CF06: ilink::operator new(unsigned long) (sql_list.h:614) ==94390== by 0x1494F7FD: spider_bg_conn_action(void*) (spd_conn.cc:2501) ==94390== by 0x4E3DDD4: start_thread (in /usr/lib64/libpthread-2.17.so) ==94390== by 0x5FBFEAC: clone (in /usr/lib64/libc-2.17.so) ==94390== Invalid write of size 8 ==94390== at 0x7838AF: thd_increment_bytes_sent (sql_class.cc:4265) ==94390== by 0xC8EC46: net_real_write (net_serv.cc:730) ==94390== by 0xC8E0C8: net_flush (net_serv.cc:383) ==94390== by 0xC8E4D0: net_write_command (net_serv.cc:521) ==94390== by 0xADCE61: cli_advanced_command (client.c:468) ==94390== by 0xAE3CAF: mysql_close_slow_part (client.c:3671) ==94390== by 0xAE3D28: mysql_close (client.c:3683) ==94390== by 0x149E69A8: spider_db_mbase::disconnect() (spd_db_mysql.cc:2217) ==94390== by 0x1491EA26: spider_db_disconnect(st_spider_conn*) (spd_db_conn.cc:297) ==94390== by 0x14948EBE: spider_free_conn_alloc(st_spider_conn*) (spd_conn.cc:196) ==94390== by 0x1494B26A: spider_free_conn(st_spider_conn*) (spd_conn.cc:1251) ==94390== by 0x1494941F: spider_free_conn_from_trx(st_spider_transaction*, st_spider_conn*, bool, bool, int*) (spd_conn.cc:315) ==94390== Address 0x1f0e0990 is 4,832 bytes inside a block of size 25,728 free'd ==94390== at 0x4C2ACBD: free (vg_replace_malloc.c:530) ==94390== by 0x13F5545: my_free (my_malloc.c:222) ==94390== by 0x6C75B7: ilink::operator delete(void*, unsigned long) (sql_list.h:618) ==94390== by 0x77B9F6: THD::~THD() (sql_class.cc:1724) ==94390== by 0x1494FCE0: spider_bg_conn_action(void*) (spd_conn.cc:2580) ==94390== by 0x4E3DDD4: start_thread (in /usr/lib64/libpthread-2.17.so) ==94390== by 0x5FBFEAC: clone (in /usr/lib64/libc-2.17.so) ==94390== Block was alloc'd at ==94390== at 0x4C29BC3: malloc (vg_replace_malloc.c:299) ==94390== by 0x13F4DFA: my_malloc (my_malloc.c:101) ==94390== by 0x1491CF06: ilink::operator new(unsigned long) (sql_list.h:614) ==94390== by 0x1494F7FD: spider_bg_conn_action(void*) (spd_conn.cc:2501) ==94390== by 0x4E3DDD4: start_thread (in /usr/lib64/libpthread-2.17.so) ==94390== by 0x5FBFEAC: clone (in /usr/lib64/libc-2.17.so)
| | | * MDEV-21884 MariaDB with Spider crashes on a querybb-10.3-MDEV-21884Kentoku SHIBA2020-04-176-0/+293
| | | |
| | * | MDEV-20100 MariaDB 13.3.9 Crash "[ERROR] mysqld got signal 11 ;"Kentoku SHIBA2020-10-225-0/+264
| | | | | | | | | | | | | | | | Some functions on ha_partition call functions on all partitions, but handler->reset() is only called that pruned by m_partitions_to_reset. So Spider didn't clear pointer on unpruned partitions, if the unpruned partitions are used by next query, Spider reference the pointer that is already freed.
| | * | MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵bb-10.4-midenok-MDEV-18706Kentoku SHIBA2020-09-078-545/+1658
| | | | | | | | | | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
| | * | MDEV-22246 Result rows duplicated by spider engineKentoku SHIBA2020-08-249-0/+335
| | | | | | | | | | | | | | | | | | | | fix the following type mrr scan (select 0,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`)union all(select 1,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`) order by `id`
| | * | MDEV-20827 Wrong param parsing in spider_direct_sql() when param contain commaKentoku SHIBA2020-08-179-33/+213
| | | |
| | * | MDEV-19794 Spider crash with XAKentoku SHIBA2020-08-146-4/+191
| | | |
| | * | MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2020-05-052-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | following constant declarations. Add test cases.
| | * | MDEV-21884 MariaDB with Spider crashes on a queryKentoku SHIBA2020-04-231-5/+2
| | | | | | | | | | | | | | | | Fix a test result.
| | * | MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2020-04-1710-4/+216
| | | | | | | | | | | | | | | | | | | | | | | | following constant declarations. When executing a query like "select id, 0 as const, val from ...", there are 3 columns(items) in Query->select at handlerton->create_group_by(). After that, MariaDB makes a temporary table with 2 columns. The skipped items are const item, so fixing Spider to skip const items for items at Query->select.
| | * | MDEV-21884 MariaDB with Spider crashes on a queryKentoku SHIBA2020-04-176-0/+293
| | | |
* | | | MDEV-24424 Unnecessary usage of to_float() for INSERT into the Spider table ↵Kentoku SHIBA2020-12-226-1/+131
| | | | | | | | | | | | | | | | | | | | | | | | with float column Change default wrapper from mysql to mariadb.
* | | | Merge 10.5 into 10.6Marko Mäkelä2020-11-021-1/+1
|\ \ \ \ | |/ / /
| * | | SPIDER storage engine plugin -> StableSergei Golubchik2020-10-291-1/+1
| | | |
| * | | MDEV-20100 MariaDB 13.3.9 Crash "[ERROR] mysqld got signal 11 ;"Kentoku SHIBA2020-10-225-0/+264
| | | | | | | | | | | | | | | | Some functions on ha_partition call functions on all partitions, but handler->reset() is only called that pruned by m_partitions_to_reset. So Spider didn't clear pointer on unpruned partitions, if the unpruned partitions are used by next query, Spider reference the pointer that is already freed.
| * | | MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-078-598/+1673
| | | | | | | | | | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
| * | | Fix a compiler warningKentoku SHIBA2020-08-261-0/+1
| | | |
| * | | MDEV-23561 Spider doesn't work with ps protocolKentoku SHIBA2020-08-2610-294/+193
| | | |
| * | | Fix indents of SpiderKentoku SHIBA2020-08-264-10/+10
| | | |
| * | | MDEV-22246 Result rows duplicated by spider engineKentoku SHIBA2020-08-249-0/+335
| | | | | | | | | | | | | | | | | | | | fix the following type mrr scan (select 0,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`)union all(select 1,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`) order by `id`
| * | | MDEV-20827 Wrong param parsing in spider_direct_sql() when param contain commaKentoku SHIBA2020-08-179-33/+213
| | | |
| * | | MDEV-19794 Spider crash with XAKentoku SHIBA2020-08-146-4/+193
| | | |
* | | | MDEV-20100 MariaDB 13.3.9 Crash "[ERROR] mysqld got signal 11 ;"Kentoku SHIBA2020-10-225-0/+264
| | | | | | | | | | | | | | | | Some functions on ha_partition call functions on all partitions, but handler->reset() is only called that pruned by m_partitions_to_reset. So Spider didn't clear pointer on unpruned partitions, if the unpruned partitions are used by next query, Spider reference the pointer that is already freed.
* | | | MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-078-598/+1673
| | | | | | | | | | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
* | | | Fix a compiler warningKentoku SHIBA2020-08-261-0/+1
| | | |
* | | | MDEV-23561 Spider doesn't work with ps protocolbb-10.6-MDEV-7098Kentoku SHIBA2020-08-2610-294/+193
| | | |
* | | | Fix indents of SpiderKentoku SHIBA2020-08-264-10/+10
| | | |
* | | | MDEV-22246 Result rows duplicated by spider engineKentoku SHIBA2020-08-249-0/+335
| | | | | | | | | | | | | | | | | | | | fix the following type mrr scan (select 0,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`)union all(select 1,`id`,`node` from `auto_test_remote`.`tbl_a` where (`id` <> 0) order by `id`) order by `id`
* | | | MDEV-20827 Wrong param parsing in spider_direct_sql() when param contain commaKentoku SHIBA2020-08-179-33/+213
| | | |
* | | | MDEV-19794 Spider crash with XAKentoku SHIBA2020-08-146-4/+193
| | | |
* | | | Merge 10.5 into 10.6Marko Mäkelä2020-08-121-1/+1
|\ \ \ \ | |/ / /
| * | | Added 'final' to some classes to improve generated codeMichael Widenius2020-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Final added to: - All reasonable classes inhereted from Field - All classes inhereted from Protocol - Almost all Handler classes - Some important Item classes The stripped size of mariadbd is just 4K smaller, but several object files showed notable improvements in common execution paths. - Checked field.o and item_sum.o Other things: - Added 'override' to a few class functions touched by this patch. - Removed 'virtual' from a new class functions that had/got 'override' - Changed Protocol_discard to inherit from Protocol instad of Protocol_text
* | | | MENT-807 Crash with CREATE TEMPORARY TABLE .. ENGINE=SPIDER .. wrapper "odbc"Kentoku SHIBA2020-08-111-0/+4
| | | |
* | | | [Spider] Add add checking default_value for default_file, host, portKentoku SHIBA2020-08-076-24/+199
| | | |
* | | | add a table parameter "driver" to SpiderKentoku SHIBA2020-08-078-27/+240
| | | |
* | | | add a table parameter "filedsn" to SpiderKentoku SHIBA2020-08-078-28/+241
| | | |
* | | | Merge 10.5 into 10.6Marko Mäkelä2020-08-042-3/+6
|\ \ \ \ | |/ / /
| * | | Unify config syntax in default filesOtto Kekäläinen2020-08-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Include a link to the relevant KB article for more info - Use spaced around the equal sign for better readability and so that the examples are more aligned with the general style in the KB - Load plugins with just the base name, the .so is optional and excess
| * | | Remove String::lex_string() and String::lex_cstring()Monty2020-07-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Better to use 'String *' directly. - Added String::get_value(LEX_STRING*) for the few cases where we want to convert a String to LEX_CSTRING. Other things: - Use StringBuffer for some functions to avoid mallocs
* | | | change version for spider_rewrite to 10.7Kentoku SHIBA2020-07-151-2/+2
| | | |
* | | | MDEV-21612 - remove COM_MULTI from server and C/CVladislav Vaintroub2020-07-141-1/+1
|/ / / | | | | | | | | | | | | | | | | | | The COM_MULTI did not take off. No connector is using it. Remove related code from server, and client. If anything it is a step simplification of already-bloated dispatch_command(), and related code.
* | | replace HTON_AUTOMATIC_DELETE_TABLE with return -1 from drop_table()Sergei Golubchik2020-07-041-1/+1
| | |