[MDEV-12206] Query_cache::send_result_to_client() may corrupt THD::query_plan_flags Created: 2017-03-08  Updated: 2017-03-08  Resolved: 2017-03-08

Status: Closed
Project: MariaDB Server
Component/s: Query Cache
Affects Version/s: 5.5
Fix Version/s: 10.0.22, 10.1.8, 10.2.0, 5.5.55

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None


 Description   

Due to missing parentheses in a macro definition, a statement is corrupting some flags:

/mariadb/5.5/sql/log_slow.h:30:36: warning: left shift of negative value [-Wshift-negative-value]
#define QPLAN_QC_NO           1 << 6
                                   ^
/mariadb/5.5/sql/sql_cache.cc:2084:52: note: in expansion of macro 'QPLAN_QC_NO'
   thd->query_plan_flags= (thd->query_plan_flags & ~QPLAN_QC_NO) | QPLAN_QC;

This bug was already fixed in MariaDB Server 10.0.22 and merged to 10.1.8 and 10.2.0.


Generated at Thu Feb 08 07:55:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.