mariadb/storage
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
..
archive Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
blackhole Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
cassandra MDEV-31358: Update description for MariaDB debian/rpm packages 2023-07-03 17:45:58 +10:00
connect MDEV-31003: Second execution for ps-protocol 2023-07-26 17:15:00 +07:00
csv Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
example Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
federated Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
federatedx Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
heap Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
innobase MDEV-18200 MariaBackup full backup failed with InnoDB: Failing assertion: success 2023-09-26 08:55:52 +10:00
maria Fix use of uninitialized variable 2023-07-03 15:46:58 +02:00
mroonga MDEV-31970 ASAN errors in grn_obj_unlink / ha_mroonga::clear_indexes upon index operations 2023-09-08 19:12:35 +02:00
myisam MDEV-28054 Various crashes upon INSERT/UPDATE after changing Aria settings 2023-05-02 23:37:10 +03:00
myisammrg Merge branch '10.3' into 10.4 2020-08-03 14:44:06 +02:00
oqgraph oqgraph: remove clang warnings 2023-09-08 10:50:15 +01:00
perfschema MDEV-29091: Correct event_name in PFS for wait caused by FOR UPDATE 2023-02-15 14:36:05 +00:00
rocksdb MDEV-29993: myrocks_hotbackup.1 and test suite files installed when engine is disabled 2023-09-20 08:18:57 +10:00
sequence Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
sphinx Merge branch '10.3' into 10.4 2022-10-26 14:55:47 +02:00
spider MDEV-28835 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT 2023-10-04 08:51:48 +04:00
test_sql_discovery MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
tokudb MDEV-31003: Second execution for ps-protocol 2023-07-26 17:15:00 +07:00