summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2021-10-11 13:36:07 +0300
committerAleksey Midenkov <midenok@gmail.com>2021-10-11 13:36:07 +0300
commitff77a09bda884fe6bf3917eb29b9d3a2f53f919b (patch)
tree4b75790eb1210abd03af3ea7bf276a2b9a9c1598 /client/mysql.cc
parent1e70b287e702b7ff9191454d1316d9137b9be0c1 (diff)
downloadmariadb-git-ff77a09bda884fe6bf3917eb29b9d3a2f53f919b.tar.gz
MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used anywhere else and is always empty). The fix would be to return back the original fields list. But this fails update_use_source.test case: --error ER_BAD_FIELD_ERROR update v1 set t1c1=2 order by 1; Actually not failing the above seems to be ok. The other fix would be to keep resolve_in_select_list false (and that keeps outer context from being resolved in Item_ref::fix_fields()). This fix is more consistent with how SELECT behaves: --error ER_SUBQUERY_NO_1_ROW select a from t1 where a= (select 2 from t1 having (a = 3)); So this patch implements this fix.
Diffstat (limited to 'client/mysql.cc')
0 files changed, 0 insertions, 0 deletions