summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-07-08 11:37:34 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-07-09 10:25:22 +0530
commitfd08f953222b854428dc259631e8fc707fe34619 (patch)
treed178b0351fc9ec2776a74af1f864fc007d21a285 /sql
parent838bb9fad4bdb5bcdead40a0d60efd57fb529bca (diff)
downloadmariadb-git-fd08f953222b854428dc259631e8fc707fe34619.tar.gz
MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store, Assertion `field_handlers == 0 || field_pos < field_count'
The problem was that sp_head::MULTI_RESULTS was not set correctly for ANALYZE statement with SELECT ... INTO variable. This is a follow up fix for MDEV-7023
Diffstat (limited to 'sql')
-rw-r--r--sql/sp_head.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index c3274e2cecd..5c5688be4a3 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -212,7 +212,7 @@ sp_get_flags_for_command(LEX *lex)
switch (lex->sql_command) {
case SQLCOM_SELECT:
- if (lex->result)
+ if (lex->result && !lex->analyze_stmt)
{
flags= 0; /* This is a SELECT with INTO clause */
break;