Some DB connection problems lead to regexp error
------------------------------------------------

                 Key: JRUBY-2124
                 URL: http://jira.codehaus.org/browse/JRUBY-2124
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1RC2
         Environment: Windows XP SP2
            Reporter: Mike Gerdts
            Assignee: Thomas E Enebo
            Priority: Minor


>From within NetBeans if I run rake task db:migrate at a time when MySQL is in 
>a broken state (which I don't yet understand), I see the following output.  My 
>concern is the fatal error message while trying to display a helpful fatal 
>error message.  I have secondary issues with MySQL that I don't think are 
>related to this release.

(in D:/Documents and Settings/xxxx/My Documents/NetBeansProjects/myproject)
rake aborted!
Mysql::Error: #HY000Incorrect information in file: 
'.\jmaki_ror2_development\schema_info.frm': SELECT version FROM schema_info
rake aborted!
invalid meta-code syntax: /D:\Documents and Settings\xxxx\My 
Documents\NetBeansProjects\myproject\Rakefile/
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1962:in
 `find': invalid meta-code syntax: /D:\Documents and Settings\xxxx\My 
Documents\NetBeansProjects\myproject\Rakefile/ (RegexpError)
        from D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1962:in
 `each'
        from D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1962:in
 `find'
        from D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1962:in
 `standard_exception_handling'
        from D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1962:in
 `run'
        from D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878
        from D:\Documents and Settings\xxxx\jruby-1.1RC2\bin\rake:19:in `load'
        from D:\Documents and Settings\xxxx\jruby-1.1RC2\bin\rake:19

By modifying rake.db:1962 to the following (comment the line):

          # $stderr.puts ex.backtrace.find {|str| str =~ /[EMAIL PROTECTED]/ } 
|| ""

Then re-running the db:migrate:

(in D:/Documents and Settings/xxxx/My Documents/NetBeansProjects/myproject)
rake aborted!
Mysql::Error: #HY000Incorrect information in file: 
'.\jmaki_ror2_development\schema_info.frm': SELECT version FROM schema_info
(See full trace by running task with --trace)
Click here to re-run task with tracing enabled

At this point I can "click here" to re-run with tracing.  It says:

(in D:/Documents and Settings/xxxx/My Documents/NetBeansProjects/myproject)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Mysql::Error: #HY000Incorrect information in file: 
'.\jmaki_ror2_development\schema_info.frm': SELECT version FROM schema_info
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in
 `log'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:132:in
 `execute'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:281:in
 `select'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in
 `select_all'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:55:in
 `select_all_with_query_cache'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in
 `select_one'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in
 `select_value'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:319:in
 `current_version'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:335:in
 `current_version'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:414:in
 `irrelevant_migration?'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:345:in
 `migrate'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:366:in
 `each'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:366:in
 `migrate'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:366:in
 `up'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/migration.rb:298:in
 `migrate'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:85
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:83:in
 `call'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in 
`execute'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in 
`each'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in 
`execute'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in 
`invoke_with_call_chain'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in 
`synchronize'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in 
`invoke_with_call_chain'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in 
`invoke'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
 `invoke_task'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
 `top_level'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
 `each'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
 `top_level'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
 `standard_exception_handling'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
 `top_level'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
 `run'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in
 `standard_exception_handling'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in
 `run'
D:/Documents and 
Settings/xxxx/jruby-1.1RC2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878
D:\Documents and Settings\xxxx\jruby-1.1RC2\bin\rake:19:in `load'
D:\Documents and Settings\xxxx\jruby-1.1RC2\bin\rake:19


If I point it at  a different mysql instance running on Solaris (SXDE 1/08), 
all is well.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to