Commit c788e69
Sreeharsha Ramanavarapu
Bug #20730155: BACKPORT BUG#19699237 TO 5.1
Backport from mysql-5.5 to mysql-5.1 Bug# 19699237: UNINITIALIZED VARIABLE IN ITEM_FIELD::STR_RESULT LEADS TO INCORRECT BEHAVIOR ISSUE: ------ When the following conditions are satisfied in a query, a server crash occurs: a) Two rows are compared using a NULL-safe equal-to operator. b) Each of these rows belong to different charsets. SOLUTION: --------- When one charset is converted to another for comparision, the constructor of "Item_func_conv_charset" is called. This will attempt to use the Item_cache if the string is a constant. This check succeeds because the "used_table_map" of the Item_cache class is never set to the correct value. Since it is mistakenly assumed to be a constant, it tries to fetch the relevant null value related fields which are yet to be initialized. This results in valgrind issues and wrong results. The fix is to update the "used_table_map" of "Item_cache". This will allow "Item_func_conv_charset" to realise that this is not a constant.1 parent 3c02e6e commit c788e69
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
3024 | 3024 | | |
3025 | 3025 | | |
3026 | 3026 | | |
| 3027 | + | |
3027 | 3028 | | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
3028 | 3032 | | |
3029 | 3033 | | |
3030 | 3034 | | |
| |||
0 commit comments