mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Problem:
- The string passed to Sql_path::from_text() could be in
various character sets, returned by Item::val_str_ascii(),
which is not necessarily utf8mb3.
- While the code in Sql_path::from_text() was written in the way
that "str" was considered to be in utf8mb3.
- As as result, cs->charset() in this line:
auto len = cs->charlen(curr, end);
could return a negative value and the whole loop got stuck.
Changes:
- Fixing Sys_var_path::from_item() to use val_str() instead of val_str_ascii(),
to get the original value from "item", without any conversion.
- Moving the conversion code inside Sql_path::from_text().
12 KiB
12 KiB