summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp-error.result11
-rw-r--r--mysql-test/t/sp-error.test21
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index a2f7d5def27..5f755592452 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -259,4 +259,15 @@ declare c cursor for select * from t1;
declare c cursor for select field from t1;
end;
ERROR 42000: Duplicate cursor: c
+create procedure bug1965()
+begin
+declare c cursor for select val from t1 order by valname;
+open c;
+close c;
+end;
+call bug1965();
+ERROR 42S22: Unknown column 'valname' in 'order clause'
+drop procedure bug1965;
+select 1 into a;
+ERROR 42000: Undeclared variable: a
drop table t1;
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 211c4a63b8f..132a6b086c6 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -341,6 +341,27 @@ begin
declare c cursor for select field from t1;
end|
+#
+# BUG#1965
+#
+create procedure bug1965()
+begin
+ declare c cursor for select val from t1 order by valname;
+ open c;
+ close c;
+end|
+
+--error 1054
+call bug1965()|
+drop procedure bug1965|
+
+#
+# BUG#1966
+#
+--error 1308
+select 1 into a|
+
+
drop table t1|
delimiter ;|