
"edge" dm-migrations incompatible with MySQL < 5.1.12
Reported by Greg Campbell | December 9th, 2010 @ 07:20 PM | in 1.1
Commit https://github.com/datamapper/dm-migrations/commit/faea4c2b7a5e03c6... switches from using SHOW VARIABLES to using a select against information_schema.session_variables. According to http://dev.mysql.com/doc/refman/5.1/en/variables-table.html, that table wasn't added until MySQL 5.1, which means that migrations fail against a database server running Debian stable (lenny), which only includes MySQL 5.0.
Comments and changes to this ticket
-
Dan Kubb (dkubb) January 16th, 2011 @ 09:35 PM
Ok, I will look at this. Our intention is generally to support the latest stable version of a specific database unless someone needs it and the code impact is minimal; which are both the case here.
The one problem with rolling back is that I don't have a working solution for JRuby without using information_schema.session_variables yet. Currently JRuby support trumps supporting older versions of MySQL in terms of priority, so I won't be changing anything until I can figure out why JRuby behaves differently when using SHOW VARIABLES.
Once I can figure out a way to use SHOW VARIABLES with JRuby I'll roll back the change, and put in place whatever fix I need for JRuby.
Absolutely worst case, if there's no way I can figure it out I'll put a logic branch in to use different queries for different versions of MySQL. I really dislike this though, since it means one branch might not get tested as much as another.
-
Greg Campbell January 16th, 2011 @ 11:09 PM
Thanks, Dan. I'll see what I can do to help; I can certainly maintain my fork for my own use until a solution is reached.
-
Piotr Solnica (solnic) January 19th, 2011 @ 10:25 AM
well, it's hit me too. I can't auto-upgrade on my staging server where I have mysql 5.0
-
Martin Gamsjaeger (snusnu) January 20th, 2011 @ 07:08 AM
- State changed from unconfirmed to confirmed
-
Dan Kubb (dkubb) January 25th, 2011 @ 05:04 PM
- State changed from confirmed to resolved
(from [3f68c9056e4eda6b8bb0f2c3b015da64b388e30e]) Revert "Use a SELECT query to retrieve the session variable"
This reverts commit faea4c2b7a5e03c6bbd974589ed6d9bbec8a008b.
- This commit works-around some problems with JRuby/JDBC returning incorrect results for the previous query. However, if it's truly a bug it should be fixed upstream rather than locally in this code.
Plus the query I'm using here excludes people using MySQL 5.0 and below, which is not acceptable.
I (or someone) need to revisit the actual problem with the code I'm about to revert back to under JRuby and try to isolate the cause of the invalid value being returned.
[#1454 state:resolved] https://github.com/datamapper/dm-migrations/commit/3f68c9056e4eda6b...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
1454 "edge" dm-migrations incompatible with MySQL < 5.1.12 [#1454 state:resolved] https://github.com/datamapper/dm-...