-
unknown authored
When the ORDER BY clause gets fixed it's allowed to search in the current item_list in order to find aliased fields and expressions. This is ok for a SELECT but wrong for an UPDATE statement. If the ORDER BY clause will contain a non-existing field which is mentioned in the UPDATE set list then the server will crash due to using of non-existing (0x0) field. When an Item_field is getting fixed it's allowed to search item list for aliased expressions and fields only for selects. sql/sql_base.cc: Bug#25126: Wrongly resolved field leads to a crash. When an Item_field is getting fixed it's allowed to search item list for aliased expressions and fields only for selects. sql/sql_select.cc: Bug#25126: Wrongly resolved field leads to a crash. When an Item_field is getting fixed it's allowed to search item list for aliased expressions and fields only for selects. mysql-test/r/update.result: Added a test case for bug#25126: Wrongly resolved field leads to a crash. mysql-test/t/update.test: Added a test case for bug#25126: Wrongly resolved field leads to a crash.
72773f4f