Bug #114481 CAST example has problematic table name
Submitted: 26 Mar 2024 8:40 Modified: 17 Apr 2024 2:20
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[26 Mar 2024 8:40] Daniël van Eeden
Description:
https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast

The example has this:

mysql> CREATE TABLE TZ (c TIMESTAMP);
Query OK, 0 rows affected (0.41 sec)

mysql> INSERT INTO tz VALUES
    ->     ROW(CURRENT_TIMESTAMP),
    ->     ROW('2020-07-28 14:50:15+1:00');
Query OK, 1 row affected (0.08 sec)

When trying this on MySQL on Linux this happens:

mysql> CREATE TABLE TZ (c TIMESTAMP);
Query OK, 0 rows affected (0.0564 sec)

mysql> INSERT INTO tz VALUES
   -> ROW(CURRENT_TIMESTAMP),
   -> ROW('2020-07-28 14:50:15+1:00');
ERROR: 1146 (42S02): Table 'test.tz' doesn't exist

How to repeat:
Try the example

Suggested fix:
Only use `tz` or `TZ` and don't mix the two.
[26 Mar 2024 12:59] MySQL Verification Team
Hi Mr. van Eeden,

Thank you for your bug report.

Indeed, the example in the Documentation is not applicable to the case-sensitive filesystems. 

Verified as a documentation bug.

Thank you.
[17 Apr 2024 2:20] Jon Stephens
Fixed in all versions of the Manual, 8.0 and later, in mysqldoc rev 78328.

Thanks for the heads-up.

Closed.
[17 Apr 2024 10:14] MySQL Verification Team
Thank you, Jon.