From: Sergey Vojtovich Date: November 18 2010 12:49pm Subject: Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554) Bug#54899 List-Archive: http://lists.mysql.com/commits/124245 Message-Id: <20101118124954.GA7964@june> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Nirbhay, Joro! Use case #5: I have a dump provided by mysqldump tool: -- USE `non_existent_db`; CREATE TABLE `table_in_non_existent_db`(a INT); USE `test`; CREATE TABLE `table_in_test`(a INT); -- Note: I simplified dump for better readability. I have no `non_existent_db` database. I have empty `test` database. I want to load tables from `test` database. I read manual for one-database option: -- Ignore statements except those that occur while the default database is the one named on the command line. This option is rudimentary and should be used with care. Statement filtering is based only on USE statements. -- I think this option does what I need. I do "mysql --one-database test". I expect new table in `test`: `table_in_test`. Without this patch I get new table. With this patch `test` database is empty. Regards, Sergey On Wed, Nov 17, 2010 at 10:09:46AM +0000, Nirbhay Choubey wrote: > #At file:///home/nirbhay/Project/mysql/repo/wl/mysql-5.1-bugteam-54899/ based on revid:guilhem@stripped > > 3554 Nirbhay Choubey 2010-11-17 > Bug#54899 : --one-database option cannot handle DROP/CREATE DATABASE commands ...skip... > @@ -1449,8 +1450,9 @@ static struct my_option my_long_options[ > &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL, > NO_ARG, 0, 0, 0, 0, 0, 0}, > {"one-database", 'o', > - "Only update the default database. This is useful for skipping updates " > - "to other database in the update log.", > + "Ignore statements except those that occur while the default " > + "database is the one named at the command line and USE command " > + "is not executed with some other database.", > 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, > #ifdef USE_POPEN > {"pager", OPT_PAGER, Are you sure your addendum is correct? Regards, Sergey -- Sergey Vojtovich MySQL AB, Software Engineer Izhevsk, Russia, www.mysql.com