mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH
MALFORMED XPATH EXP Problem: A malformed XPATH expression in the ExtractValue query is causing a server crash. This malformed XPATH expression is resulted when the position attribute in the substring function contains ".." in the beginning. Solution: The original crash is happening because the "../" is being evaluated prematurely. It tries to access XML while it hasn't been parsed yet. The premature evaluation is happening because the val_nodeset function is being set to constant, in which case we proceed to evaluate them in JOIN:prepare stage only. The solution to this is setting the val_nodeset functions as non-constant. This forces us to evaluate the function in the JOIN:exec stage and thus avoid any premature evaluation of the XML strings.
This commit is contained in:
commit
df20283086
1 changed files with 3 additions and 0 deletions
|
@ -226,6 +226,9 @@ public:
|
|||
{
|
||||
max_length= MAX_BLOB_WIDTH;
|
||||
collation.collation= pxml->charset();
|
||||
// To avoid premature evaluation, mark all nodeset functions as non-const.
|
||||
used_tables_cache= RAND_TABLE_BIT;
|
||||
const_item_cache= false;
|
||||
}
|
||||
const char *func_name() const { return "nodeset"; }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue