diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index e3406e4bbde..ac394a9df3d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6210,6 +6210,13 @@ Warning 1265 Data truncated for column 'bug5274_f1' at row 1 Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| +drop procedure if exists proc_21513| +create procedure proc_21513()`my_label`:BEGIN END| +show create procedure proc_21513| +Procedure sql_mode Create Procedure +proc_21513 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_21513`() +`my_label`:BEGIN END +drop procedure proc_21513| End of 5.0 tests. drop table t1,t2; CREATE TABLE t1 (a int auto_increment primary key) engine=MyISAM; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index d1056285d8d..c0fa16c0811 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -328,7 +328,7 @@ static LEX_STRING get_quoted_token(Lex_input_stream *lip, yyUnget(); // ptr points now after last token char tmp.length= lip->yytoklen=length; tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); - from= lip->tok_start + skip + from= lip->tok_start + skip; to= tmp.str; end= to+length; for ( ; to != end; )