1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #54734 assert in Diagnostics_area::set_ok_status

This assert checks that the server does not try to send OK to the
client if there has been some error during processing. This is done
to make sure that the error is in fact sent to the client.

The problem was that view errors during processing of WHERE conditions
in UPDATE statements where not detected by the update code. It therefore
tried to send OK to the client, triggering the assert.
The bug was only noticeable in debug builds.

This patch fixes the problem by making sure that the update code
checks for errors during condition processing and acts accordingly.
This commit is contained in:
Jon Olav Hauglid
2010-07-19 11:03:52 +02:00
parent 0b83096be5
commit 4b2378a148
7 changed files with 66 additions and 25 deletions

View File

@@ -788,7 +788,11 @@ class SQL_SELECT :public Sql_alloc {
tmp.set_all();
return test_quick_select(thd, tmp, 0, limit, force_quick_range) < 0;
}
inline bool skip_record() { return cond ? cond->val_int() == 0 : 0; }
inline bool skip_record(THD *thd, bool *skip_record)
{
*skip_record= cond ? cond->val_int() == FALSE : FALSE;
return thd->is_error();
}
int test_quick_select(THD *thd, key_map keys, table_map prev_tables,
ha_rows limit, bool force_quick_range);
};