List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:November 18 2011 12:58pm
Subject:bzr push into mysql-trunk branch (mayank.prasad:3598 to 3599) WL#5885
View as plain text  
 3599 Mayank Prasad	2011-11-18
      WL#5885 
      
      details:
      - Added test case for IS_ROUTINES/PARAMETERS tables
        to test DATETIME PRECISION for values 1-6.

    modified:
      mysql-test/r/information_schema_parameters.result
      mysql-test/r/information_schema_routines.result
      mysql-test/t/information_schema_parameters.test
      mysql-test/t/information_schema_routines.test
 3598 Mayank Prasad	2011-11-18
      WL#5885 
      
      details: 
      - added testcase to test different datetime_precision
      values (1-6).

    modified:
      mysql-test/r/information_schema.result
      mysql-test/t/information_schema.test
=== modified file 'mysql-test/r/information_schema_parameters.result'
--- a/mysql-test/r/information_schema_parameters.result	2011-11-03 07:50:03 +0000
+++ b/mysql-test/r/information_schema_parameters.result	2011-11-18 12:58:18 +0000
@@ -495,13 +495,72 @@ def	i_s_parameters_test	test_func5	1	IN
 DROP DATABASE IF EXISTS i_s_parameters_test;
 CREATE DATABASE i_s_parameters_test;
 USE i_s_parameters_test;
-CREATE PROCEDURE test_proc1 (OUT p_p1 timestamp) BEGIN SELECT 1 ; END; \\
-CREATE FUNCTION test_func1 (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE PROCEDURE test_proc (OUT p_p1 datetime,OUT p_p2 time,OUT p_p3 timestamp) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc0 (OUT p_p1 datetime(0),OUT p_p2 time(0),OUT p_p3 timestamp(0)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc1 (OUT p_p1 datetime(1),OUT p_p2 time(1),OUT p_p3 timestamp(1)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc2 (OUT p_p1 datetime(2),OUT p_p2 time(2),OUT p_p3 timestamp(2)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc3 (OUT p_p1 datetime(3),OUT p_p2 time(3),OUT p_p3 timestamp(3)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc4 (OUT p_p1 datetime(4),OUT p_p2 time(4),OUT p_p3 timestamp(4)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc5 (OUT p_p1 datetime(5),OUT p_p2 time(5),OUT p_p3 timestamp(5)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc6 (OUT p_p1 datetime(6),OUT p_p2 time(6),OUT p_p3 timestamp(6)) BEGIN SELECT 1 ; END; \\
+CREATE FUNCTION test_func (f_p1 DATETIME, f_p2 TIMESTAMP) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func0 (f_p1 DATETIME(0), f_p2 TIMESTAMP(0)) RETURNS TIME(0) RETURN NULL;
+CREATE FUNCTION test_func1 (f_p1 DATETIME(1), f_p2 TIMESTAMP(1)) RETURNS TIME(1) RETURN NULL;
+CREATE FUNCTION test_func2 (f_p1 DATETIME(2), f_p2 TIMESTAMP(2)) RETURNS TIME(2) RETURN NULL;
+CREATE FUNCTION test_func3 (f_p1 DATETIME(3), f_p2 TIMESTAMP(3)) RETURNS TIME(3) RETURN NULL;
+CREATE FUNCTION test_func4 (f_p1 DATETIME(4), f_p2 TIMESTAMP(4)) RETURNS TIME(4) RETURN NULL;
+CREATE FUNCTION test_func5 (f_p1 DATETIME(5), f_p2 TIMESTAMP(5)) RETURNS TIME(5) RETURN NULL;
+CREATE FUNCTION test_func6 (f_p1 DATETIME(6), f_p2 TIMESTAMP(6)) RETURNS TIME(6) RETURN NULL;
 SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, PARAMETER_NAME, DATA_TYPE, 
 DATETIME_PRECISION from INFORMATION_SCHEMA.PARAMETERS WHERE 
 SPECIFIC_SCHEMA='i_s_parameters_test';
 SPECIFIC_SCHEMA	SPECIFIC_NAME	PARAMETER_NAME	DATA_TYPE	DATETIME_PRECISION
-i_s_parameters_test	test_func1	NULL	time	0
-i_s_parameters_test	test_func1	f_p1	datetime	0
-i_s_parameters_test	test_proc1	p_p1	timestamp	0
+i_s_parameters_test	test_func	NULL	time	0
+i_s_parameters_test	test_func	f_p1	datetime	0
+i_s_parameters_test	test_func	f_p2	timestamp	0
+i_s_parameters_test	test_func0	NULL	time	0
+i_s_parameters_test	test_func0	f_p1	datetime	0
+i_s_parameters_test	test_func0	f_p2	timestamp	0
+i_s_parameters_test	test_func1	NULL	time	1
+i_s_parameters_test	test_func1	f_p1	datetime	1
+i_s_parameters_test	test_func1	f_p2	timestamp	1
+i_s_parameters_test	test_func2	NULL	time	2
+i_s_parameters_test	test_func2	f_p1	datetime	2
+i_s_parameters_test	test_func2	f_p2	timestamp	2
+i_s_parameters_test	test_func3	NULL	time	3
+i_s_parameters_test	test_func3	f_p1	datetime	3
+i_s_parameters_test	test_func3	f_p2	timestamp	3
+i_s_parameters_test	test_func4	NULL	time	4
+i_s_parameters_test	test_func4	f_p1	datetime	4
+i_s_parameters_test	test_func4	f_p2	timestamp	4
+i_s_parameters_test	test_func5	NULL	time	5
+i_s_parameters_test	test_func5	f_p1	datetime	5
+i_s_parameters_test	test_func5	f_p2	timestamp	5
+i_s_parameters_test	test_func6	NULL	time	6
+i_s_parameters_test	test_func6	f_p1	datetime	6
+i_s_parameters_test	test_func6	f_p2	timestamp	6
+i_s_parameters_test	test_proc	p_p1	datetime	0
+i_s_parameters_test	test_proc	p_p2	time	0
+i_s_parameters_test	test_proc	p_p3	timestamp	0
+i_s_parameters_test	test_proc0	p_p1	datetime	0
+i_s_parameters_test	test_proc0	p_p2	time	0
+i_s_parameters_test	test_proc0	p_p3	timestamp	0
+i_s_parameters_test	test_proc1	p_p1	datetime	1
+i_s_parameters_test	test_proc1	p_p2	time	1
+i_s_parameters_test	test_proc1	p_p3	timestamp	1
+i_s_parameters_test	test_proc2	p_p1	datetime	2
+i_s_parameters_test	test_proc2	p_p2	time	2
+i_s_parameters_test	test_proc2	p_p3	timestamp	2
+i_s_parameters_test	test_proc3	p_p1	datetime	3
+i_s_parameters_test	test_proc3	p_p2	time	3
+i_s_parameters_test	test_proc3	p_p3	timestamp	3
+i_s_parameters_test	test_proc4	p_p1	datetime	4
+i_s_parameters_test	test_proc4	p_p2	time	4
+i_s_parameters_test	test_proc4	p_p3	timestamp	4
+i_s_parameters_test	test_proc5	p_p1	datetime	5
+i_s_parameters_test	test_proc5	p_p2	time	5
+i_s_parameters_test	test_proc5	p_p3	timestamp	5
+i_s_parameters_test	test_proc6	p_p1	datetime	6
+i_s_parameters_test	test_proc6	p_p2	time	6
+i_s_parameters_test	test_proc6	p_p3	timestamp	6
 DROP DATABASE i_s_parameters_test;

=== modified file 'mysql-test/r/information_schema_routines.result'
--- a/mysql-test/r/information_schema_routines.result	2011-11-03 07:50:03 +0000
+++ b/mysql-test/r/information_schema_routines.result	2011-11-18 12:58:18 +0000
@@ -791,10 +791,56 @@ DROP DATABASE IF EXISTS i_s_routines_tes
 CREATE DATABASE i_s_routines_test;
 USE i_s_routines_test;
 CREATE PROCEDURE test_proc1 (OUT p_p1 timestamp) BEGIN SELECT 1 ; END; \\
-CREATE FUNCTION test_func1 (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func_t (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func_dt (f_p1 DATETIME) RETURNS DATETIME RETURN NULL;
+CREATE FUNCTION test_func_ts (f_p1 DATETIME) RETURNS TIMESTAMP RETURN NULL;
+CREATE FUNCTION test_func_t0 (f_p1 DATETIME) RETURNS TIME(0) RETURN NULL;
+CREATE FUNCTION test_func_dt0 (f_p1 DATETIME) RETURNS DATETIME(0) RETURN NULL;
+CREATE FUNCTION test_func_ts0 (f_p1 DATETIME) RETURNS TIMESTAMP(0) RETURN NULL;
+CREATE FUNCTION test_func_t1 (f_p1 DATETIME) RETURNS TIME(1) RETURN NULL;
+CREATE FUNCTION test_func_dt1 (f_p1 DATETIME) RETURNS DATETIME(1) RETURN NULL;
+CREATE FUNCTION test_func_ts1 (f_p1 DATETIME) RETURNS TIMESTAMP(1) RETURN NULL;
+CREATE FUNCTION test_func_t2 (f_p1 DATETIME) RETURNS TIME(2) RETURN NULL;
+CREATE FUNCTION test_func_dt2 (f_p1 DATETIME) RETURNS DATETIME(2) RETURN NULL;
+CREATE FUNCTION test_func_ts2 (f_p1 DATETIME) RETURNS TIMESTAMP(2) RETURN NULL;
+CREATE FUNCTION test_func_t3 (f_p1 DATETIME) RETURNS TIME(3) RETURN NULL;
+CREATE FUNCTION test_func_dt3 (f_p1 DATETIME) RETURNS DATETIME(3) RETURN NULL;
+CREATE FUNCTION test_func_ts3 (f_p1 DATETIME) RETURNS TIMESTAMP(3) RETURN NULL;
+CREATE FUNCTION test_func_t4 (f_p1 DATETIME) RETURNS TIME(4) RETURN NULL;
+CREATE FUNCTION test_func_dt4 (f_p1 DATETIME) RETURNS DATETIME(4) RETURN NULL;
+CREATE FUNCTION test_func_ts4 (f_p1 DATETIME) RETURNS TIMESTAMP(4) RETURN NULL;
+CREATE FUNCTION test_func_t5 (f_p1 DATETIME) RETURNS TIME(5) RETURN NULL;
+CREATE FUNCTION test_func_dt5 (f_p1 DATETIME) RETURNS DATETIME(5) RETURN NULL;
+CREATE FUNCTION test_func_ts5 (f_p1 DATETIME) RETURNS TIMESTAMP(5) RETURN NULL;
+CREATE FUNCTION test_func_t6 (f_p1 DATETIME) RETURNS TIME(6) RETURN NULL;
+CREATE FUNCTION test_func_dt6 (f_p1 DATETIME) RETURNS DATETIME(6) RETURN NULL;
+CREATE FUNCTION test_func_ts6 (f_p1 DATETIME) RETURNS TIMESTAMP(6) RETURN NULL;
 SELECT ROUTINE_NAME, ROUTINE_TYPE, DATA_TYPE, DATETIME_PRECISION from 
 INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='i_s_routines_test';
 ROUTINE_NAME	ROUTINE_TYPE	DATA_TYPE	DATETIME_PRECISION
-test_func1	FUNCTION	time	0
+test_func_dt	FUNCTION	datetime	0
+test_func_dt0	FUNCTION	datetime	0
+test_func_dt1	FUNCTION	datetime	1
+test_func_dt2	FUNCTION	datetime	2
+test_func_dt3	FUNCTION	datetime	3
+test_func_dt4	FUNCTION	datetime	4
+test_func_dt5	FUNCTION	datetime	5
+test_func_dt6	FUNCTION	datetime	6
+test_func_t	FUNCTION	time	0
+test_func_t0	FUNCTION	time	0
+test_func_t1	FUNCTION	time	1
+test_func_t2	FUNCTION	time	2
+test_func_t3	FUNCTION	time	3
+test_func_t4	FUNCTION	time	4
+test_func_t5	FUNCTION	time	5
+test_func_t6	FUNCTION	time	6
+test_func_ts	FUNCTION	timestamp	0
+test_func_ts0	FUNCTION	timestamp	0
+test_func_ts1	FUNCTION	timestamp	1
+test_func_ts2	FUNCTION	timestamp	2
+test_func_ts3	FUNCTION	timestamp	3
+test_func_ts4	FUNCTION	timestamp	4
+test_func_ts5	FUNCTION	timestamp	5
+test_func_ts6	FUNCTION	timestamp	6
 test_proc1	PROCEDURE		NULL
 DROP DATABASE i_s_routines_test;

=== modified file 'mysql-test/t/information_schema_parameters.test'
--- a/mysql-test/t/information_schema_parameters.test	2011-11-11 05:41:45 +0000
+++ b/mysql-test/t/information_schema_parameters.test	2011-11-18 12:58:18 +0000
@@ -249,10 +249,24 @@ CREATE DATABASE i_s_parameters_test;
 USE i_s_parameters_test;
 
 delimiter \\;
-CREATE PROCEDURE test_proc1 (OUT p_p1 timestamp) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc (OUT p_p1 datetime,OUT p_p2 time,OUT p_p3 timestamp) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc0 (OUT p_p1 datetime(0),OUT p_p2 time(0),OUT p_p3 timestamp(0)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc1 (OUT p_p1 datetime(1),OUT p_p2 time(1),OUT p_p3 timestamp(1)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc2 (OUT p_p1 datetime(2),OUT p_p2 time(2),OUT p_p3 timestamp(2)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc3 (OUT p_p1 datetime(3),OUT p_p2 time(3),OUT p_p3 timestamp(3)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc4 (OUT p_p1 datetime(4),OUT p_p2 time(4),OUT p_p3 timestamp(4)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc5 (OUT p_p1 datetime(5),OUT p_p2 time(5),OUT p_p3 timestamp(5)) BEGIN SELECT 1 ; END; \\
+CREATE PROCEDURE test_proc6 (OUT p_p1 datetime(6),OUT p_p2 time(6),OUT p_p3 timestamp(6)) BEGIN SELECT 1 ; END; \\
 delimiter ;\\
 
-CREATE FUNCTION test_func1 (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func (f_p1 DATETIME, f_p2 TIMESTAMP) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func0 (f_p1 DATETIME(0), f_p2 TIMESTAMP(0)) RETURNS TIME(0) RETURN NULL;
+CREATE FUNCTION test_func1 (f_p1 DATETIME(1), f_p2 TIMESTAMP(1)) RETURNS TIME(1) RETURN NULL;
+CREATE FUNCTION test_func2 (f_p1 DATETIME(2), f_p2 TIMESTAMP(2)) RETURNS TIME(2) RETURN NULL;
+CREATE FUNCTION test_func3 (f_p1 DATETIME(3), f_p2 TIMESTAMP(3)) RETURNS TIME(3) RETURN NULL;
+CREATE FUNCTION test_func4 (f_p1 DATETIME(4), f_p2 TIMESTAMP(4)) RETURNS TIME(4) RETURN NULL;
+CREATE FUNCTION test_func5 (f_p1 DATETIME(5), f_p2 TIMESTAMP(5)) RETURNS TIME(5) RETURN NULL;
+CREATE FUNCTION test_func6 (f_p1 DATETIME(6), f_p2 TIMESTAMP(6)) RETURNS TIME(6) RETURN NULL;
 
 SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, PARAMETER_NAME, DATA_TYPE, 
 DATETIME_PRECISION from INFORMATION_SCHEMA.PARAMETERS WHERE 

=== modified file 'mysql-test/t/information_schema_routines.test'
--- a/mysql-test/t/information_schema_routines.test	2011-11-11 05:41:45 +0000
+++ b/mysql-test/t/information_schema_routines.test	2011-11-18 12:58:18 +0000
@@ -251,7 +251,37 @@ delimiter \\;
 CREATE PROCEDURE test_proc1 (OUT p_p1 timestamp) BEGIN SELECT 1 ; END; \\
 delimiter ;\\
 
-CREATE FUNCTION test_func1 (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func_t (f_p1 DATETIME) RETURNS TIME RETURN NULL;
+CREATE FUNCTION test_func_dt (f_p1 DATETIME) RETURNS DATETIME RETURN NULL;
+CREATE FUNCTION test_func_ts (f_p1 DATETIME) RETURNS TIMESTAMP RETURN NULL;
+
+CREATE FUNCTION test_func_t0 (f_p1 DATETIME) RETURNS TIME(0) RETURN NULL;
+CREATE FUNCTION test_func_dt0 (f_p1 DATETIME) RETURNS DATETIME(0) RETURN NULL;
+CREATE FUNCTION test_func_ts0 (f_p1 DATETIME) RETURNS TIMESTAMP(0) RETURN NULL;
+
+CREATE FUNCTION test_func_t1 (f_p1 DATETIME) RETURNS TIME(1) RETURN NULL;
+CREATE FUNCTION test_func_dt1 (f_p1 DATETIME) RETURNS DATETIME(1) RETURN NULL;
+CREATE FUNCTION test_func_ts1 (f_p1 DATETIME) RETURNS TIMESTAMP(1) RETURN NULL;
+
+CREATE FUNCTION test_func_t2 (f_p1 DATETIME) RETURNS TIME(2) RETURN NULL;
+CREATE FUNCTION test_func_dt2 (f_p1 DATETIME) RETURNS DATETIME(2) RETURN NULL;
+CREATE FUNCTION test_func_ts2 (f_p1 DATETIME) RETURNS TIMESTAMP(2) RETURN NULL;
+
+CREATE FUNCTION test_func_t3 (f_p1 DATETIME) RETURNS TIME(3) RETURN NULL;
+CREATE FUNCTION test_func_dt3 (f_p1 DATETIME) RETURNS DATETIME(3) RETURN NULL;
+CREATE FUNCTION test_func_ts3 (f_p1 DATETIME) RETURNS TIMESTAMP(3) RETURN NULL;
+
+CREATE FUNCTION test_func_t4 (f_p1 DATETIME) RETURNS TIME(4) RETURN NULL;
+CREATE FUNCTION test_func_dt4 (f_p1 DATETIME) RETURNS DATETIME(4) RETURN NULL;
+CREATE FUNCTION test_func_ts4 (f_p1 DATETIME) RETURNS TIMESTAMP(4) RETURN NULL;
+
+CREATE FUNCTION test_func_t5 (f_p1 DATETIME) RETURNS TIME(5) RETURN NULL;
+CREATE FUNCTION test_func_dt5 (f_p1 DATETIME) RETURNS DATETIME(5) RETURN NULL;
+CREATE FUNCTION test_func_ts5 (f_p1 DATETIME) RETURNS TIMESTAMP(5) RETURN NULL;
+
+CREATE FUNCTION test_func_t6 (f_p1 DATETIME) RETURNS TIME(6) RETURN NULL;
+CREATE FUNCTION test_func_dt6 (f_p1 DATETIME) RETURNS DATETIME(6) RETURN NULL;
+CREATE FUNCTION test_func_ts6 (f_p1 DATETIME) RETURNS TIMESTAMP(6) RETURN NULL;
 
 # Here return type for test_proc1 is not defined so DATETIME_PRECISION for this
 # would be NULL. But return type for test_func1 is TIME, so DATETIME_PRECISION

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (mayank.prasad:3598 to 3599) WL#5885Mayank Prasad21 Nov