Sergei Golubchik
44c6328cbb
cleanup: thd->alloc<>() and thd->calloc<>()
...
create templates
thd->alloc<X>(n) to use instead of (X*)thd->alloc(sizeof(X)*n)
and the same for thd->calloc(). By the default the type is char,
so old usage of thd->alloc(size) works too.
2024-11-05 14:00:48 -08:00
Sergei Golubchik
062f8eb37d
cleanup: key algorithm vs key flags
...
the information about index algorithm was stored in two
places inconsistently split between both.
BTREE index could have key->algorithm == HA_KEY_ALG_BTREE, if the user
explicitly specified USING BTREE or HA_KEY_ALG_UNDEF, if not.
RTREE index had key->algorithm == HA_KEY_ALG_RTREE
and always had key->flags & HA_SPATIAL
FULLTEXT index had key->algorithm == HA_KEY_ALG_FULLTEXT
and always had key->flags & HA_FULLTEXT
HASH index had key->algorithm == HA_KEY_ALG_HASH or HA_KEY_ALG_UNDEF
long unique index always had key->algorithm == HA_KEY_ALG_LONG_HASH
In this commit:
All indexes except BTREE and HASH always have key->algorithm
set, HA_SPATIAL and HA_FULLTEXT flags are not used anymore (except
for storage to keep frms backward compatible).
As a side effect ALTER TABLE now detects FULLTEXT index renames correctly
2024-11-05 14:00:47 -08:00
Sergei Golubchik
32e6f8ff2e
cleanup: remove unconditional #ifdef's
2024-11-05 14:00:47 -08:00
Yuchen Pei
2345407b8c
MDEV-34716 Fix mysql.servers socket max length too short
...
The limit of socket length on unix according to libc is 108, see
sockaddr_un::sun_path, but in the table it is a string of max length
64, which results in truncation of socket and failure to connect by
plugins using servers such as spider.
2024-10-15 10:50:22 +11:00
Yuchen Pei
84df8d7275
MDEV-34716 spider: some trivial cleanups and documentation
...
- document tmp_share, which are temporary spider shares with only one
link (no ha)
- simplify spider_get_sys_tables_connect_info() where link_idx is
always 0
2024-10-15 10:50:22 +11:00
Marko Mäkelä
f493e46494
Merge 11.6 into 11.7
2024-10-03 18:15:13 +03:00
Marko Mäkelä
43465352b9
Merge 11.4 into 11.6
2024-10-03 16:09:56 +03:00
Marko Mäkelä
b53b81e937
Merge 11.2 into 11.4
2024-10-03 14:32:14 +03:00
Marko Mäkelä
12a91b57e2
Merge 10.11 into 11.2
2024-10-03 13:24:43 +03:00
Marko Mäkelä
63913ce5af
Merge 10.6 into 10.11
2024-10-03 10:55:08 +03:00
Marko Mäkelä
7e0afb1c73
Merge 10.5 into 10.6
2024-10-03 09:31:39 +03:00
Yuchen Pei
ba7088d462
Merge '11.4' into 11.6
2024-10-03 15:59:20 +10:00
Yuchen Pei
282b92f0a2
MDEV-34589 Do not execute before queries in spider_db_mbase::rollback()
...
Rollback is not supposed to fail. This prevents false failures in
spider rollback.
2024-09-30 16:16:27 +10:00
Yuchen Pei
42735c557e
MDEV-34636 Spider: reset wide_handler->trx in two occasions
...
ha_spider::update_create_info()
ha_spider::append_lock_tables_list()
2024-09-30 15:52:08 +10:00
Yuchen Pei
f43ea935a1
MDEV-34636 Remove implementation of ha-spider::extra() with MERGE flags
2024-09-30 15:51:18 +10:00
Yuchen Pei
69874ee95c
MDEV-34828 Remove some obsolete cmake code related to the removed spider handlersocket support
...
A fixup of MDEV-26858
2024-09-30 15:12:00 +10:00
Lena Startseva
0a5e4a0191
MDEV-31005: Make working cursor-protocol
...
Updated tests: cases with bugs or which cannot be run
with the cursor-protocol were excluded with
"--disable_cursor_protocol"/"--enable_cursor_protocol"
Fix for v.10.5
2024-09-18 18:39:26 +07:00
Yuchen Pei
1f7f406b7b
Merge branch '11.2' into 11.4
2024-09-18 11:27:53 +10:00
Yuchen Pei
ff88633b9c
Merge branch '10.11' into 11.2
2024-09-18 10:45:26 +10:00
Yuchen Pei
cfa9784edb
Merge branch '10.11' into 11.2
2024-09-18 10:25:16 +10:00
Yuchen Pei
a8c5717223
Merge branch '10.6' into 10.11
2024-09-12 10:44:13 +10:00
Yuchen Pei
09b1269e4a
Merge branch '10.5' into 10.6
2024-09-12 10:17:51 +10:00
Yuchen Pei
b168859d1e
Merge branch '10.6' into 10.11
2024-09-11 16:10:53 +10:00
Yuchen Pei
4a09e74387
Merge branch '10.5' into 10.6
2024-09-11 15:49:16 +10:00
Yuchen Pei
fe3432b3bd
MDEV-28009 Deprecate spider_table_crd_thread_count and spider_table_sts_thread_count
...
These variables/parameters have the default read-only value of 1, and
the only way to change them is through a command line flag together
with a command line flag loading spider. After this change, the flag
will have no effect.
2024-09-10 14:48:59 +10:00
Yuchen Pei
cc0faa1e3e
MDEV-31788 Factor functions to reduce duplication around spider_check_and_init_casual_read in ha_spider.cc
...
factored out static functions:
- spider_prep_loop
- spider_start_bg
- spider_send_queries
2024-09-10 11:52:26 +10:00
Yuchen Pei
0ba97e4dc6
MDEV-31788 Factor out calls to spider_ping_table_mon_from_table in ha_spider.cc
2024-09-10 11:52:26 +10:00
Yuchen Pei
9e1579788f
MDEV-31788 Factor spider locking and unlocking code around sending queries
2024-09-10 11:52:22 +10:00
Yuchen Pei
84067291b4
MDEV-28360 Spider: remove #ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
2024-09-10 11:19:19 +10:00
Yuchen Pei
f5b7c25e1e
MDEV-27643 Spider: remove #ifdef HA_CAN_BULK_ACCESS
2024-09-10 11:19:19 +10:00
Yuchen Pei
e7570c7759
MDEV-31788 Remove spider_file_pos
...
They are for unnecessary debugging purposes only.
2024-09-10 11:19:18 +10:00
Yuchen Pei
a81f419b06
MDEV-27648 remove #define HASH_UPDATE_WITH_HASH_VALUE
...
The functions called in blocks protected by this macro remain
undefined as of 11.5 c96b23f994
2024-09-10 11:19:14 +10:00
Yuchen Pei
5d54e86c22
MDEV-26178 spider: delete spd_environ.h
...
It's virtually empty now
2024-09-10 11:15:18 +10:00
Yuchen Pei
869c501ac3
MDEV-27644 Spider: remove HANDLER_HAS_DIRECT_AGGREGATE
2024-09-10 11:15:18 +10:00
Yuchen Pei
3a58291680
MDEV-27662 remove SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
2024-09-10 11:15:17 +10:00
Yuchen Pei
84977868b1
MDEV-27809 remove SPIDER_I_S_USE_SHOW_FOR_COLUMN
...
Show::Column() was added in MDEV-19772
4156b1a260
2024-09-10 11:15:17 +10:00
Yuchen Pei
6287fb6e17
MDEV-27652 remove #ifdef HA_HAS_CHECKSUM_EXTENDED
...
handler::pre_calculate_checksum was added in MDEV-16249
be5c432a42
2024-09-10 11:15:17 +10:00
Yuchen Pei
e8a5553cef
MDEV-27808 remove SPIDER_LIKE_FUNC_HAS_GET_NEGATED
...
get_negated() was introduced in MDEV-16707
2024-09-10 11:15:16 +10:00
Yuchen Pei
ab49b46d01
MDEV-27664 remove SPIDER_SQL_CACHE_IS_IN_LEX
...
sql_cache was moved to lex in MDEV-11953 in
de745ecf29
2024-09-10 11:15:16 +10:00
Yuchen Pei
a1e5ee9111
MDEV-27663 remove SPIDER_USE_CONST_ITEM_FOR_STRING_INT_REAL_DECIMAL_DATE_ITEM
...
{STRING|INT|REAL|DECIMAL|DATE}_ITEM were replaced with CONST_ITEM in
MDEV-14630 c20cd68e60
2024-09-10 11:15:16 +10:00
Yuchen Pei
5e98471df1
MDEV-27811: remove SPIDER_MDEV_16246
...
MDEV-16246 was fixed long ago. And this macro was removed in other
versions too
2024-09-10 11:15:15 +10:00
Yuchen Pei
8c8684b17f
MDEV-28226 Remove HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
...
handler::need_info_for_auto_inc() was added in MDEV-7720 / MDEV-7726
in commit dc17ac1638
2024-09-10 11:15:15 +10:00
Yuchen Pei
affcb0713d
MDEV-26178 spider: remove PARTITION_HAS_GET_PART_SPEC
...
This macro is unused, and not in 11.5 c96b23f994
2024-09-10 11:15:15 +10:00
Yuchen Pei
6d0d09ebc2
MDEV-26178 Spider: remove HANDLER_HAS_TOP_TABLE_FIELDS
...
This macro is unused
2024-09-10 11:15:14 +10:00
Yuchen Pei
1cb75d9a33
MDEV-27660 Remove #ifdef SPIDER_HANDLER_START_BULK_INSERT_HAS_FLAGS
...
The flag argument was added to handler::start_bulk_insert() in
the MDEV-539 commit
ca2cdaad86
2024-09-10 11:15:14 +10:00
Yuchen Pei
aaba68ac1e
MDEV-28896 Spider: remove #ifdef SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
...
new_data is const since at least 2017: a05a610d60
2024-09-10 11:15:14 +10:00
Yuchen Pei
f16c037753
MDEV-28895 Spider: remove #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
...
handler has can_use_for_auto_inc_init() since at latest 2017:
dc17ac1638
2024-09-10 11:15:14 +10:00
Yuchen Pei
0650c87d9b
MDEV-27647 Spider: remove HANDLER_HAS_DIRECT_UPDATE_ROWS
2024-09-10 11:15:13 +10:00
Yuchen Pei
d5d65b948b
MDEV-26178 Spider: remove HA_EXTRA_HAS_HA_EXTRA_USE_CMP_REF
...
HA_EXTRA_USE_CMP_REF is undefined, and remains so as of 11.5
c96b23f994
2024-09-10 11:15:13 +10:00
Yuchen Pei
de3dd942c0
MDEV-28894 Spider: remove #ifdef HA_EXTRA_HAS_STARTING_ORDERED_INDEX_SCAN
...
HA_EXTRA_STARTING_ORDERED_INDEX_SCAN was added latest 2018:
921c5e9314
2024-09-10 11:15:13 +10:00