Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
-
None
Description
I run a script which makes a few implicit conversions MEDIUMINT to string:
CREATE OR REPLACE TABLE t1 (a MEDIUMINT, b MEDIUMINT UNSIGNED); |
CREATE OR REPLACE TABLE t2 AS SELECT |
CONCAT(a),
|
CONCAT(b),
|
COALESCE(a,''), |
COALESCE(b,'') |
FROM t1; |
DESC t2; |
+----------------+------------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+----------------+------------+------+-----+---------+-------+
|
| CONCAT(a) | varchar(9) | YES | | NULL | |
|
| CONCAT(b) | varchar(8) | YES | | NULL | |
|
| COALESCE(a,'') | varchar(9) | YES | | NULL | |
|
| COALESCE(b,'') | varchar(8) | YES | | NULL | |
|
+----------------+------------+------+-----+---------+-------+
|
The data types of the t2 columns corresponding to signed columns in t1 is wrong: 9 is too excessive. All columns in t2 must have length of 8.
Attachments
Issue Links
- relates to
-
MDEV-13232 Assertion `(&(&share->intern_lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&share->intern_lock)->m_mutex)->thread)' failed in _ma_state_info_write
- Closed