| Bug #78635 | Non-MySQL data types are not translated in procedure/function params | ||
|---|---|---|---|
| Submitted: | 30 Sep 2015 6:56 | Modified: | 30 Sep 2015 7:56 |
| Reporter: | Alexander Soklakov | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
| Version: | 5.7.8, 5.7.10, 8.0.10, 5.6.27 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[30 Sep 2015 6:56]
Alexander Soklakov
[30 Sep 2015 7:56]
MySQL Verification Team
Hello Alex, Thank you for the report and test case. Thanks, Umesh
[30 Sep 2015 7:57]
MySQL Verification Team
// 5.7.10
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.10-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database test;
Query OK, 1 row affected (0.00 sec)
mysql> use test
Database changed
mysql> CREATE TABLE t (a BOOL, b FLOAT8, c LONG VARCHAR, d NUMERIC);
Query OK, 0 rows affected (0.00 sec)
mysql> desc t;
+-------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| a | tinyint(1) | YES | | NULL | |
| b | double | YES | | NULL | |
| c | mediumtext | YES | | NULL | |
| d | decimal(10,0) | YES | | NULL | |
+-------+---------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql> DELIMITER $$
mysql> CREATE PROCEDURE dorepeat(p1 LONG VARCHAR)
-> BEGIN
-> SET @x = p1;
-> END$$
Query OK, 0 rows affected (0.01 sec)
mysql> DELIMITER ;
mysql> show create procedure dorepeat\G
*************************** 1. row ***************************
Procedure: dorepeat
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Create Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `dorepeat`(p1 LONG VARCHAR)
BEGIN
SET @x = p1;
END
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql> DELIMITER $$
mysql> CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
-> DETERMINISTIC
-> RETURN CONCAT('Hello, ',s,'!')$$
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> DELIMITER ;
mysql> show create function hello\G
*************************** 1. row ***************************
Function: hello
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
DETERMINISTIC
RETURN CONCAT('Hello, ',s,'!')
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql>
[30 Sep 2015 8:01]
MySQL Verification Team
// 5.8.10
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.8.0: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.8.0-m17-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database test;
Query OK, 1 row affected (0.00 sec)
mysql> use test
Database changed
mysql> DELIMITER $$
mysql> CREATE PROCEDURE dorepeat(p1 LONG VARCHAR)
-> BEGIN
-> SET @x = p1;
-> END$$
Query OK, 0 rows affected (0.00 sec)
mysql> DELIMITER ;
mysql> show create procedure dorepeat\G
*************************** 1. row ***************************
Procedure: dorepeat
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Create Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `dorepeat`(p1 LONG VARCHAR)
BEGIN
SET @x = p1;
END
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql> DELIMITER $$
mysql> CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
-> DETERMINISTIC
-> RETURN CONCAT('Hello, ',s,'!')$$
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> DELIMITER ;
mysql> show create function hello\G
*************************** 1. row ***************************
Function: hello
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
DETERMINISTIC
RETURN CONCAT('Hello, ',s,'!')
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql>
[24 Oct 2015 12:37]
Valeriy Kravchuk
Older version (like 5.6.24) are also affected. Please, check.
[25 Oct 2015 13:09]
MySQL Verification Team
// 5.6.27 - affected
[root@cluster-repo ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.6.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> DELIMITER $$
mysql> CREATE PROCEDURE dorepeat(p1 LONG VARCHAR)
-> BEGIN
-> SET @x = p1;
-> END$$
Query OK, 0 rows affected (0.00 sec)
mysql> DELIMITER ;
mysql> how create procedure dorepeat\G
mysql> show create procedure dorepeat\G
*************************** 1. row ***************************
Procedure: dorepeat
sql_mode: STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
Create Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `dorepeat`(p1 LONG VARCHAR)
BEGIN
SET @x = p1;
END
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
mysql> DELIMITER $$
mysql> CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
-> DETERMINISTIC
-> RETURN CONCAT('Hello, ',s,'!')$$
Query OK, 0 rows affected (0.00 sec)
mysql> DELIMITER ;
mysql> show create function hello\G
*************************** 1. row ***************************
Function: hello
sql_mode: STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(s LONG VARCHAR) RETURNS mediumtext CHARSET latin1
DETERMINISTIC
RETURN CONCAT('Hello, ',s,'!')
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
[18 Jun 2016 21:28]
Omer Barnir
Posted by developer: Reported version value updated to reflect release name change from 5.8 to 8.0
