I know this is probably a dumb question, but should all the AR unit tests be succeeding for mysql? I am running them on 2 separate installs with rake test_mysql and get similar errors on both. Just curious if mysql is designed to pass all the tests. 3 of these: test_lock_column_name_existing(LockingTest): ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM legacy_things And a bunch of these: test_has_child(TreeTest): ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 This is all run off trunk with: rake AR_TX_FIXTURES=yes test_mysql Bob Silva http://www.railtie.net/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 2/10/06, Bob Silva <me@bobsilva.com> wrote:> > > > I know this is probably a dumb question, but should all the AR unit tests be > succeeding for mysql?They''re passing to me, have you run the two drop and recreate scripts in /test/fixtures/db_definitions?> Just curious if mysql is designed to pass all the tests.Yes, it should be all passing all the time ;) -- Cheers Koz
Hi Koz, Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled on a fresh SuSE 10 box. Most of the tests pass, I''ll tinker with it and see what''s happening. Curious if anyone on the core team tests outside of OSX? (Meaning, are the tests known to pass in a non-osx environment?) The reason I ask, is in activesupport, there is an incompatibility with Linux when calling STDERR.tell resulting in a failed test. Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Michael Koziarski > Sent: Thursday, February 09, 2006 9:29 PM > To: rails-core@lists.rubyonrails.org > Subject: Re: [Rails-core] AR Unit Tests > > On 2/10/06, Bob Silva <me@bobsilva.com> wrote: > > > > > > > > I know this is probably a dumb question, but should all the AR unit > tests be > > succeeding for mysql? > > They''re passing to me, have you run the two drop and recreate scripts > in /test/fixtures/db_definitions? > > > Just curious if mysql is designed to pass all the tests. > > Yes, it should be all passing all the time ;) > > > -- > Cheers > > Koz > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled on a fresh > SuSE 10 box. Most of the tests pass, I''ll tinker with it and see what''s > happening. > > Curious if anyone on the core team tests outside of OSX? (Meaning, are the > tests known to pass in a non-osx environment?) The reason I ask, is in > activesupport, there is an incompatibility with Linux when calling > STDERR.tell resulting in a failed test.Jeremy and Nicholas have been seen running tests on linux, but I personally only use mac os x and freebsd. If you can''t track it down, let me know, I can probably dig up my old fedora core installation. -- Cheers Koz
On 2/10/06, Bob Silva <me@bobsilva.com> wrote:> > test_lock_column_name_existing(LockingTest): > > ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE > FROM legacy_thingsThis is a test I wrote. I don''t use MySQL, unfortunately, so I can only hope that I got the definition syntax right. This is what is in the mysql.sql file.. is this correct? CREATE TABLE `legacy_things` ( `id` int(11) NOT NULL auto_increment, `tps_report_number` int(11) default NULL, `version` int(11) NOT NULL default 0, PRIMARY KEY (`id`) ) TYPE=InnoDB;
Wilson Bilkovich wrote:> This is a test I wrote. I don''t use MySQL, unfortunately, so I can > only hope that I got the definition syntax right. This is what is in > the mysql.sql file.. is this correct?Sure is: mysql> CREATE TABLE `legacy_things` ( -> `id` int(11) NOT NULL auto_increment, -> `tps_report_number` int(11) default NULL, -> `version` int(11) NOT NULL default 0, -> PRIMARY KEY (`id`) -> ) TYPE=InnoDB; Query OK, 0 rows affected, 1 warning (0.07 sec) -- Jakob Skjerning - http://mentalized.net
I''m seeing the same on OS X. I just upgraded from MySQL 4.1 to 5.0 (mysql-standard-5.0.18-osx10.4-powerpc), and ruby from 1.8.2 to 1.8.4 (ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]) just to make sure that wasn''t the cause. It wasn''t. This is the status: 701 tests, 2210 assertions, 3 failures, 27 errors The ones I''m seeing are: ActiveRecord::StatementInvalid: Mysql::Error: Table ''activerecord_unittest.taggings'' doesn''t exist: DELETE FROM taggings 16 times ActiveRecord::StatementInvalid: Mysql::Error: Table ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM legacy_things 3 times 3 transaction tests failing: 20) Failure: test_callback_rollback_in_save(TransactionTest) [./test/ transactions_test.rb:119]: <false> is not true. 21) Failure: test_failing_on_exception(TransactionTest) [./test/ transactions_test.rb:87]: First shouldn''t have been approved. <false> is not true. 22) Failure: test_successful_with_return(TransactionTest) [./test/ transactions_test.rb:49]: <false> is not true. and finally ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 8 times. I tried a little svn digging, and I had to go all the way back to December 1st 2005 to find a checkout that tested cleanly for me. Weird. /Lars On Feb 10, 2006, at 8:15 AM, Michael Koziarski wrote:>> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled >> on a fresh >> SuSE 10 box. Most of the tests pass, I''ll tinker with it and see >> what''s >> happening. >> >> Curious if anyone on the core team tests outside of OSX? (Meaning, >> are the >> tests known to pass in a non-osx environment?) The reason I ask, >> is in >> activesupport, there is an incompatibility with Linux when calling >> STDERR.tell resulting in a failed test. > > Jeremy and Nicholas have been seen running tests on linux, but I > personally only use mac os x and freebsd. If you can''t track it > down, let me know, I can probably dig up my old fedora core > installation. > > > -- > Cheers > > Koz > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
Hi Lars, Glad to see those errors, it''s EXACTLY the same output I receive. If you run tests again, all the taggings errors disappear though. Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Lars Pind > Sent: Friday, February 10, 2006 7:14 AM > To: rails-core@lists.rubyonrails.org > Subject: Re: [Rails-core] AR Unit Tests > > I''m seeing the same on OS X. I just upgraded from MySQL 4.1 to 5.0 > (mysql-standard-5.0.18-osx10.4-powerpc), and ruby from 1.8.2 to 1.8.4 > (ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]) just to make sure > that wasn''t the cause. It wasn''t. > > This is the status: > > 701 tests, 2210 assertions, 3 failures, 27 errors > > The ones I''m seeing are: > > ActiveRecord::StatementInvalid: Mysql::Error: Table > ''activerecord_unittest.taggings'' doesn''t exist: DELETE FROM taggings > 16 times > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM > legacy_things > 3 times > > 3 transaction tests failing: > > 20) Failure: > test_callback_rollback_in_save(TransactionTest) [./test/ > transactions_test.rb:119]: > <false> is not true. > > 21) Failure: > test_failing_on_exception(TransactionTest) [./test/ > transactions_test.rb:87]: > First shouldn''t have been approved. > <false> is not true. > > 22) Failure: > test_successful_with_return(TransactionTest) [./test/ > transactions_test.rb:49]: > <false> is not true. > > > and finally > > ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 > 8 times. > > > I tried a little svn digging, and I had to go all the way back to > December 1st 2005 to find a checkout that tested cleanly for me. Weird. > > /Lars > > > On Feb 10, 2006, at 8:15 AM, Michael Koziarski wrote: > > >> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled > >> on a fresh > >> SuSE 10 box. Most of the tests pass, I''ll tinker with it and see > >> what''s > >> happening. > >> > >> Curious if anyone on the core team tests outside of OSX? (Meaning, > >> are the > >> tests known to pass in a non-osx environment?) The reason I ask, > >> is in > >> activesupport, there is an incompatibility with Linux when calling > >> STDERR.tell resulting in a failed test. > > > > Jeremy and Nicholas have been seen running tests on linux, but I > > personally only use mac os x and freebsd. If you can''t track it > > down, let me know, I can probably dig up my old fedora core > > installation. > > > > > > -- > > Cheers > > > > Koz > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
The problem with the taggings table is that aaa_create_tables isn''t the first test that is run (on linux at least). On that note, is it the best design to have a test dependent on another test? associations_join_model_test is dependent on aaa_create_tables running before it. Still working on resolving the rest of the errors. Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Bob Silva > Sent: Friday, February 10, 2006 7:22 AM > To: rails-core@lists.rubyonrails.org > Subject: RE: [Rails-core] AR Unit Tests > > Hi Lars, > > Glad to see those errors, it''s EXACTLY the same output I receive. If you > run > tests again, all the taggings errors disappear though. > > Bob Silva > http://www.railtie.net/ > > > -----Original Message----- > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > bounces@lists.rubyonrails.org] On Behalf Of Lars Pind > > Sent: Friday, February 10, 2006 7:14 AM > > To: rails-core@lists.rubyonrails.org > > Subject: Re: [Rails-core] AR Unit Tests > > > > I''m seeing the same on OS X. I just upgraded from MySQL 4.1 to 5.0 > > (mysql-standard-5.0.18-osx10.4-powerpc), and ruby from 1.8.2 to 1.8.4 > > (ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]) just to make sure > > that wasn''t the cause. It wasn''t. > > > > This is the status: > > > > 701 tests, 2210 assertions, 3 failures, 27 errors > > > > The ones I''m seeing are: > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > ''activerecord_unittest.taggings'' doesn''t exist: DELETE FROM taggings > > 16 times > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM > > legacy_things > > 3 times > > > > 3 transaction tests failing: > > > > 20) Failure: > > test_callback_rollback_in_save(TransactionTest) [./test/ > > transactions_test.rb:119]: > > <false> is not true. > > > > 21) Failure: > > test_failing_on_exception(TransactionTest) [./test/ > > transactions_test.rb:87]: > > First shouldn''t have been approved. > > <false> is not true. > > > > 22) Failure: > > test_successful_with_return(TransactionTest) [./test/ > > transactions_test.rb:49]: > > <false> is not true. > > > > > > and finally > > > > ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 > > 8 times. > > > > > > I tried a little svn digging, and I had to go all the way back to > > December 1st 2005 to find a checkout that tested cleanly for me. Weird. > > > > /Lars > > > > > > On Feb 10, 2006, at 8:15 AM, Michael Koziarski wrote: > > > > >> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled > > >> on a fresh > > >> SuSE 10 box. Most of the tests pass, I''ll tinker with it and see > > >> what''s > > >> happening. > > >> > > >> Curious if anyone on the core team tests outside of OSX? (Meaning, > > >> are the > > >> tests known to pass in a non-osx environment?) The reason I ask, > > >> is in > > >> activesupport, there is an incompatibility with Linux when calling > > >> STDERR.tell resulting in a failed test. > > > > > > Jeremy and Nicholas have been seen running tests on linux, but I > > > personally only use mac os x and freebsd. If you can''t track it > > > down, let me know, I can probably dig up my old fedora core > > > installation. > > > > > > > > > -- > > > Cheers > > > > > > Koz > > > _______________________________________________ > > > Rails-core mailing list > > > Rails-core@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
Whew! Gotta find those debugging switches a little faster next time. Wasn''t able to track down why, but aaa_create_tables.rb tests weren''t being run first. In my case, instead of the file name determining the order of things, the class name would determine the order. So I renamed the class to AAACreateTablesTest and everything runs fine. The other problem was that the mysql.sql had an invalid (my)SQL comment in it. --Alter lock... In mysql, a ''--'' comment has to have at least one whitespace character following it. The patch is ticket #3798. Now all tests run successfully. Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Bob Silva > Sent: Friday, February 10, 2006 9:01 AM > To: rails-core@lists.rubyonrails.org > Subject: RE: [Rails-core] AR Unit Tests > > The problem with the taggings table is that aaa_create_tables isn''t the > first test that is run (on linux at least). > > On that note, is it the best design to have a test dependent on another > test? associations_join_model_test is dependent on aaa_create_tables > running > before it. > > Still working on resolving the rest of the errors. > > > Bob Silva > http://www.railtie.net/ > > > -----Original Message----- > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > bounces@lists.rubyonrails.org] On Behalf Of Bob Silva > > Sent: Friday, February 10, 2006 7:22 AM > > To: rails-core@lists.rubyonrails.org > > Subject: RE: [Rails-core] AR Unit Tests > > > > Hi Lars, > > > > Glad to see those errors, it''s EXACTLY the same output I receive. If you > > run > > tests again, all the taggings errors disappear though. > > > > Bob Silva > > http://www.railtie.net/ > > > > > -----Original Message----- > > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > > bounces@lists.rubyonrails.org] On Behalf Of Lars Pind > > > Sent: Friday, February 10, 2006 7:14 AM > > > To: rails-core@lists.rubyonrails.org > > > Subject: Re: [Rails-core] AR Unit Tests > > > > > > I''m seeing the same on OS X. I just upgraded from MySQL 4.1 to 5.0 > > > (mysql-standard-5.0.18-osx10.4-powerpc), and ruby from 1.8.2 to 1.8.4 > > > (ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]) just to make sure > > > that wasn''t the cause. It wasn''t. > > > > > > This is the status: > > > > > > 701 tests, 2210 assertions, 3 failures, 27 errors > > > > > > The ones I''m seeing are: > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > > ''activerecord_unittest.taggings'' doesn''t exist: DELETE FROM taggings > > > 16 times > > > > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM > > > legacy_things > > > 3 times > > > > > > 3 transaction tests failing: > > > > > > 20) Failure: > > > test_callback_rollback_in_save(TransactionTest) [./test/ > > > transactions_test.rb:119]: > > > <false> is not true. > > > > > > 21) Failure: > > > test_failing_on_exception(TransactionTest) [./test/ > > > transactions_test.rb:87]: > > > First shouldn''t have been approved. > > > <false> is not true. > > > > > > 22) Failure: > > > test_successful_with_return(TransactionTest) [./test/ > > > transactions_test.rb:49]: > > > <false> is not true. > > > > > > > > > and finally > > > > > > ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 > > > 8 times. > > > > > > > > > I tried a little svn digging, and I had to go all the way back to > > > December 1st 2005 to find a checkout that tested cleanly for me. > Weird. > > > > > > /Lars > > > > > > > > > On Feb 10, 2006, at 8:15 AM, Michael Koziarski wrote: > > > > > > >> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled > > > >> on a fresh > > > >> SuSE 10 box. Most of the tests pass, I''ll tinker with it and see > > > >> what''s > > > >> happening. > > > >> > > > >> Curious if anyone on the core team tests outside of OSX? (Meaning, > > > >> are the > > > >> tests known to pass in a non-osx environment?) The reason I ask, > > > >> is in > > > >> activesupport, there is an incompatibility with Linux when calling > > > >> STDERR.tell resulting in a failed test. > > > > > > > > Jeremy and Nicholas have been seen running tests on linux, but I > > > > personally only use mac os x and freebsd. If you can''t track it > > > > down, let me know, I can probably dig up my old fedora core > > > > installation. > > > > > > > > > > > > -- > > > > Cheers > > > > > > > > Koz > > > > _______________________________________________ > > > > Rails-core mailing list > > > > Rails-core@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > _______________________________________________ > > > Rails-core mailing list > > > Rails-core@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 2/11/06, Bob Silva <me@bobsilva.com> wrote:> Whew! Gotta find those debugging switches a little faster next time. > > Wasn''t able to track down why, but aaa_create_tables.rb tests weren''t being > run first. In my case, instead of the file name determining the order of > things, the class name would determine the order. So I renamed the class to > AAACreateTablesTest and everything runs fine.Thanks for that, it''s been ... somewhat annoying lately, I''m glad you tracked it down.> The other problem was that the mysql.sql had an invalid (my)SQL comment in > it. --Alter lock... In mysql, a ''--'' comment has to have at least one > whitespace character following it. > > The patch is ticket #3798.Looks good, the two patches both add the drop table readers for mysql, but that''s no big deal.> Now all tests run successfully.I''ll verify, and apply today> Bob Silva > http://www.railtie.net/ > > > > > -----Original Message----- > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > bounces@lists.rubyonrails.org] On Behalf Of Bob Silva > > Sent: Friday, February 10, 2006 9:01 AM > > To: rails-core@lists.rubyonrails.org > > Subject: RE: [Rails-core] AR Unit Tests > > > > The problem with the taggings table is that aaa_create_tables isn''t the > > first test that is run (on linux at least). > > > > On that note, is it the best design to have a test dependent on another > > test? associations_join_model_test is dependent on aaa_create_tables > > running > > before it. > > > > Still working on resolving the rest of the errors. > > > > > > Bob Silva > > http://www.railtie.net/ > > > > > -----Original Message----- > > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > > bounces@lists.rubyonrails.org] On Behalf Of Bob Silva > > > Sent: Friday, February 10, 2006 7:22 AM > > > To: rails-core@lists.rubyonrails.org > > > Subject: RE: [Rails-core] AR Unit Tests > > > > > > Hi Lars, > > > > > > Glad to see those errors, it''s EXACTLY the same output I receive. If you > > > run > > > tests again, all the taggings errors disappear though. > > > > > > Bob Silva > > > http://www.railtie.net/ > > > > > > > -----Original Message----- > > > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > > > bounces@lists.rubyonrails.org] On Behalf Of Lars Pind > > > > Sent: Friday, February 10, 2006 7:14 AM > > > > To: rails-core@lists.rubyonrails.org > > > > Subject: Re: [Rails-core] AR Unit Tests > > > > > > > > I''m seeing the same on OS X. I just upgraded from MySQL 4.1 to 5.0 > > > > (mysql-standard-5.0.18-osx10.4-powerpc), and ruby from 1.8.2 to 1.8.4 > > > > (ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]) just to make sure > > > > that wasn''t the cause. It wasn''t. > > > > > > > > This is the status: > > > > > > > > 701 tests, 2210 assertions, 3 failures, 27 errors > > > > > > > > The ones I''m seeing are: > > > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > > > ''activerecord_unittest.taggings'' doesn''t exist: DELETE FROM taggings > > > > 16 times > > > > > > > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: Table > > > > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE FROM > > > > legacy_things > > > > 3 times > > > > > > > > 3 transaction tests failing: > > > > > > > > 20) Failure: > > > > test_callback_rollback_in_save(TransactionTest) [./test/ > > > > transactions_test.rb:119]: > > > > <false> is not true. > > > > > > > > 21) Failure: > > > > test_failing_on_exception(TransactionTest) [./test/ > > > > transactions_test.rb:87]: > > > > First shouldn''t have been approved. > > > > <false> is not true. > > > > > > > > 22) Failure: > > > > test_successful_with_return(TransactionTest) [./test/ > > > > transactions_test.rb:49]: > > > > <false> is not true. > > > > > > > > > > > > and finally > > > > > > > > ActiveRecord::RecordNotFound: Couldn''t find Mixin with ID=1001 > > > > 8 times. > > > > > > > > > > > > I tried a little svn digging, and I had to go all the way back to > > > > December 1st 2005 to find a checkout that tested cleanly for me. > > Weird. > > > > > > > > /Lars > > > > > > > > > > > > On Feb 10, 2006, at 8:15 AM, Michael Koziarski wrote: > > > > > > > > >> Yep, I have the dbs set up right, MySQL 5.1.0 with InnoDB enabled > > > > >> on a fresh > > > > >> SuSE 10 box. Most of the tests pass, I''ll tinker with it and see > > > > >> what''s > > > > >> happening. > > > > >> > > > > >> Curious if anyone on the core team tests outside of OSX? (Meaning, > > > > >> are the > > > > >> tests known to pass in a non-osx environment?) The reason I ask, > > > > >> is in > > > > >> activesupport, there is an incompatibility with Linux when calling > > > > >> STDERR.tell resulting in a failed test. > > > > > > > > > > Jeremy and Nicholas have been seen running tests on linux, but I > > > > > personally only use mac os x and freebsd. If you can''t track it > > > > > down, let me know, I can probably dig up my old fedora core > > > > > installation. > > > > > > > > > > > > > > > -- > > > > > Cheers > > > > > > > > > > Koz > > > > > _______________________________________________ > > > > > Rails-core mailing list > > > > > Rails-core@lists.rubyonrails.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > _______________________________________________ > > > > Rails-core mailing list > > > > Rails-core@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > _______________________________________________ > > > Rails-core mailing list > > > Rails-core@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >-- Cheers Koz
Hi Wilson, The problem was with the comment in front of the table. In MySQL, comments starting with -- need a whitespace character following it. Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Wilson Bilkovich > Sent: Friday, February 10, 2006 6:38 AM > To: rails-core@lists.rubyonrails.org > Subject: Re: [Rails-core] AR Unit Tests > > On 2/10/06, Bob Silva <me@bobsilva.com> wrote: > > > > test_lock_column_name_existing(LockingTest): > > > > ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table > > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE > > FROM legacy_things > > This is a test I wrote. I don''t use MySQL, unfortunately, so I can > only hope that I got the definition syntax right. This is what is in > the mysql.sql file.. is this correct? > > CREATE TABLE `legacy_things` ( > `id` int(11) NOT NULL auto_increment, > `tps_report_number` int(11) default NULL, > `version` int(11) NOT NULL default 0, > PRIMARY KEY (`id`) > ) TYPE=InnoDB; > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
Good to know. I''ll be more careful with when guessing at MySQL syntax next time. Sorry for the inconvenience. :) On 2/11/06, Bob Silva <me@bobsilva.com> wrote:> Hi Wilson, > > The problem was with the comment in front of the table. In MySQL, comments > starting with -- need a whitespace character following it. > > Bob Silva > http://www.railtie.net/ > > > -----Original Message----- > > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > > bounces@lists.rubyonrails.org] On Behalf Of Wilson Bilkovich > > Sent: Friday, February 10, 2006 6:38 AM > > To: rails-core@lists.rubyonrails.org > > Subject: Re: [Rails-core] AR Unit Tests > > > > On 2/10/06, Bob Silva <me@bobsilva.com> wrote: > > > > > > test_lock_column_name_existing(LockingTest): > > > > > > ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table > > > ''activerecord_unittest.legacy_things'' doesn''t exist: DELETE > > > FROM legacy_things > > > > This is a test I wrote. I don''t use MySQL, unfortunately, so I can > > only hope that I got the definition syntax right. This is what is in > > the mysql.sql file.. is this correct? > > > > CREATE TABLE `legacy_things` ( > > `id` int(11) NOT NULL auto_increment, > > `tps_report_number` int(11) default NULL, > > `version` int(11) NOT NULL default 0, > > PRIMARY KEY (`id`) > > ) TYPE=InnoDB; > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >