diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-21 16:00:09 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-21 16:00:09 +0400 |
commit | 961cc887bfae0551682ca3f2db7d92147aafd7e4 (patch) | |
tree | 4ba18d703863ae5823227c9a720530db5e02e4e5 /sql/item_xmlfunc.h | |
parent | f2a631f0dcd87d6d53ae0293bfb70364ca30dc4d (diff) | |
download | mariadb-git-961cc887bfae0551682ca3f2db7d92147aafd7e4.tar.gz |
Fix for bug #32557: order by updatexml causes assertion in filesort
Problem: even if an Item_xml_str_func successor returns NULL, it doesn't have
a corresponding property (maybe_null) set, that leads to a failed assertion.
Fix: set nullability property of Item_xml_str_func.
mysql-test/r/xml.result:
Fix for bug #32557: order by updatexml causes assertion in filesort
- test result.
mysql-test/t/xml.test:
Fix for bug #32557: order by updatexml causes assertion in filesort
- test case.
sql/item_xmlfunc.h:
Fix for bug #32557: order by updatexml causes assertion in filesort
- set Item_xml_str_func::maybe_null.
Diffstat (limited to 'sql/item_xmlfunc.h')
-rw-r--r-- | sql/item_xmlfunc.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h index 278c98baf7c..dadbb5ccf42 100644 --- a/sql/item_xmlfunc.h +++ b/sql/item_xmlfunc.h @@ -28,8 +28,16 @@ protected: String tmp_value, pxml; Item *nodeset_func; public: - Item_xml_str_func(Item *a, Item *b): Item_str_func(a,b) {} - Item_xml_str_func(Item *a, Item *b, Item *c): Item_str_func(a,b,c) {} + Item_xml_str_func(Item *a, Item *b): + Item_str_func(a,b) + { + maybe_null= TRUE; + } + Item_xml_str_func(Item *a, Item *b, Item *c): + Item_str_func(a,b,c) + { + maybe_null= TRUE; + } void fix_length_and_dec(); String *parse_xml(String *raw_xml, String *parsed_xml_buf); }; |