[Commits] 782668c: Fixed a problem with compound.test.

IgorBabaev igor at mariadb.com
Sun Apr 1 06:10:19 EEST 2018


revision-id: 782668c87c764c2726f931aae679b1699cec4607 (mariadb-10.3.1-131-g782668c)
parent(s): 1fbba66f4f3aef8851906b4ec4517ba7d4e7d1f1
author: Igor Babaev
committer: Igor Babaev
timestamp: 2018-03-31 20:10:19 -0700
message:

Fixed a problem with compound.test.

---
 sql/sp_head.cc | 1 +
 sql/sql_lex.h  | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 4dc139f..781f903 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -545,6 +545,7 @@ sp_head::sp_head(const Sp_handler *sph)
    Database_qualified_name(&null_clex_str, &null_clex_str),
    m_handler(sph),
    m_flags(0),
+   m_tmp_query(NULL),
    m_explicit_name(false),
    /*
      FIXME: the only use case when name is NULL is events, and it should
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 19ab89b..2e93eaa 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -3629,6 +3629,11 @@ struct LEX: public Query_tables_list
   {
     size_t pos= start - substatement_query(thd);
     size_t len= end - start;
+    if (!substatement_query(thd))
+    {
+      pos= 0;
+      len= 0;
+    }
     DBUG_ASSERT(pos < UINT_MAX32);
     DBUG_ASSERT(len < UINT_MAX32);
     return add_placeholder(thd, name, (uint) pos, (uint) len);


More information about the commits mailing list