Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 56212
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05003
Fixed in: (no value)



Subject: Skip test count wrong without DBICTEST_MYSQL_INNODB set
If DBICTEST_MYSQL_INNODB is not set t/11mysql_common.t will skip a large number of tests. The count appears to be wrong, coming up 150 instead of the expected 161. Its not obvious where that count is being set. Test output is attached.
Subject: dbic.out
Download dbic.out
application/octet-stream 11.5k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Fri, 2 Apr 2010 03:11:52 -0400
To: Michael G Schwern via RT <bug-DBIx-Class-Schema-Loader [...] rt.cpan.org>
From: Rafael Kitover <rkitover [...] cpan.org>
Hi Michael, this is fixed in git: git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Schema-Loader.git On Thu, Apr 01, 2010 at 09:29:20PM -0400, Michael G Schwern via RT wrote: Show quoted text
> Thu Apr 01 21:29:19 2010: Request 56212 was acted upon. > Transaction: Ticket created by MSCHWERN > Queue: DBIx-Class-Schema-Loader > Subject: Skip test count wrong without DBICTEST_MYSQL_INNODB set > Broken in: 0.05003 > Severity: Important > Owner: Nobody > Requestors: mschwern@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > > If DBICTEST_MYSQL_INNODB is not set t/11mysql_common.t will skip a large > number of tests. The count appears to be wrong, coming up 150 instead > of the expected 161. Its not obvious where that count is being set. > > Test output is attached.
Confirmed, except now the skip reason is "1". ok 46 # skip 1 Also the test will not run twice. t/11mysql_common.t ...................... # You need to set the DBICTEST_MYSQL_INNODB environment variable to test relationships. DBD::mysql::db do failed: Table 'loader_test23' already exists [for Statement " CREATE TABLE LOADER_TEST23 ( ID INTEGER NOT NULL PRIMARY KEY, DAT VARCHAR(32) NOT NULL UNIQUE ) "] at t/lib/dbixcsl_common_tests.pm line 1428. # Looks like your test exited with 255 before it could output anything. t/11mysql_common.t ...................... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 236/236 subtests There were some other failures, I've attached the output.
Subject: test.out.gz
Download test.out.gz
application/x-gzip 2.5k

Message body not shown because it is not plain text.

PS This was at 00805149785ad04c1cf3c08f4b26ac0436466ed1
Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Sat, 3 Apr 2010 13:47:07 -0400
To: Michael G Schwern via RT <bug-DBIx-Class-Schema-Loader [...] rt.cpan.org>
From: Rafael Kitover <rkitover [...] cpan.org>
On Fri, Apr 02, 2010 at 03:51:09PM -0400, Michael G Schwern via RT wrote: Show quoted text
> Queue: DBIx-Class-Schema-Loader > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > Confirmed, except now the skip reason is "1". > > ok 46 # skip 1 > > Also the test will not run twice. > > t/11mysql_common.t ...................... # You need to set the > DBICTEST_MYSQL_INNODB environment variable to test relationships. > DBD::mysql::db do failed: Table 'loader_test23' already exists [for > Statement " > CREATE TABLE LOADER_TEST23 ( > ID INTEGER NOT NULL PRIMARY KEY, > DAT VARCHAR(32) NOT NULL UNIQUE > ) > "] at t/lib/dbixcsl_common_tests.pm line 1428. > # Looks like your test exited with 255 before it could output anything. > t/11mysql_common.t ...................... Dubious, test returned 255 > (wstat 65280, 0xff00) > Failed 236/236 subtests > > There were some other failures, I've attached the output. >
Hi Michael, thanks for running the tests! I've fixed the other fails in your log. I'm not sure why the table is not getting dropped, as it is supposed to get dropped on finish, on DESTROY and on create during the next run in t/lib/dbixcsl_common_tests.pm. In your mysql shell, can you do: CREATE TABLE LOADER_TEST23 (ID INTEGER); DROP TABLE LOADER_TEST23; in uppercase? It's the only uppercase table, maybe that's the issue, I have no idea. I'm using MySQL 5.0 on this machine (though should upgrade to 5.5...)
Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Sat, 03 Apr 2010 19:59:30 -0700
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
rkitover@cpan.org via RT wrote: Show quoted text
> I'm not sure why the table is not getting dropped, as it is supposed to > get dropped on finish, on DESTROY and on create during the next run in > t/lib/dbixcsl_common_tests.pm. > > In your mysql shell, can you do: > > CREATE TABLE LOADER_TEST23 (ID INTEGER); > DROP TABLE LOADER_TEST23; > > in uppercase? > > It's the only uppercase table, maybe that's the issue, I have no idea. > > I'm using MySQL 5.0 on this machine (though should upgrade to 5.5...)
This is 5.1.42 from MacPorts on OS X. I believe what's being run into here is MySQL's schizoid approach to table case sensitivity tied to the filesystem. In my case, a case insensitive filesystem means case insensitive table names... sort of. $ mysql5 test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 91 Server version: 5.1.42 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Show quoted text
mysql> describe loader_test23;
ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist Show quoted text
mysql> describe LOADER_TEST23;
ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist Show quoted text
mysql> CREATE TABLE LOADER_TEST23 (ID INTEGER);
ERROR 1050 (42S01): Table 'loader_test23' already exists Show quoted text
mysql> DROP TABLE LOADER_TEST23;
ERROR 1051 (42S02): Unknown table 'loader_test23' Show quoted text
mysql> show tables;
+----------------------------+ | Tables_in_test | +----------------------------+ | TestVersion | | books | | cd | | cd_to_producer | | dbix_class_schema_versions | | foo | | newstuff | | oldstuff | | owners | | producer | +----------------------------+ 10 rows in set (0.00 sec) But it works fine if its not all in upper case. Show quoted text
mysql> CREATE TABLE loader_test23 (ID INTEGER);
Query OK, 0 rows affected (0.05 sec) Show quoted text
mysql> drop TABLE loader_test23;
Query OK, 0 rows affected (0.00 sec) Show quoted text
mysql> CREATE TABLE LOADER_test23 (ID INTEGER);
Query OK, 0 rows affected (0.68 sec) Show quoted text
mysql> DROP TABLE LOADER_test23;
Query OK, 0 rows affected (0.00 sec) It may well be this bug. http://bugs.mysql.com/bug.php?id=37402 -- Whip me, beat me, make my code compatible with VMS!
Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Sun, 4 Apr 2010 01:43:33 -0400
To: Michael G Schwern via RT <bug-DBIx-Class-Schema-Loader [...] rt.cpan.org>
From: Rafael Kitover <rkitover [...] cpan.org>
So you now have a table that doesn't show up in 'show tables' and that you can't drop? Awesome. What would be the solution here, to lowercase table names on OSX? On Sat, Apr 03, 2010 at 10:59:58PM -0400, Michael G Schwern via RT wrote: Show quoted text
> Queue: DBIx-Class-Schema-Loader > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > This is 5.1.42 from MacPorts on OS X. I believe what's being run into here is > MySQL's schizoid approach to table case sensitivity tied to the filesystem. > In my case, a case insensitive filesystem means case insensitive table > names... sort of. > > $ mysql5 test > Reading table information for completion of table and column names > You can turn off this feature to get a quicker startup with -A > > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 91 > Server version: 5.1.42 Source distribution > > Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. >
> mysql> describe loader_test23;
> ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist >
> mysql> describe LOADER_TEST23;
> ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist >
> mysql> CREATE TABLE LOADER_TEST23 (ID INTEGER);
> ERROR 1050 (42S01): Table 'loader_test23' already exists >
> mysql> DROP TABLE LOADER_TEST23;
> ERROR 1051 (42S02): Unknown table 'loader_test23' >
> mysql> show tables;
> +----------------------------+ > | Tables_in_test | > +----------------------------+ > | TestVersion | > | books | > | cd | > | cd_to_producer | > | dbix_class_schema_versions | > | foo | > | newstuff | > | oldstuff | > | owners | > | producer | > +----------------------------+ > 10 rows in set (0.00 sec) > > But it works fine if its not all in upper case. >
> mysql> CREATE TABLE loader_test23 (ID INTEGER);
> Query OK, 0 rows affected (0.05 sec) >
> mysql> drop TABLE loader_test23;
> Query OK, 0 rows affected (0.00 sec) >
> mysql> CREATE TABLE LOADER_test23 (ID INTEGER);
> Query OK, 0 rows affected (0.68 sec) >
> mysql> DROP TABLE LOADER_test23;
> Query OK, 0 rows affected (0.00 sec) > > > It may well be this bug. > http://bugs.mysql.com/bug.php?id=37402 > > > -- > Whip me, beat me, make my code compatible with VMS! >
Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Sun, 4 Apr 2010 08:27:28 -0400
To: "rkitover [...] cpan.org via RT" <bug-DBIx-Class-Schema-Loader [...] rt.cpan.org>
From: Rafael Kitover <rkitover [...] cpan.org>
I just renamed that table to 'LOADER_test23', seems like the easiest solution and still makes the case-sensitive db tests happy. On Sun, Apr 04, 2010 at 01:44:03AM -0400, rkitover@cpan.org via RT wrote: Show quoted text
> Queue: DBIx-Class-Schema-Loader > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > So you now have a table that doesn't show up in 'show tables' and that > you can't drop? Awesome. > > What would be the solution here, to lowercase table names on OSX? > > On Sat, Apr 03, 2010 at 10:59:58PM -0400, Michael G Schwern via RT wrote:
> > Queue: DBIx-Class-Schema-Loader > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > > > This is 5.1.42 from MacPorts on OS X. I believe what's being run into here is > > MySQL's schizoid approach to table case sensitivity tied to the filesystem. > > In my case, a case insensitive filesystem means case insensitive table > > names... sort of. > > > > $ mysql5 test > > Reading table information for completion of table and column names > > You can turn off this feature to get a quicker startup with -A > > > > Welcome to the MySQL monitor. Commands end with ; or \g. > > Your MySQL connection id is 91 > > Server version: 5.1.42 Source distribution > > > > Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. > >
> > mysql> describe loader_test23;
> > ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist > >
> > mysql> describe LOADER_TEST23;
> > ERROR 1146 (42S02): Table 'test.loader_test23' doesn't exist > >
> > mysql> CREATE TABLE LOADER_TEST23 (ID INTEGER);
> > ERROR 1050 (42S01): Table 'loader_test23' already exists > >
> > mysql> DROP TABLE LOADER_TEST23;
> > ERROR 1051 (42S02): Unknown table 'loader_test23' > >
> > mysql> show tables;
> > +----------------------------+ > > | Tables_in_test | > > +----------------------------+ > > | TestVersion | > > | books | > > | cd | > > | cd_to_producer | > > | dbix_class_schema_versions | > > | foo | > > | newstuff | > > | oldstuff | > > | owners | > > | producer | > > +----------------------------+ > > 10 rows in set (0.00 sec) > > > > But it works fine if its not all in upper case. > >
> > mysql> CREATE TABLE loader_test23 (ID INTEGER);
> > Query OK, 0 rows affected (0.05 sec) > >
> > mysql> drop TABLE loader_test23;
> > Query OK, 0 rows affected (0.00 sec) > >
> > mysql> CREATE TABLE LOADER_test23 (ID INTEGER);
> > Query OK, 0 rows affected (0.68 sec) > >
> > mysql> DROP TABLE LOADER_test23;
> > Query OK, 0 rows affected (0.00 sec) > > > > > > It may well be this bug. > > http://bugs.mysql.com/bug.php?id=37402 > > > > > > -- > > Whip me, beat me, make my code compatible with VMS! > >
>
Subject: Re: [rt.cpan.org #56212] Skip test count wrong without DBICTEST_MYSQL_INNODB set
Date: Sun, 04 Apr 2010 14:05:02 -0700
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
rkitover@cpan.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=56212 > > > I just renamed that table to 'LOADER_test23', seems like the easiest > solution and still makes the case-sensitive db tests happy.
I pulled the new version of code. Alas: $ perl -Ilib t/11mysql_common.t # You need to set the DBICTEST_MYSQL_INNODB environment variable to test relationships. 1..236 DBD::mysql::db do failed: Table 'loader_test24' already exists [for Statement " CREATE TABLE LoAdEr_test24 ( iD INTEGER NOT NULL PRIMARY KEY, DaT VARCHAR(32) NOT NULL UNIQUE ) "] at t/lib/dbixcsl_common_tests.pm line 1459. # Looks like your test exited with 255 before it could output anything. So I upgraded MySQL to 5.1.45 and rebuilt all the tables. Now it works. Hopefully its a transient bug that messed up my tables. -- I do have a cause though. It's obscenity. I'm for it. - Tom Lehrer
Fixed in 0.06000