Merge lp:~vkolesnikov/pbxt/pbxt-type-enum into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-type-enum
Merge into: lp:pbxt
Diff against target: None lines
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-type-enum
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+6878@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

Tests fixed. However once I was able to see the old style behavior with this test - an error on table creation. I was not able to reproduce it anymore. I propose this for merging because I think this is the correct behavior. IMO it would be illogical to create "exhausting" enum that involves all characters from latin1 just to check that it really fails because of back slashes mode.

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

Hi Vlad,

Was there a reason for removing "drop database pbxt"?

This change was required by MariaDB which tests that the state of the
server is the same as before and after each test.

On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:

> --disable_query_log
> -drop database pbxt;
> ---enable_query_log
> +#--disable_query_log
> +#drop database pbxt;
> +#--enable_query_log
> --echo End of 5.1 tests

--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

yes, the problem was I got an error like: cannot drop dtabase pbxt,
cannot delete table "statistics,locations"

Paul McCullagh wrote:
> Hi Vlad,
>
> Was there a reason for removing "drop database pbxt"?
>
> This change was required by MariaDB which tests that the state of the
> server is the same as before and after each test.
>
> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>
>
>> --disable_query_log
>> -drop database pbxt;
>> ---enable_query_log
>> +#--disable_query_log
>> +#drop database pbxt;
>> +#--enable_query_log
>> --echo End of 5.1 tests
>>
>
>
>
> --
> Paul McCullagh
> PrimeBase Technologies
> www.primebase.org
> www.blobstreaming.org
> pbxt.blogspot.com
>
>
>
>

--
--
Best Regards,
Vladimir

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

I have seen this kind of thing before. I think it is a bug, and should
be investigated.

I all PBXT tables are dropped first, the it should always be possible
to do:

drop database pbxt;

On May 29, 2009, at 12:36 PM, Vladimir Kolesnikov wrote:

> yes, the problem was I got an error like: cannot drop dtabase pbxt,
> cannot delete table "statistics,locations"
>
> Paul McCullagh wrote:
>> Hi Vlad,
>>
>> Was there a reason for removing "drop database pbxt"?
>>
>> This change was required by MariaDB which tests that the state of the
>> server is the same as before and after each test.
>>
>> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>>
>>
>>> --disable_query_log
>>> -drop database pbxt;
>>> ---enable_query_log
>>> +#--disable_query_log
>>> +#drop database pbxt;
>>> +#--enable_query_log
>>> --echo End of 5.1 tests
>>>
>>
>>
>>
>> --
>> Paul McCullagh
>> PrimeBase Technologies
>> www.primebase.org
>> www.blobstreaming.org
>> pbxt.blogspot.com
>>
>>
>>
>>
>
>
> --
> --
> Best Regards,
> Vladimir
>
> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
> 6878
> Your team PBXT Core is subscribed to branch lp:pbxt.

--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

ok, I will check. My first guess was that this is a MySQL problem
because pbxt is not a normal database (?)...

Paul McCullagh wrote:
> I have seen this kind of thing before. I think it is a bug, and should
> be investigated.
>
> I all PBXT tables are dropped first, the it should always be possible
> to do:
>
> drop database pbxt;
>
> On May 29, 2009, at 12:36 PM, Vladimir Kolesnikov wrote:
>
>
>> yes, the problem was I got an error like: cannot drop dtabase pbxt,
>> cannot delete table "statistics,locations"
>>
>> Paul McCullagh wrote:
>>
>>> Hi Vlad,
>>>
>>> Was there a reason for removing "drop database pbxt"?
>>>
>>> This change was required by MariaDB which tests that the state of the
>>> server is the same as before and after each test.
>>>
>>> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>>>
>>>
>>>
>>>> --disable_query_log
>>>> -drop database pbxt;
>>>> ---enable_query_log
>>>> +#--disable_query_log
>>>> +#drop database pbxt;
>>>> +#--enable_query_log
>>>> --echo End of 5.1 tests
>>>>
>>>>
>>>
>>> --
>>> Paul McCullagh
>>> PrimeBase Technologies
>>> www.primebase.org
>>> www.blobstreaming.org
>>> pbxt.blogspot.com
>>>
>>>
>>>
>>>
>>>
>> --
>> --
>> Best Regards,
>> Vladimir
>>
>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
>> 6878
>> Your team PBXT Core is subscribed to branch lp:pbxt.
>>
>
>
>
> --
> Paul McCullagh
> PrimeBase Technologies
> www.primebase.org
> www.blobstreaming.org
> pbxt.blogspot.com
>
>
>
>

--
--
Best Regards,
Vladimir

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

On May 29, 2009, at 1:03 PM, Vladimir Kolesnikov wrote:

> ok, I will check.

Thanks.

> My first guess was that this is a MySQL problem
> because pbxt is not a normal database (?)...

Yes, it is not a normal database however, I still expect it to work
because all tests end with "drop database pbxt".

Since the other tests do not indicate a problem, there must be
something different happening in this case.

So I would be interested to find out what.

A bit of background:

MySQL drops the database by dropping all the tables in the database,
and then removing the database folder.

PBXT allows the "statistics" and "location" tables to be dropped if
there are no existing PBXT tables.

Note statistics and location are normal tables from the MySQL point of
view. They both have .frm files.

When the last system table is dropped, PBXT also removes the "system"
and "data" folders in the pbxt directory.

In this way the pbxt directory should then be empty and MySQL should
be able to remove it.

> Paul McCullagh wrote:
>> I have seen this kind of thing before. I think it is a bug, and
>> should
>> be investigated.
>>
>> I all PBXT tables are dropped first, the it should always be possible
>> to do:
>>
>> drop database pbxt;
>>
>> On May 29, 2009, at 12:36 PM, Vladimir Kolesnikov wrote:
>>
>>
>>> yes, the problem was I got an error like: cannot drop dtabase pbxt,
>>> cannot delete table "statistics,locations"
>>>
>>> Paul McCullagh wrote:
>>>
>>>> Hi Vlad,
>>>>
>>>> Was there a reason for removing "drop database pbxt"?
>>>>
>>>> This change was required by MariaDB which tests that the state of
>>>> the
>>>> server is the same as before and after each test.
>>>>
>>>> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>>>>
>>>>
>>>>
>>>>> --disable_query_log
>>>>> -drop database pbxt;
>>>>> ---enable_query_log
>>>>> +#--disable_query_log
>>>>> +#drop database pbxt;
>>>>> +#--enable_query_log
>>>>> --echo End of 5.1 tests
>>>>>
>>>>>
>>>>
>>>> --
>>>> Paul McCullagh
>>>> PrimeBase Technologies
>>>> www.primebase.org
>>>> www.blobstreaming.org
>>>> pbxt.blogspot.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>> --
>>> --
>>> Best Regards,
>>> Vladimir
>>>
>>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
>>> 6878
>>> Your team PBXT Core is subscribed to branch lp:pbxt.
>>>
>>
>>
>>
>> --
>> Paul McCullagh
>> PrimeBase Technologies
>> www.primebase.org
>> www.blobstreaming.org
>> pbxt.blogspot.com
>>
>>
>>
>>
>
>
> --
> --
> Best Regards,
> Vladimir
>
> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
> 6878
> Your team PBXT Core is subscribed to branch lp:pbxt.

--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :
Download full text (3.2 KiB)

ah ok, then I think I knwo what the problem: PBXT doesn't allow it to be
removed, as the script doesn't drop the last table, as beore the fix it
was not supposed to be created...

Paul McCullagh wrote:
> On May 29, 2009, at 1:03 PM, Vladimir Kolesnikov wrote:
>
>
>> ok, I will check.
>>
>
> Thanks.
>
>
>> My first guess was that this is a MySQL problem
>> because pbxt is not a normal database (?)...
>>
>
> Yes, it is not a normal database however, I still expect it to work
> because all tests end with "drop database pbxt".
>
> Since the other tests do not indicate a problem, there must be
> something different happening in this case.
>
> So I would be interested to find out what.
>
> A bit of background:
>
> MySQL drops the database by dropping all the tables in the database,
> and then removing the database folder.
>
> PBXT allows the "statistics" and "location" tables to be dropped if
> there are no existing PBXT tables.
>
> Note statistics and location are normal tables from the MySQL point of
> view. They both have .frm files.
>
> When the last system table is dropped, PBXT also removes the "system"
> and "data" folders in the pbxt directory.
>
> In this way the pbxt directory should then be empty and MySQL should
> be able to remove it.
>
>
>> Paul McCullagh wrote:
>>
>>> I have seen this kind of thing before. I think it is a bug, and
>>> should
>>> be investigated.
>>>
>>> I all PBXT tables are dropped first, the it should always be possible
>>> to do:
>>>
>>> drop database pbxt;
>>>
>>> On May 29, 2009, at 12:36 PM, Vladimir Kolesnikov wrote:
>>>
>>>
>>>
>>>> yes, the problem was I got an error like: cannot drop dtabase pbxt,
>>>> cannot delete table "statistics,locations"
>>>>
>>>> Paul McCullagh wrote:
>>>>
>>>>
>>>>> Hi Vlad,
>>>>>
>>>>> Was there a reason for removing "drop database pbxt"?
>>>>>
>>>>> This change was required by MariaDB which tests that the state of
>>>>> the
>>>>> server is the same as before and after each test.
>>>>>
>>>>> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> --disable_query_log
>>>>>> -drop database pbxt;
>>>>>> ---enable_query_log
>>>>>> +#--disable_query_log
>>>>>> +#drop database pbxt;
>>>>>> +#--enable_query_log
>>>>>> --echo End of 5.1 tests
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Paul McCullagh
>>>>> PrimeBase Technologies
>>>>> www.primebase.org
>>>>> www.blobstreaming.org
>>>>> pbxt.blogspot.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> --
>>>> Best Regards,
>>>> Vladimir
>>>>
>>>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
>>>> 6878
>>>> Your team PBXT Core is subscribed to branch lp:pbxt.
>>>>
>>>>
>>>
>>> --
>>> Paul McCullagh
>>> PrimeBase Technologies
>>> www.primebase.org
>>> www.blobstreaming.org
>>> pbxt.blogspot.com
>>>
>>>
>>>
>>>
>>>
>> --
>> --
>> Best Regards,
>> Vladimir
>>
>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
>> 6878
>> Your team PBXT Core is subscribed to branch lp:pbxt.
>>
>
>
>
> --
> Paul McCullagh
> PrimeBase Technologies
> www.primebase.org
> www.blobs...

Read more...

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :
Download full text (3.6 KiB)

Ah - terrible error message!

On May 29, 2009, at 1:24 PM, Vladimir Kolesnikov wrote:

> ah ok, then I think I knwo what the problem: PBXT doesn't allow it
> to be
> removed, as the script doesn't drop the last table, as beore the fix
> it
> was not supposed to be created...
>
> Paul McCullagh wrote:
>> On May 29, 2009, at 1:03 PM, Vladimir Kolesnikov wrote:
>>
>>
>>> ok, I will check.
>>>
>>
>> Thanks.
>>
>>
>>> My first guess was that this is a MySQL problem
>>> because pbxt is not a normal database (?)...
>>>
>>
>> Yes, it is not a normal database however, I still expect it to work
>> because all tests end with "drop database pbxt".
>>
>> Since the other tests do not indicate a problem, there must be
>> something different happening in this case.
>>
>> So I would be interested to find out what.
>>
>> A bit of background:
>>
>> MySQL drops the database by dropping all the tables in the database,
>> and then removing the database folder.
>>
>> PBXT allows the "statistics" and "location" tables to be dropped if
>> there are no existing PBXT tables.
>>
>> Note statistics and location are normal tables from the MySQL point
>> of
>> view. They both have .frm files.
>>
>> When the last system table is dropped, PBXT also removes the
>> "system"
>> and "data" folders in the pbxt directory.
>>
>> In this way the pbxt directory should then be empty and MySQL should
>> be able to remove it.
>>
>>
>>> Paul McCullagh wrote:
>>>
>>>> I have seen this kind of thing before. I think it is a bug, and
>>>> should
>>>> be investigated.
>>>>
>>>> I all PBXT tables are dropped first, the it should always be
>>>> possible
>>>> to do:
>>>>
>>>> drop database pbxt;
>>>>
>>>> On May 29, 2009, at 12:36 PM, Vladimir Kolesnikov wrote:
>>>>
>>>>
>>>>
>>>>> yes, the problem was I got an error like: cannot drop dtabase
>>>>> pbxt,
>>>>> cannot delete table "statistics,locations"
>>>>>
>>>>> Paul McCullagh wrote:
>>>>>
>>>>>
>>>>>> Hi Vlad,
>>>>>>
>>>>>> Was there a reason for removing "drop database pbxt"?
>>>>>>
>>>>>> This change was required by MariaDB which tests that the state of
>>>>>> the
>>>>>> server is the same as before and after each test.
>>>>>>
>>>>>> On May 29, 2009, at 10:40 AM, Vladimir Kolesnikov wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> --disable_query_log
>>>>>>> -drop database pbxt;
>>>>>>> ---enable_query_log
>>>>>>> +#--disable_query_log
>>>>>>> +#drop database pbxt;
>>>>>>> +#--enable_query_log
>>>>>>> --echo End of 5.1 tests
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Paul McCullagh
>>>>>> PrimeBase Technologies
>>>>>> www.primebase.org
>>>>>> www.blobstreaming.org
>>>>>> pbxt.blogspot.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> --
>>>>> Best Regards,
>>>>> Vladimir
>>>>>
>>>>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/
>>>>> +merge/
>>>>> 6878
>>>>> Your team PBXT Core is subscribed to branch lp:pbxt.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Paul McCullagh
>>>> PrimeBase Technologies
>>>> www.primebase.org
>>>> www.blobstreaming.org
>>>> pbxt.blogspot.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>> --
>>> --
>>> Best Regards,
>>> Vladimir
>>>
>>> https://code.launchpad.net/~vkolesnikov/pbxt/pbxt-type-enum/+merge/
>>> 6878...

Read more...

lp:~vkolesnikov/pbxt/pbxt-type-enum updated
654. By Vladimir Kolesnikov

updated script to allow dropping pbxt database

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/mysql-test/r/type_enum.result'
2--- test/mysql-test/r/type_enum.result 2008-09-17 07:41:28 +0000
3+++ test/mysql-test/r/type_enum.result 2009-05-29 08:23:28 +0000
4@@ -1776,8 +1776,13 @@
5 `russian_deviant` enum('E','F','EÿF','F,E') NOT NULL DEFAULT 'E'
6 ) ENGINE=PBXT DEFAULT CHARSET=latin1
7 drop table t1;
8+select @@SESSION.sql_mode;
9+@@SESSION.sql_mode
10+
11+select @@GLOBAL.sql_mode;
12+@@GLOBAL.sql_mode
13+
14 create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
15
16
17
18 
19
20
21 !"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\€','zz�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'));
22-ERROR HY000: Can't create table 'test.t1' (errno: -1)
23 End of 5.1 tests
24
25=== modified file 'test/mysql-test/t/type_enum.test'
26--- test/mysql-test/t/type_enum.test 2009-04-02 20:28:52 +0000
27+++ test/mysql-test/t/type_enum.test 2009-05-29 08:23:28 +0000
28@@ -153,13 +153,18 @@
29 show create table t1;
30 drop table t1;
31
32-# ER_WRONG_FIELD_TERMINATORS
33---error 1005
34+# the following create statement sometimes fails like it would if NO_BACKSLASH_ESCAPES sql mode was on,
35+# we check sql mode here
36+select @@SESSION.sql_mode;
37+select @@GLOBAL.sql_mode;
38+
39+## ER_WRONG_FIELD_TERMINATORS
40+#--error 1005
41 create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
42
43
44
45 
46
47
48 !"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\€','zz�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'));
49
50---disable_query_log
51-drop database pbxt;
52---enable_query_log
53+#--disable_query_log
54+#drop database pbxt;
55+#--enable_query_log
56 --echo End of 5.1 tests

Subscribers

People subscribed via source and target branches