summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-06-13 07:31:41 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-06-13 07:31:41 -0600
commit4b435ac7c703f2dbd50efc17248961e03c9284c0 (patch)
treec4dc7ff7ccacd63b281e629623ee2b6508de009c
parentf09496c8c23160a9b775a8123ae0b080f314885e (diff)
downloadmariadb-git-4b435ac7c703f2dbd50efc17248961e03c9284c0.tar.gz
Fixed valgrind error, caused by incorrect pointer arithetic
sql/sql_yacc.yy: Fixed valgrind error: the same buffer (preprocessed) should be used when extracting the text of expr
-rw-r--r--sql/sql_yacc.yy6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 837c1699249..a17a0475ac5 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -8006,16 +8006,14 @@ procedure_list2:
| procedure_item;
procedure_item:
- remember_name expr
+ remember_name expr remember_end
{
THD *thd= YYTHD;
- Lex_input_stream *lip= thd->m_lip;
if (add_proc_to_list(thd, $2))
MYSQL_YYABORT;
if (!$2->name)
- $2->set_name($1,(uint) ((char*) lip->get_tok_end() - $1),
- thd->charset());
+ $2->set_name($1, (uint) ($3 - $1), thd->charset());
}
;