diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2016-12-13 05:07:02 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2016-12-14 12:45:50 +0530 |
commit | f41bd7e54512d4e283ba909b4c3a700382cf1147 (patch) | |
tree | 342322188fc51e7b1b01805893be754b9f03235e /sql/opt_range.cc | |
parent | 0c79de2419194f850e92de6ffa48d2e92055ee50 (diff) | |
download | mariadb-git-f41bd7e54512d4e283ba909b4c3a700382cf1147.tar.gz |
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
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bed57f3273f..0577ef01bb2 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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)); |