On Tuesday 23 November 2010 12:15 AM, Sergey Vojtovich wrote:
> Hi Nirbhay,
> please note that you're always free to dispute my use cases.
> As well as note that I still didn't manage to draw whole
> picture of new approach in my mind. Thus use cases, but not
> code reviews.
> Use case #7:
> I have SQL script:
> DROP DATABASE `non_existent_db`;
> USE `test`;
> CREATE TABLE `table_in_test`(a INT);
> USE `non_existent_db`;
> CREATE TABLE `table_in_non_existent_db`(a INT);
> I have empty `test` database.
> I have empty `non_existent_db` database.
> I do "mysql --one-database non_existent_db".
> I expect no `non_existent_db` and empty `test`.
> Without this patch I get no `non_existent_db` and empty `test`.
> With this path I get no `non_existent_db` and `table_in_non_existent_db` in `test`.
Uncovered and indeed a valid catch. I have a fix ready
> Though this use case doesn't seem to be reasonable, we may fall into this
> situation in certain cases when loading dump provided by mysqldump. E.g.
> DROP DATABASE succeeded, but following CREATE DATABASE failed. Or DROP DATABASE
> was executed in parallel thread.