1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11060 sql/protocol.cc:532: void Protocol::end_statement(): Assertion `0' failed

In file sql/opt_range.cc,when calculate_cond_selectivity_for_table() is called with optimizer_use_condition_selectivity=4 then
	- thd->no_errors is set to 1
	- the original value of thd->no_error is not restored to its original value
	- this is causing the assertion to fail in the subsequent queries

Fixed by restoring the original value of thd->no_errors
This commit is contained in:
Varun Gupta
2016-12-13 05:07:02 +05:30
parent 0c79de2419
commit f41bd7e545
3 changed files with 54 additions and 0 deletions

View File

@ -3112,6 +3112,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
}
free_alloc:
thd->no_errors= 0;
thd->mem_root= param.old_root;
free_root(&alloc, MYF(0));