List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:November 22 2010 11:34am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (nirbhay.choubey:3554)
Bug#54899
View as plain text  
Hi Sergey, Joro,
>> mysql>    \R \d>
>> test>    drop database test;             # Query OK          -------->  
> Here prompt is test, (one-database is 'test') so no filtering required, the statement is
> executed
>> (none)>    select 1;                     # Outputs 1         -------->  
> Here prompt is 'null' (one-database is 'test'), still we do not filter the statement.
>> (none)>    create database test;         # Query OK          --------->  
> Same as above
>> (none)>    select 1;                     # Outputs 1         --------->  
> Same as above
>> (none)>use test;                       # Database changed  --------->  
> Same as above
>> test>select 1;                         # Outputs 1         --------->  
> Here again the prompt is test, (one-database is 'test') so no filtering required, the
> statement is executed
>>
>> This states that queries are accepted in this case too, when
>> one-database is 'test'
>> and prompt is *not*  'test'.
>>      
> Ok, I think I see where confusion is coming from.
> Possible statements:
> 1. "queries to be accepted when one-database is 'test' and prompt says 'test'."
> 2. "queries to be accepted iff one-database is 'test' and prompt says 'test'."
> 3. "queries to be accepted when one-database is 'test' and prompt says ('test' or
>     '(none)')."
>
> I said p.1, when I was describing use case #4.
> You say p.3, when you're describing use case #6.
> You say that p.1 declares p.3 invalid, but it doesn't.
> Otoh p.2 does declare p.3 invalid, but afair it was never used.
>    

Based on the discussions that we had on this, I felt we were referring 
to P.2. (iff).
Thanks for the clarification.

I have committed a patch to cover all the cases we have discussed so far.

Please take a look.

Regards,
Nirbhay

> Regards,
> Sergey
>
>    
>> So, if we decide to filter based on inequality of one-database and
>> prompt, the
>> above valid case will not be possible.
>>
>> Hope, I was able to answer your question.
>>
>> Please let me know.
>>
>> Regards,
>> Nirbhay
>>
>>
>>      
>>> Regards,
>>> Sergey
>>>
>>>        
>>>> Thanks,
>>>> Nirbhay
>>>>
>>>> On Friday 19 November 2010 03:25 PM, Sergey Vojtovich wrote:
>>>>          
>>>>> Hi Nirbhay,
>>>>>
>>>>> what is expected in the below example?
>>>>>
>>>>>            
>>>>>> One more use case :
>>>>>>
>>>>>> ./bin/mysql --one-database test
>>>>>>
>>>>>> mysql>    \R \d>
>>>>>> test>    drop database test;             # Query OK
>>>>>> (none)>    select 1;                          # Outputs 1
>>>>>> (none)>    create database test;      # Query OK
>>>>>> (none)>    select 1;                          # Outputs 1
>>>>>> (none)>use test;                           # Database changed
>>>>>> test>select 1;                               # Outputs 1
>>>>>>
>>>>>> In the above scenario, notice how prompt changes.
>>>>>>
>>>>>>              
>>>>>>>> Joro and Svoj expect queries to be accepted when
> one-databse is
>>>>>>>> "test" and
>>>>>>>> prompt says "test".
>>>>>>>> Nirbhay does not.
>>>>>>>>                  
>>>>>> Now, in the above scenario, one-database is "test" but
>>>>>> prompt/current_db is not,
>>>>>> but we still have to keep executing the statements, as we
> started
>>>>>> with 'test' as
>>>>>> default database.
>>>>>>
>>>>>> Regards,
>>>>>> Nirbhay
>>>>>>
>>>>>> PS. Bug#54899 points to this scenario.
>>>>>>              

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