Bug #114195 mysql doesn't show what collation was used sometimes
Submitted: 2 Mar 15:24 Modified: 4 Mar 6:55
Reporter: Ke Yu (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[2 Mar 15:24] Ke Yu
Description:
mysql doesn't show what collation was used sometimes if that collation is the default.

It seems that Bug #46239 is not fixed totally.

How to repeat:
Here is the repeat step. Both latin1_swedish_ci and utf8mb4_0900_ai_ci are default collate.
But utf8mb4_0900_ai_ci is shown, latin1_swedish_ci is not shown.

mysql> create table t1(i int) COLLATE=latin1_swedish_ci;
Query OK, 0 rows affected (0.01 sec)

mysql> create table t2(i int) COLLATE=utf8mb4_0900_ai_ci;
Query OK, 0 rows affected (0.01 sec)

mysql> show create table t1;
+-------+-----------------------------------------------------------------------------------+
| Table | Create Table                                                                      |
+-------+-----------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `i` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-----------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table t2;
+-------+---------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                  |
+-------+---------------------------------------------------------------------------------------------------------------+
| t2    | CREATE TABLE `t2` (
  `i` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Suggested fix:
Always show the collate of table.
[4 Mar 6:55] MySQL Verification Team
Hello Ke Yu,

Thank you for the report and feedback.

regards,
Umesh