Commit 3d544050 authored by unknown's avatar unknown

Test case for Bug#13675: DATETIME/DATE type in store proc param

seems to be converted as varbinary.

The bug has been already fixed. This CS just adds a test case for it.


mysql-test/r/sp.result:
  Update result file.
mysql-test/t/sp.test:
  Test case for BUG#13675.
parent 901ead6c
......@@ -6314,4 +6314,56 @@ CALL p1();
NULL
SET NAMES default;
DROP PROCEDURE p1;
# Bug#13675.
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP TABLE IF EXISTS t1;
CREATE PROCEDURE p1(v DATETIME) CREATE TABLE t1 SELECT v;
CREATE PROCEDURE p2(v INT) CREATE TABLE t1 SELECT v;
CALL p1(NOW());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CALL p1('text');
Warnings:
Warning 1264 Out of range value adjusted for column 'v' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CALL p2(10);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` bigint(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CALL p2('text');
Warnings:
Warning 1366 Incorrect integer value: 'text' for column 'v' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` bigint(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
End of 5.0 tests
......@@ -7299,4 +7299,58 @@ CALL p1();
SET NAMES default;
DROP PROCEDURE p1;
#
# Bug#13675: DATETIME/DATE type in store proc param seems to be converted as
# varbinary
#
--echo
--echo # Bug#13675.
--echo
--disable_warnings
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo
CREATE PROCEDURE p1(v DATETIME) CREATE TABLE t1 SELECT v;
CREATE PROCEDURE p2(v INT) CREATE TABLE t1 SELECT v;
--echo
CALL p1(NOW());
SHOW CREATE TABLE t1;
--echo
DROP TABLE t1;
--echo
CALL p1('text');
SHOW CREATE TABLE t1;
--echo
DROP TABLE t1;
--echo
CALL p2(10);
SHOW CREATE TABLE t1;
--echo
DROP TABLE t1;
--echo
CALL p2('text');
SHOW CREATE TABLE t1;
--echo
DROP TABLE t1;
--echo
DROP PROCEDURE p1;
DROP PROCEDURE p2;
--echo End of 5.0 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment