summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-vars.result
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2007-05-16 14:25:38 +0200
committerunknown <thek@adventure.(none)>2007-05-16 14:25:38 +0200
commitd9ce3033f5cb1a3e75a46ffd17746b113a5ff97d (patch)
treef3b9c7d973e2f13ee3c031de05ba145823911dc2 /mysql-test/r/sp-vars.result
parentb763ff9a6b0d946a691559db6d69bd821783b8a9 (diff)
downloadmariadb-git-d9ce3033f5cb1a3e75a46ffd17746b113a5ff97d.tar.gz
Bug#27415 Text Variables in stored procedures
- Problem was reported as a SP variable using itself as right value inside SUBSTR caused corruption of data. - This bug could not be verified in either 5.0bk or 5.1bk - Added test case to prevent future regressions. mysql-test/r/sp-vars.result: Added test case for a reported regression which couldn't be verified. mysql-test/t/sp-vars.test: Added test case for a reported regression which couldn't be verified.
Diffstat (limited to 'mysql-test/r/sp-vars.result')
-rw-r--r--mysql-test/r/sp-vars.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result
index b112c6bece6..f3eb40b3d70 100644
--- a/mysql-test/r/sp-vars.result
+++ b/mysql-test/r/sp-vars.result
@@ -1161,3 +1161,44 @@ CALL p1();
v_text
abc|def
DROP PROCEDURE p1;
+DROP PROCEDURE IF EXISTS bug27415_text_test|
+DROP PROCEDURE IF EXISTS bug27415_text_test2|
+CREATE PROCEDURE bug27415_text_test(entity_id_str_in text)
+BEGIN
+DECLARE str_remainder text;
+SET str_remainder = entity_id_str_in;
+select 'before substr', str_remainder;
+SET str_remainder = SUBSTRING(str_remainder, 3);
+select 'after substr', str_remainder;
+END|
+CREATE PROCEDURE bug27415_text_test2(entity_id_str_in text)
+BEGIN
+DECLARE str_remainder text;
+DECLARE str_remainder2 text;
+SET str_remainder2 = entity_id_str_in;
+select 'before substr', str_remainder2;
+SET str_remainder = SUBSTRING(str_remainder2, 3);
+select 'after substr', str_remainder;
+END|
+CALL bug27415_text_test('a,b,c')|
+before substr str_remainder
+before substr a,b,c
+after substr str_remainder
+after substr b,c
+CALL bug27415_text_test('a,b,c')|
+before substr str_remainder
+before substr a,b,c
+after substr str_remainder
+after substr b,c
+CALL bug27415_text_test2('a,b,c')|
+before substr str_remainder2
+before substr a,b,c
+after substr str_remainder
+after substr b,c
+CALL bug27415_text_test('a,b,c')|
+before substr str_remainder
+before substr a,b,c
+after substr str_remainder
+after substr b,c
+DROP PROCEDURE bug27415_text_test|
+DROP PROCEDURE bug27415_text_test2|