Description:
Output:
===
mysql> select cast('' as signed) union all select '';
+--------------------+
| cast('' as signed) |
+--------------------+
| |
| |
+--------------------+
2 rows in set, 1 warning (0.00 sec)
mysql> select cast('' as signed) union all select 'a';
+--------------------+
| cast('' as signed) |
+--------------------+
| 0 |
| a |
+--------------------+
2 rows in set, 1 warning (0.00 sec)
mysql> select version();
+--------------+
| version() |
+--------------+
| 5.7.8-rc-log |
+--------------+
1 row in set (0.00 sec)
Problem:
===
"select cast('' as signed) union all select ''" is expected to return:
+--------------------+
| 0 |
| |
+--------------------+
How to repeat:
select cast('' as signed) union all select '';
select cast('' as signed) union all select 'a';
Suggested fix:
"select cast('' as signed) union all select ''" returns:
+--------------------+
| 0 |
| |
+--------------------+
Description: Output: === mysql> select cast('' as signed) union all select ''; +--------------------+ | cast('' as signed) | +--------------------+ | | | | +--------------------+ 2 rows in set, 1 warning (0.00 sec) mysql> select cast('' as signed) union all select 'a'; +--------------------+ | cast('' as signed) | +--------------------+ | 0 | | a | +--------------------+ 2 rows in set, 1 warning (0.00 sec) mysql> select version(); +--------------+ | version() | +--------------+ | 5.7.8-rc-log | +--------------+ 1 row in set (0.00 sec) Problem: === "select cast('' as signed) union all select ''" is expected to return: +--------------------+ | 0 | | | +--------------------+ How to repeat: select cast('' as signed) union all select ''; select cast('' as signed) union all select 'a'; Suggested fix: "select cast('' as signed) union all select ''" returns: +--------------------+ | 0 | | | +--------------------+