List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:November 24 2010 7:10am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)
Bug#54899
View as plain text  
Hi Sergey,

This, IMO, is again expected. See below.

On Tuesday 23 November 2010 11:50 PM, Sergey Vojtovich wrote:
> Hi Nirbhay,
>
> use case #8:
> I have a dump provided by mysqldump tool:
> --
>    USE `test`;
>    CREATE TABLE `table_in_test`(a INT);
>    USE `non_existent_db`;
>    CREATE TABLE `table_in_non_existent_db`(a INT);
> --
> Note: I simplified dump for better readability.
>
> I have no `non_existent_db` database.
> I have empty `test` database.
> I do "mysql --one-database test".
> I expect no `table_in_non_existent_db` in `test`.
> Without this patch I get no `table_in_non_existent_db` in `test`.
> With this patch I get `table_in_non_existent_db` in `test`.
>    

This case looks pretty much similar to case #4 that we already discussed.

<cut>
I run "mysql" with one-database option.
I specify "test" as database name.
I execute USE non-existent-db.
I get "ERROR 1049 (42000): Unknown database 'non-existent-db'".
I execute "\R \d> ".
I get "test> ".
I expect "test> " (actually I would expect 'non-existent-db').
I execute SELECT 1.
I get "Ignoring query to other database".
I expect "1" (actually I would expect 'Ignoring query to other database').
</cut>

I have already pushed a fix for this, i.e the last statement will no 
more be filtered
as current_db is same as test. (And SELECT 1 will no longer be filtered out)

On the similar lines, in use case #8 :

mysql> \R \d >
test > use test;
test >create table tab_in_test(i int);
test >use non_existent_db;
ERROR 1049 (42000): Unknown database 'non_existent_db'
test >create table tab_in_non_existent_db(i 
int);                                    # Since current_db/prompt  
still says 'test', statement is not filtered.
test >show tables in test;
tab_in_non_existent_db
tab_in_test

So, both the cases #4 and #8 contradict each other, i.e.
in one case we are saying, SELECT 1 should not be filtered,
while in the other we say 'CREATE TABLE' should be.

Best Regards,
Nirbhay

> Regards,
> Sergey
>
>    
,
Thread
bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey23 Nov
  • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich23 Nov
    • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey24 Nov
      • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich24 Nov