[MDEV-29597] mysqldump outputs fully qualified names for views when lower_case_table_names=2 Created: 2022-09-21  Updated: 2022-09-22

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.6.8, 10.6.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Vitaliy Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Windows 10 64bit
10.6.10-MariaDB



 Description   

Setting lower_case_table_names=2 option forces mysqldump to output fully qualified names for the views (including database name).
After removing this option and restarting MariaDB - dump is generated without database name in the script.

This is an issues because such a scrips can't be used to recreate database with a different name.

Steps to reproduce:

  • add option lower_case_table_names=2 to the my.ini file
  • restart the MariaDB server
  • generate dump using mysqldump --skip-lock-tables --routines --skip-add-drop-table --skip-extended-insert --no-data --events --skip-quote-names --compact --skip-set-charset

Example with lower_case_table_names=2

/*!50001 VIEW db_name.view_name AS select ...

Example without lower_case_table_names=2

/*!50001 VIEW view_name AS select ...

Output of the

SHOW CREATE TABLE view_name

changes to print fully qualified name when lower_case_table_names=2


Generated at Thu Feb 08 10:09:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.