Created
February 7, 2009 07:12
-
-
Save dbussink/59806 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/do_mysql/ext/do_mysql_ext/do_mysql_ext.c b/do_mysql/ext/do_mysql_ext/do_mysql_ext.c | |
| index 581663c..b749c43 100755 | |
| --- a/do_mysql/ext/do_mysql_ext/do_mysql_ext.c | |
| +++ b/do_mysql/ext/do_mysql_ext/do_mysql_ext.c | |
| @@ -85,7 +85,9 @@ static VALUE infer_ruby_type(MYSQL_FIELD *field) { | |
| ruby_type = "TrueClass"; | |
| break; | |
| } | |
| +#ifdef MYSQL_TYPE_BIT | |
| case MYSQL_TYPE_BIT: | |
| +#endif | |
| case MYSQL_TYPE_SHORT: | |
| case MYSQL_TYPE_LONG: | |
| case MYSQL_TYPE_INT24: | |
| @@ -94,8 +96,10 @@ static VALUE infer_ruby_type(MYSQL_FIELD *field) { | |
| ruby_type = "Fixnum"; | |
| break; | |
| } | |
| - case MYSQL_TYPE_DECIMAL: | |
| - case MYSQL_TYPE_NEWDECIMAL: { | |
| +#ifdef MYSQL_TYPE_NEWDECIMAL | |
| + case MYSQL_TYPE_NEWDECIMAL: | |
| +#endif | |
| + case MYSQL_TYPE_DECIMAL: { | |
| ruby_type = "BigDecimal"; | |
| break; | |
| } | |
| @@ -507,8 +511,10 @@ static VALUE cConnection_initialize(VALUE self, VALUE uri) { | |
| raise_mysql_error(Qnil, db, -1, NULL); | |
| } | |
| +#ifdef MYSQL_OPT_RECONNECT | |
| my_bool reconnect = 1; | |
| mysql_options(db, MYSQL_OPT_RECONNECT, &reconnect); | |
| +#endif | |
| // Set the connections character set | |
| encoding_error = mysql_set_character_set(db, encoding); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment