mariadb/storage/spider
Alexander Barkov e2da748c29 MDEV-28835 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT
Problem:

Item_func_date_format::val_str() and make_date_time() did not take into
account that the format string and the result string
(separately or at the same time) can be of a tricky character set
like UCS2, UTF16, UTF32. As a result, DATE_FORMAT() could generate
an ill-formed result which crashed on DBUG_ASSERTs testing well-formedness
in other parts of the code.

Fix:

1. class String changes
   Removing String::append_with_prefill(). It was not compatible with
   tricky character sets. Also it was inconvenient to use and required
   too much duplicate code on the caller side.
   Adding String::append_zerofill() instead. It's compatible with tricky
   character sets and is easier to use.
   Adding helper methods Static_binary_string::q_append_wc() and
   String::append_wc(), to append a single wide character
   (a Unicode code point in my_wc_t).

2. storage/spider changes
   Removing spider_string::append_with_prefill().
   It used String::append_with_prefix() inside, but it was unused itself.

3. Changing tricky charset incompatible code pieces in make_date_time()
   to compatible replacements:

   - Fixing the loop scanning the format string to iterate in terms
     of Unicode code points (using mb_wc()) rather than in terms
     of "char" items.
   - Using append_wc(my_wc_t) instead of append(char) to append
     a single character to the result string.
   - Using append_zerofill() instead of append_with_prefill() to
     append date/time numeric components to the result string.
2023-10-04 08:51:48 +04:00
..
hs_client Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
mysql-test/spider MDEV-31936 Simplify deinit_spider.inc 2023-09-25 12:15:14 +10:00
scripts MDEV-19842 Crash while creating statistics for Spider table (#1355) 2019-07-06 23:52:53 +09:00
CMakeLists.txt Fix CMake warning in spider, in Windows ninja build 2019-09-12 17:06:06 +02:00
configure.in
ha_spider.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
ha_spider.h Merge 10.3 into 10.4 2022-06-27 10:14:37 +03:00
Makefile.am
spd_conn.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_conn.h MDEV-16508 spider: sql_mode not maintained between spider node and data nodes (#1347) 2019-06-29 03:35:48 +09:00
spd_copy_tables.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_copy_tables.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_db_conn.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_db_conn.h Merge 10.3 into 10.4 2022-06-27 10:14:37 +03:00
spd_db_handlersocket.cc MDEV-18973 CLIENT_FOUND_ROWS wrong in spider 2019-11-29 23:23:57 +09:00
spd_db_handlersocket.h MDEV-18973 CLIENT_FOUND_ROWS wrong in spider 2019-11-29 23:23:57 +09:00
spd_db_include.cc MDEV-16249 CHECKSUM TABLE for a spider table is not parallel and saves all data in memory in the spider head by default (#1328) 2019-06-11 00:25:08 +09:00
spd_db_include.h MDEV-28835 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT 2023-10-04 08:51:48 +04:00
spd_db_mysql.cc MDEV-31673 MDEV-29502 Remove spider_db_handler::need_lock_before_set_sql_for_exec 2023-09-14 16:37:34 +10:00
spd_db_mysql.h MDEV-31673 MDEV-29502 Remove spider_db_handler::need_lock_before_set_sql_for_exec 2023-09-14 16:37:34 +10:00
spd_db_oracle.cc MDEV-20502 Queries against spider tables return wrong values for columns following constant declarations. 2021-01-12 10:25:03 +01:00
spd_db_oracle.h MDEV-18973 CLIENT_FOUND_ROWS wrong in spider 2019-11-29 23:23:57 +09:00
spd_direct_sql.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_direct_sql.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_environ.h MDEV-18993 The keep-alive connection (set spider_conn_recycle_mode = 1) in spider would cause cash in MariaDB (#1269) 2020-06-27 14:42:36 +09:00
spd_err.h MDEV-6275 spider_same_server_link not enforced (#1330) 2019-06-12 19:30:50 +09:00
spd_group_by_handler.cc MDEV-31673 MDEV-29502 Remove spider_db_handler::need_lock_before_set_sql_for_exec 2023-09-14 16:37:34 +10:00
spd_group_by_handler.h merge Spider 3.3.13 2017-12-03 13:58:36 +02:00
spd_i_s.cc Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
spd_include.h MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_init_query.h MDEV-19842 Crash while creating statistics for Spider table (#1355) 2019-07-06 23:52:53 +09:00
spd_malloc.cc MDEV-28835 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT 2023-10-04 08:51:48 +04:00
spd_malloc.h MDEV-20179 Server hangs on shutdown during installation of Spider (#1368) 2019-07-30 06:16:48 +09:00
spd_param.cc MDEV-31524 Fixing spider table param / variable overriding 2023-07-13 13:22:24 +10:00
spd_param.h MDEV-16508 spider: sql_mode not maintained between spider node and data nodes (#1347) 2019-06-29 03:35:48 +09:00
spd_ping_table.cc MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and ha_spider.cc 2022-09-26 23:23:13 +09:00
spd_ping_table.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
spd_sys_table.cc Merge branch '10.3' into 10.4 2022-08-02 14:15:39 +02:00
spd_sys_table.h MDEV-19842 Crash while creating statistics for Spider table (#1355) 2019-07-06 23:52:53 +09:00
spd_table.cc MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups 2023-09-15 13:15:33 +10:00
spd_table.h MDEV-31117 Fix spider connection info parsing 2023-08-23 11:21:14 +10:00
spd_trx.cc MDEV-31787 MDEV-26151 Add a test exercising non-0 spider_casual_read 2023-09-15 11:15:41 +10:00
spd_trx.h MDEV-16508 spider: sql_mode not maintained between spider node and data nodes (#1347) 2019-06-29 03:35:48 +09:00
spd_udf.cc Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
spd_udf.def
spd_udf.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00