The error you're seeing means you need to apply the
mysql_adapter_opt_local_infile.patch in AdapterExtensions. If you've already
done that, then it's possible that the patch needs to be tweaked slightly
for Rails 2.1 (but I don't think this is the case). In any event, the
connect method in MysqlAdapter needs to have this line:
@connection.options(Mysql::OPT_LOCAL_INFILE, true)
(BTW, I don't quite get why the patch is necessary. It seems like this could
be handled entirely within AdapterExtensions itself. I'll look into this.)
The rest of the errors I'm seeing look roughly like this one:
2) Failure:
test: when working with a slowly changing dimension of type 1 on run 2
should skip the load if there is no change. (ScdTest)
[./test/scd_test.rb:47:in `__bind_1224209299_596896'
/opt/local/lib/ruby/gems/1.8/gems/Shoulda-1.2.0/lib/shoulda.rb:226:in
`call'
/opt/local/lib/ruby/gems/1.8/gems/Shoulda-1.2.0/lib/shoulda.rb:226:in
`test: when working with a slowly changing dimension of type 1 on run 2
should skip the load if there is no change. ']:
scheduled load expected to be empty, was 1 records.
<false> is not true.
D
> From: Anthony Eden <[EMAIL PROTECTED]>
> Date: Fri, 17 Oct 2008 07:42:55 -0400
> To: Darin Wilson <[EMAIL PROTECTED]>
> Cc: <[email protected]>
> Subject: Re: [Activewarehouse-discuss] would the real codebase please stand
> up? :)
>
> I'm seeing even more errors with MySQL. A lot of them look like this:
>
> Mysql::Error: #42000The used command is not allowed with this MySQL
> version: LOAD DATA LOCAL INFILE './test/output/scd_test_type_2.txt'
> INTO TABLE person_dimension FIELDS TERMINATED BY ','
>
> What are the errors you are seeing when you run against MySQL?
>
> -A
>
> On Thu, Oct 16, 2008 at 10:14 PM, Darin Wilson
> <[EMAIL PROTECTED]> wrote:
>> I just pulled the latest from your github repo and ran the ETL test suite
>> locally against MySQL. I got 10 errors that were about SCDs, so I'm assuming
>> those were the same ones you mentioned in your last message(?).
>>
>> There was one other error:
>>
>> 1) Failure:
>> test_bulk_import_with_empties(ProcessorTest) [./test/processor_test.rb:19]:
>> <ActiveRecord::StatementInvalid> exception expected but none was thrown.
>>
>> It turns out that MySQL is much less strict about what goes into the bulk
>> loader - if you try to load a row with an empty value into a column that
>> disallows null, MySQL just skips it without an error. Nice! :)
>>
>> I'm not sure how you'd like to handle that. I tried poking around a bit to
>> see if there's a way to force MySQL into being more strict, but I couldn't
>> get anything to work reliably. The simplest fix would be to do something
>> like this in the test:
>>
>> unless ETL::Engine.connection(:data_warehouse).class ==
>> ActiveRecord::ConnectionAdapters::MysqlAdapter
>> assert_raise(ActiveRecord::StatementInvalid) {
>> do_bulk_import('bulk_import_with_empties.txt') }
>> end
>>
>> which sort of invalidates the test, but it doesn't seem like there's a way
>> to make this test actually work with MySQL. Your call. ;)
>>
>> Darin
>>
>>
>>> From: Anthony Eden <[EMAIL PROTECTED]>
>>> Date: Thu, 16 Oct 2008 15:23:04 -0400
>>> To: Darin Wilson <[EMAIL PROTECTED]>
>>> Cc: <[email protected]>
>>> Subject: Re: [Activewarehouse-discuss] would the real codebase please stand
>>> up? :)
>>>
>>> I think I have most of the fixes to ETL in for the 2.1 changes. I've
>>> started changing over some of the tests to use shoulda 1.x, so if you
>>> want to run the built in tests then you'll need the shoulda gem. There
>>> are currently two failing tests related to the SCD implementation.
>>> Jacob, was that an area you worked on? If so could you take a look at
>>> the failing tests? Also, I currently have tested with Postgres locally
>>> but not MySQL, so if someone wants to fight through the test suite on
>>> MySQL, be my guest. :-)
>>>
>>> Thanks.
>>>
>>> -Anthony
>>>
>>> On Thu, Oct 16, 2008 at 12:11 PM, Darin Wilson
>>> <[EMAIL PROTECTED]> wrote:
>>>> Cool - that is what I was going to start working on. :)
>>>>
>>>> Please let us know when your 2.1 fixes to ETL are checked in - I'd like to
>>>> try it out with our ETL (and I have a bunch of test cases for it).
>>>>
>>>> Thanks!
>>>> Darin
>>>>
>>>>> From: Anthony Eden <[EMAIL PROTECTED]>
>>>>> Date: Thu, 16 Oct 2008 06:59:41 -0400
>>>>> To: Marty Haught <[EMAIL PROTECTED]>
>>>>> Cc: <[email protected]>
>>>>> Subject: Re: [Activewarehouse-discuss] would the real codebase please
>>>>> stand
>>>>> up? :)
>>>>>
>>>>> I've started the upgrade to 2.1. I've already modified ActiveWarehouse
>>>>> ETL to handle the new migration process and I have it running right
>>>>> now under 2.1. Once I get past my first ETL load on the project I'm
>>>>> working on I'll move onto the AW plugin.
>>>>>
>>>>> -Anthony
>>>>> _______________________________________________
>>>>> Activewarehouse-discuss mailing list
>>>>> [email protected]
>>>>> http://rubyforge.org/mailman/listinfo/activewarehouse-discuss
>>>>
>>>>
>>>> _______________________________________________
>>>> Activewarehouse-discuss mailing list
>>>> [email protected]
>>>> http://rubyforge.org/mailman/listinfo/activewarehouse-discuss
>>>>
>>
>>
>> _______________________________________________
>> Activewarehouse-discuss mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/activewarehouse-discuss
>>
_______________________________________________
Activewarehouse-discuss mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/activewarehouse-discuss