List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:November 17 2010 9:00pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch
(nirbhay.choubey:3554) Bug#54899
View as plain text  
Hi Nirbhay, Joro!

SET reply_mode= PETER_GULUTZAN -- :)

On Wed, Nov 17, 2010 at 03:35:51PM +0530, Nirbhay Choubey wrote:
> Hi Sergey,
> 
> Please see my comments in-line.
> 
> On Tuesday 16 November 2010 10:44 PM, Sergey Vojtovich wrote:
> >Hi Nirbhay,
> >
> >a few use cases that used to work...
> >Joro: do you think all of these points are valid?
> >
> >I run "mysql" with one-database option.
> >I do not specify database name.
> >I execute USE test.
> >I get segmentation fault.
> >I expect "Database changed".
> 
> This happened as I missed out a check in my last patch,
> the latest patch deals with this.
Joro says: "Heh, that's obviously a valid case."
We all agree that this case is valid.
It is to be dealed by the latest patch.
Issue closed.

> >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 expect "Database changed".
> 
> This is expected, as we are running mysql_select_db with the
> db name given with USE command, as against the older (pre-patch)
> logic, where (in case of one-database), we used to skip mysql_select_db
> call.
Joro says: "The error is expected imho. you're not allowed to switch
to non-existent db iirc."
Nirbhay and Joro agrees.
Svoj won't object. Yet.
Probably Svoj will object with different arguments later.
Issue closed.

> >I run "mysql" with one-database option.
> >I specify "test" as database name.
> >I execute CREATE DATABASE test1.
> >I execute USE test1.
> >I execute USE test1.
> >I execute SELECT 1.
> >I get "1".
> >I expect "Ignoring query to other database".
> 
> Again, a catch, fixed it in the latest patch.
Joro says: "Hmm, shouldn't USE fail ? how is the --one-database defined ?
What is the current database after the above sequence of commands ?"
Svoj answers in order: "No answer from my side. Could you elaborate?
Prompt says: 'test1', SELECT DATABASE() says: 'test1'".
It is to be dealed by the latest patch.
Joro probably sees a problem with "USE test1" not failing, but that's
not relevant to this particular case.
Issue closed.

> >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 expect this, as prompt is created using current_db, and current_db
> is not supposed to change after 'USE non-existent-db'.
Joro says: "no : look on the above example and my answer there : test is fine."
We all agree that "test> " is fine, taking into account use case #2.

> >I execute SELECT 1.
> >I get "Ignoring query to other database".
> >I expect "1" (actually I would expect 'Ignoring query to other database').
> 
> This is again an expected behavior, as one-database filtering is decided
> based on the database name provided in the 'USE' command, which is
> 'non-existent-db' in this scenario.
Joro says: "That's an error indeed. it should be "1"."
Joro and Svoj expect queries to be accepted when one-databse is "test" and
prompt says "test".
Nirbhay does not.
Prior to this patch prompt would be "test> ", so it is not a regression.
Issue is not settled.

Regards,
Sergey

> 
> Best,
> Nirbhay
> 
> >Regards,
> >Sergey
> 

-- 
Sergey Vojtovich <svoj@stripped>
MySQL AB, Software Engineer
Izhevsk, Russia, www.mysql.com
Thread
bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey9 Nov
  • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich16 Nov
    • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey17 Nov
      • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich17 Nov
        • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey18 Nov
          • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey19 Nov
            • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich19 Nov
              • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey19 Nov
                • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich19 Nov
                  • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey19 Nov
                    • Re: bzr commit into mysql-5.1-bugteam branch(nirbhay.choubey:3554) Bug#54899Sergey Vojtovich19 Nov
                      • Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)Bug#54899Nirbhay Choubey22 Nov