diff options
author | unknown <andrey@lmy004.> | 2006-08-09 17:07:59 +0200 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-08-09 17:07:59 +0200 |
commit | 0231ca09b52bab67e2a351505b00b03a83cdf939 (patch) | |
tree | 8add82a7a23abefa4aab657ecd11bb931d29c3f5 /sql/sql_yacc.yy | |
parent | e60678aef6e5ae7c9ddb03a3ab8ccb68689a9801 (diff) | |
download | mariadb-git-0231ca09b52bab67e2a351505b00b03a83cdf939.tar.gz |
Fix for bug#20701 BINARY keyword should be forbidden in stored routines
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed.
Fix after 2nd review
mysql-test/r/sp-error.result:
update result
mysql-test/r/sp.result:
update result
mysql-test/t/sp-error.test:
add a test case for bug#20701 BINARY keyword should be forbidden in stored procedures
mysql-test/t/sp.test:
Fix test case which uses binary for the return value of a function.
It's no more possible after fix for bug#20701
BINARY keyword should be forbidden in SP
Fix few glitches where ; is used instead of | . The delimiter is |
sql/sql_yacc.yy:
Fix for bug#20701 BINARY keyword should be forbidden in stored routines
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ff422c4418c..d94281ed9cc 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1672,6 +1672,17 @@ create_function_tail: { LEX *lex= Lex; sp_head *sp= lex->sphead; + /* + This was disabled in 5.1.12. See bug #20701 + When collation support in SP is implemented, then this test + should be removed. + */ + if (($8 == FIELD_TYPE_STRING || $8 == MYSQL_TYPE_VARCHAR) + && (lex->type & BINCMP_FLAG)) + { + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "return value collation"); + YYABORT; + } if (sp->fill_field_definition(YYTHD, lex, (enum enum_field_types) $8, |