Description:
The following commands work as expected, creating stub tables and then dropping
them for views later:
mysqldump --quick --disable-keys --lock-tables --triggers --routines --tz-utc -f --create-options --extended-insert --add-drop-table --allow-keywords --add-locks --set-charset --all-databases
mysqldump --quick --disable-keys --lock-tables --triggers --routines --tz-utc -f --create-options --extended-insert --add-drop-table --allow-keywords --add-locks --set-charset --databases a_single_database
This command does not: The stub tables are created but the views are never created:
mysqldump --quick --disable-keys --lock-tables --triggers --routines --tz-utc -f --create-options --extended-insert --add-drop-table --allow-keywords --add-locks --set-charset --databases information_schema a_single_database
This came about because the list of databases to dump was being generated with show databases with some databases excluded: information_schema was not specifically excluded and so made it into the list.
I should also not here that if a typo'd database name gets into the --databases list, similar behaviour is seen: No error is generated, mysqldump completes, but the views are never created, only the stub tables.
How to repeat:
mysqldump --quick --disable-keys --lock-tables --triggers --routines --tz-utc -f --create-options --extended-insert --add-drop-table --allow-keywords --add-locks --set-charset --databases information_schema a_database_with_views_in_it
or
mysqldump --quick --disable-keys --lock-tables --triggers --routines --tz-utc -f --create-options --extended-insert --add-drop-table --allow-keywords --add-locks --set-charset --databases a_bogus_database_name a_database_with_views_in_it