diff options
author | unknown <pem@mysql.com> | 2006-02-16 13:40:37 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2006-02-16 13:40:37 +0100 |
commit | 8dd6e1454a0cf0cc4e974c9dd8f71e77cf7e8a68 (patch) | |
tree | c545690e7a67a8afc9456423d6cf37191acd7919 /mysql-test/t/sp-error.test | |
parent | 3f4c176caeb5e1f9b2d56ab7536d0931bcafe76c (diff) | |
download | mariadb-git-8dd6e1454a0cf0cc4e974c9dd8f71e77cf7e8a68.tar.gz |
Fixed BUG#17015: Routine name truncation not an error
The name length was checked "the old way", not taking charsets into account,
when creating a stored routine.
Fixing this enforces the real limit (64 characters) again, and no truncation
is possible.
mysql-test/r/sp-error.result:
Updated results for BUG#17015.
mysql-test/t/sp-error.test:
Added and modified test case for BUG#17015 (and 9529).
sql/sp.cc:
When creating a routine, check the length of the name the correct way,
taking the charsets into account.
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r-- | mysql-test/t/sp-error.test | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index c4745537de3..9f98b776633 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -926,12 +926,26 @@ end| # # BUG#9529: Stored Procedures: No Warning on truncation of procedure name # during creation. -# Note: When using utf8 for mysql.proc, this limit is much higher than before +# BUG#17015: Routine name truncation not an error +# When we started using utf8 for mysql.proc, this limit appeared +# to be higher, but in reality the names were truncated. --error ER_TOO_LONG_IDENT -create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123() +create procedure bug9529_901234567890123456789012345678901234567890123456789012345() begin end| +--disable_warnings +drop procedure if exists bug17015_0123456789012345678901234567890123456789012345678901234| +--enable_warnings +# Check the upper limit, just to make sure. +create procedure bug17015_0123456789012345678901234567890123456789012345678901234() +begin +end| + +--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00' +show procedure status like 'bug17015%'| +drop procedure bug17015_0123456789012345678901234567890123456789012345678901234| + # # BUG#10969: Stored procedures: crash if default() function @@ -1721,4 +1735,3 @@ create aggregate function bug16896() returns int return 1; #drop procedure if exists bugNNNN| #--enable_warnings #create procedure bugNNNN... - |