If I make a full dump using
mysqldump --all-databases > dump.sql and then I want to import just a single database, I can use
mysql --one-database db1 < dump.sql.
According to the documentation, This option is rudimentary and should be used with care because statement filtering is based only on USE statements. Here is an example of how this could be dangerous:
mysql --one-database db1
DELETE FROM db2.t2;
DROP TABLE db1.t1;
CREATE TABLE db1.t1 (i INT);
INSERT INTO t1 (i) VALUES(1);
CREATE TABLE db2.t1 (j INT);
But this scenario seems very unlikely because I have never found a dump to contain statements that specify a database.table syntax. So the question is, if I make a full dump as written above, is there any risk of using the --one-database option to restore?