<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -65,51 +65,51 @@ static VALUE eMysqlError;
 // Figures out what we should cast a given mysql field type to
 static char * ruby_type_from_mysql_type(MYSQL_FIELD *field) {
 
-	char* ruby_type_name;
-
-	switch(field-&gt;type) {
-		case MYSQL_TYPE_NULL: {
-			ruby_type_name = NULL;
-			break;
-		}
-		case MYSQL_TYPE_TINY: {
-			ruby_type_name = &quot;TrueClass&quot;;
-			break;
-		}
-		case MYSQL_TYPE_SHORT:
-		case MYSQL_TYPE_LONG:
-		case MYSQL_TYPE_INT24:
-		case MYSQL_TYPE_LONGLONG:
-		case MYSQL_TYPE_YEAR: {
-			ruby_type_name = &quot;Fixnum&quot;;
-			break;
-		}
-		case MYSQL_TYPE_DECIMAL:
-		case MYSQL_TYPE_FLOAT:
-		case MYSQL_TYPE_DOUBLE: {
-			ruby_type_name = &quot;BigDecimal&quot;;
-			break;
-		}
-		case MYSQL_TYPE_TIMESTAMP:
-		case MYSQL_TYPE_DATETIME: {
-			ruby_type_name = &quot;DateTime&quot;;
-			break;
-		}
-		case MYSQL_TYPE_TIME: {
-			ruby_type_name = &quot;DateTime&quot;;
-			break;
-		}
-		case MYSQL_TYPE_DATE: {
-			ruby_type_name = &quot;Date&quot;;
-			break;
-		}
-		default: {
-			// printf(&quot;Falling to default: %s - %d\n&quot;, field-&gt;name, field-&gt;type);
-			ruby_type_name = &quot;String&quot;;
-		}
-	}
-
-	return ruby_type_name;
+  char* ruby_type_name;
+
+  switch(field-&gt;type) {
+    case MYSQL_TYPE_NULL: {
+      ruby_type_name = NULL;
+      break;
+    }
+    case MYSQL_TYPE_TINY: {
+      ruby_type_name = &quot;TrueClass&quot;;
+      break;
+    }
+    case MYSQL_TYPE_SHORT:
+    case MYSQL_TYPE_LONG:
+    case MYSQL_TYPE_INT24:
+    case MYSQL_TYPE_LONGLONG:
+    case MYSQL_TYPE_YEAR: {
+      ruby_type_name = &quot;Fixnum&quot;;
+      break;
+    }
+    case MYSQL_TYPE_DECIMAL:
+    case MYSQL_TYPE_FLOAT:
+    case MYSQL_TYPE_DOUBLE: {
+      ruby_type_name = &quot;BigDecimal&quot;;
+      break;
+    }
+    case MYSQL_TYPE_TIMESTAMP:
+    case MYSQL_TYPE_DATETIME: {
+      ruby_type_name = &quot;DateTime&quot;;
+      break;
+    }
+    case MYSQL_TYPE_TIME: {
+      ruby_type_name = &quot;DateTime&quot;;
+      break;
+    }
+    case MYSQL_TYPE_DATE: {
+      ruby_type_name = &quot;Date&quot;;
+      break;
+    }
+    default: {
+      // printf(&quot;Falling to default: %s - %d\n&quot;, field-&gt;name, field-&gt;type);
+      ruby_type_name = &quot;String&quot;;
+    }
+  }
+
+  return ruby_type_name;
 }
 
 // Find the greatest common denominator and reduce the provided numerator and denominator.
@@ -119,7 +119,7 @@ static void reduce( do_int64 *numerator, do_int64 *denominator ) {
   a = *numerator;
   b = *denominator;
   while ( a != 0 ) {
-    c = a; a = b % a; b = c;
+  c = a; a = b % a; b = c;
   }
   *numerator = *numerator / b;
   *denominator = *denominator / b;
@@ -129,8 +129,8 @@ static void reduce( do_int64 *numerator, do_int64 *denominator ) {
 static int jd_from_date(int year, int month, int day) {
   int a, b;
   if ( month &lt;= 2 ) {
-    year -= 1;
-    month += 12;
+  year -= 1;
+  month += 12;
   }
   a = year / 100;
   b = 2 - a + (a / 4);
@@ -138,374 +138,375 @@ static int jd_from_date(int year, int month, int day) {
 }
 
 static VALUE seconds_to_offset(long seconds_offset) {
-	do_int64 num = seconds_offset, den = 86400;
-	reduce(&amp;num, &amp;den);
-	return rb_funcall(rb_cRational, rb_intern(&quot;new!&quot;), 2, rb_ll2inum(num), rb_ll2inum(den));
+  do_int64 num = seconds_offset, den = 86400;
+  reduce(&amp;num, &amp;den);
+  return rb_funcall(rb_cRational, rb_intern(&quot;new!&quot;), 2, rb_ll2inum(num), rb_ll2inum(den));
 }
 
 static VALUE parse_date(const char *date) {
-	int year, month, day;
-	int jd, ajd;
-	VALUE rational;
+  int year, month, day;
+  int jd, ajd;
+  VALUE rational;
 
-	sscanf(date, &quot;%4d-%2d-%2d&quot;, &amp;year, &amp;month, &amp;day);
+  sscanf(date, &quot;%4d-%2d-%2d&quot;, &amp;year, &amp;month, &amp;day);
 
-	jd = jd_from_date(year, month, day);
+  jd = jd_from_date(year, month, day);
 
-	// Math from Date.jd_to_ajd
-	ajd = jd * 2 - 1;
-	rational = rb_funcall(rb_cRational, ID_NEW_RATIONAL, 2, INT2NUM(ajd), INT2NUM(2));
-	return rb_funcall(rb_cDate, ID_NEW_DATE, 3, rational, INT2NUM(0), INT2NUM(2299161));
+  // Math from Date.jd_to_ajd
+  ajd = jd * 2 - 1;
+  rational = rb_funcall(rb_cRational, ID_NEW_RATIONAL, 2, INT2NUM(ajd), INT2NUM(2));
+  return rb_funcall(rb_cDate, ID_NEW_DATE, 3, rational, INT2NUM(0), INT2NUM(2299161));
 }
 
 static VALUE parse_time(const char *date) {
 
-	int year, month, day, hour, min, sec, usec;
-	char subsec[7];
+  int year, month, day, hour, min, sec, usec;
+  char subsec[7];
 
-	if (0 != strchr(date, '.')) {
-		// right padding usec with 0. e.g. '012' will become 12000 microsecond, since Time#local use microsecond
-	  sscanf(date, &quot;%4d-%2d-%2d %2d:%2d:%2d.%s&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec, subsec);
-		sscanf(subsec, &quot;%d&quot;, &amp;usec);
-	} else {
-		sscanf(date, &quot;%4d-%2d-%2d %2d:%2d:%2d&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec);
-		usec = 0;
-	}
+  if (0 != strchr(date, '.')) {
+    // right padding usec with 0. e.g. '012' will become 12000 microsecond, since Time#local use microsecond
+    sscanf(date, &quot;%4d-%2d-%2d %2d:%2d:%2d.%s&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec, subsec);
+    sscanf(subsec, &quot;%d&quot;, &amp;usec);
+  } else {
+    sscanf(date, &quot;%4d-%2d-%2d %2d:%2d:%2d&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec);
+    usec = 0;
+  }
 
-	return rb_funcall(rb_cTime, rb_intern(&quot;local&quot;), 7, INT2NUM(year), INT2NUM(month), INT2NUM(day), INT2NUM(hour), INT2NUM(min), INT2NUM(sec), INT2NUM(usec));
+  return rb_funcall(rb_cTime, rb_intern(&quot;local&quot;), 7, INT2NUM(year), INT2NUM(month), INT2NUM(day), INT2NUM(hour), INT2NUM(min), INT2NUM(sec), INT2NUM(usec));
 }
 
 static VALUE parse_date_time(const char *date_time) {
-	VALUE ajd, offset;
+  VALUE ajd, offset;
 
-	int year, month, day, hour, min, sec;
-	int jd;
-	do_int64 num, den;
+  int year, month, day, hour, min, sec;
+  int jd;
+  do_int64 num, den;
 
-	time_t rawtime;
-	struct tm * timeinfo;
+  time_t rawtime;
+  struct tm * timeinfo;
 
-	// Mysql date format: 2008-05-03 14:43:00
-	sscanf(date_time, &quot;%4d-%2d-%2d %2d:%2d:%2d&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec);
+  // Mysql date format: 2008-05-03 14:43:00
+  sscanf(date_time, &quot;%4d-%2d-%2d %2d:%2d:%2d&quot;, &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min, &amp;sec);
 
-	jd = jd_from_date(year, month, day);
+  jd = jd_from_date(year, month, day);
 
-	// Generate ajd with fractional days for the time
-	// Extracted from Date#jd_to_ajd, Date#day_fraction_to_time, and Rational#+ and #-
-	num = ((hour) * 1440) + ((min) * 24); // (Hour * Minutes in a day) + (minutes * 24)
+  // Generate ajd with fractional days for the time
+  // Extracted from Date#jd_to_ajd, Date#day_fraction_to_time, and Rational#+ and #-
+  num = ((hour) * 1440) + ((min) * 24); // (Hour * Minutes in a day) + (minutes * 24)
 
-	// Get localtime
-	time(&amp;rawtime);
-	timeinfo = localtime(&amp;rawtime);
+  // Get localtime
+  time(&amp;rawtime);
+  timeinfo = localtime(&amp;rawtime);
 
-	// TODO: Refactor the following few lines to do the calculation with the *seconds*
-	// value instead of having to do the hour/minute math
-	int hour_offset = abs(timeinfo-&gt;tm_gmtoff) / 3600;
-	int minute_offset = abs(timeinfo-&gt;tm_gmtoff) % 3600 / 60;
+  // TODO: Refactor the following few lines to do the calculation with the *seconds*
+  // value instead of having to do the hour/minute math
+  int hour_offset = abs(timeinfo-&gt;tm_gmtoff) / 3600;
+  int minute_offset = abs(timeinfo-&gt;tm_gmtoff) % 3600 / 60;
 
-	// Modify the numerator so when we apply the timezone everything works out
-	if (timeinfo-&gt;tm_gmtoff &lt; 0) {
-		// If the Timezone is behind UTC, we need to add the time offset
-		num += (hour_offset * 1440) + (minute_offset * 24);
-	} else {
-		// If the Timezone is ahead of UTC, we need to subtract the time offset
-		num -= (hour_offset * 1440) + (minute_offset * 24);
-	}
+  // Modify the numerator so when we apply the timezone everything works out
+  if (timeinfo-&gt;tm_gmtoff &lt; 0) {
+    // If the Timezone is behind UTC, we need to add the time offset
+    num += (hour_offset * 1440) + (minute_offset * 24);
+  } else {
+    // If the Timezone is ahead of UTC, we need to subtract the time offset
+    num -= (hour_offset * 1440) + (minute_offset * 24);
+  }
 
-	den = (24 * 1440);
-	reduce(&amp;num, &amp;den);
+  den = (24 * 1440);
+  reduce(&amp;num, &amp;den);
 
-	num = (num * 86400) + (sec * den);
-	den = den * 86400;
-	reduce(&amp;num, &amp;den);
+  num = (num * 86400) + (sec * den);
+  den = den * 86400;
+  reduce(&amp;num, &amp;den);
 
-	num = (jd * den) + num;
+  num = (jd * den) + num;
 
-	num = num * 2 - den;
-	den = den * 2;
-	reduce(&amp;num, &amp;den);
+  num = num * 2 - den;
+  den = den * 2;
+  reduce(&amp;num, &amp;den);
 
-	ajd = rb_funcall(rb_cRational, rb_intern(&quot;new!&quot;), 2, rb_ull2inum(num), rb_ull2inum(den));
+  ajd = rb_funcall(rb_cRational, rb_intern(&quot;new!&quot;), 2, rb_ull2inum(num), rb_ull2inum(den));
 
-	// Calculate the offset using the seconds from GMT
-	offset = seconds_to_offset(timeinfo-&gt;tm_gmtoff);
+  // Calculate the offset using the seconds from GMT
+  offset = seconds_to_offset(timeinfo-&gt;tm_gmtoff);
 
-	return rb_funcall(rb_cDateTime, ID_NEW_DATE, 3, ajd, offset, INT2NUM(2299161));
+  return rb_funcall(rb_cDateTime, ID_NEW_DATE, 3, ajd, offset, INT2NUM(2299161));
 }
 
 // Convert C-string to a Ruby instance of Ruby type &quot;type&quot;
 static VALUE typecast(const char* value, char* type) {
-	if (NULL == value)
-		return Qnil;
-
-	if ( strcmp(type, &quot;Class&quot;) == 0) {
-	  return rb_funcall(mDO, rb_intern(&quot;find_const&quot;), 1, TAINTED_STRING(value));
-	} else if ( strcmp(type, &quot;Integer&quot;) == 0 || strcmp(type, &quot;Fixnum&quot;) == 0 || strcmp(type, &quot;Bignum&quot;) == 0 ) {
-		return rb_cstr2inum(value, 10);
-	} else if (0 == strcmp(&quot;String&quot;, type)) {
-		return TAINTED_STRING(value);
-	} else if (0 == strcmp(&quot;Float&quot;, type) ) {
-		return rb_float_new(rb_cstr_to_dbl(value, Qfalse));
-	} else if (0 == strcmp(&quot;BigDecimal&quot;, type) ) {
-		return rb_funcall(rb_cBigDecimal, ID_NEW, 1, TAINTED_STRING(value));
-	} else if (0 == strcmp(&quot;TrueClass&quot;, type) || 0 == strcmp(&quot;FalseClass&quot;, type)) {
-		return (0 == value || 0 == strcmp(&quot;0&quot;, value)) ? Qfalse : Qtrue;
-	} else if (0 == strcmp(&quot;Date&quot;, type)) {
-		return parse_date(value);
-	} else if (0 == strcmp(&quot;DateTime&quot;, type)) {
-		return parse_date_time(value);
-	} else if (0 == strcmp(&quot;Time&quot;, type)) {
-		return parse_time(value);
-	} else {
-		return TAINTED_STRING(value);
-	}
+  if (NULL == value)
+    return Qnil;
+
+  if ( strcmp(type, &quot;Class&quot;) == 0) {
+    return rb_funcall(mDO, rb_intern(&quot;find_const&quot;), 1, TAINTED_STRING(value));
+  } else if ( strcmp(type, &quot;Integer&quot;) == 0 || strcmp(type, &quot;Fixnum&quot;) == 0 || strcmp(type, &quot;Bignum&quot;) == 0 ) {
+    return rb_cstr2inum(value, 10);
+  } else if (0 == strcmp(&quot;String&quot;, type)) {
+    return TAINTED_STRING(value);
+  } else if (0 == strcmp(&quot;Float&quot;, type) ) {
+    return rb_float_new(rb_cstr_to_dbl(value, Qfalse));
+  } else if (0 == strcmp(&quot;BigDecimal&quot;, type) ) {
+    return rb_funcall(rb_cBigDecimal, ID_NEW, 1, TAINTED_STRING(value));
+  } else if (0 == strcmp(&quot;TrueClass&quot;, type) || 0 == strcmp(&quot;FalseClass&quot;, type)) {
+    return (0 == value || 0 == strcmp(&quot;0&quot;, value)) ? Qfalse : Qtrue;
+  } else if (0 == strcmp(&quot;Date&quot;, type)) {
+    return parse_date(value);
+  } else if (0 == strcmp(&quot;DateTime&quot;, type)) {
+    return parse_date_time(value);
+  } else if (0 == strcmp(&quot;Time&quot;, type)) {
+    return parse_time(value);
+  } else {
+    return TAINTED_STRING(value);
+  }
 }
 
 static void data_objects_debug(VALUE string) {
-	VALUE logger = rb_funcall(mDOMysql, ID_LOGGER, 0);
-	int log_level = NUM2INT(rb_funcall(logger, ID_LEVEL, 0));
+  VALUE logger = rb_funcall(mDOMysql, ID_LOGGER, 0);
+  int log_level = NUM2INT(rb_funcall(logger, ID_LEVEL, 0));
 
-	if (0 == log_level) {
-		rb_funcall(logger, ID_DEBUG, 1, string);
-	}
+  if (0 == log_level) {
+    rb_funcall(logger, ID_DEBUG, 1, string);
+  }
 }
 
 static void flush_pool(VALUE connection) {
-    if ( Qnil != connection ) {
-        VALUE pool = rb_iv_get(connection, &quot;@__pool&quot;);
-        rb_funcall(pool, rb_intern(&quot;dispose&quot;), 0);
-    }
+  if ( Qnil != connection ) {
+    VALUE pool = rb_iv_get(connection, &quot;@__pool&quot;);
+    rb_funcall(pool, rb_intern(&quot;dispose&quot;), 0);
+  }
 }
 
 // We can add custom information to error messages using this function
 // if we think it matters
 static void raise_mysql_error(VALUE connection, MYSQL *db, int mysql_error_code) {
-	char *error_message = (char *)mysql_error(db);
-
-	switch(mysql_error_code) {
-		case CR_UNKNOWN_ERROR:
-		case CR_SOCKET_CREATE_ERROR:
-		case CR_CONNECTION_ERROR:
-		case CR_CONN_HOST_ERROR:
-		case CR_IPSOCK_ERROR:
-		case CR_UNKNOWN_HOST:
-		case CR_SERVER_GONE_ERROR:
-		case CR_VERSION_ERROR:
-		case CR_OUT_OF_MEMORY:
-		case CR_WRONG_HOST_INFO:
-		case CR_LOCALHOST_CONNECTION:
-		case CR_TCP_CONNECTION:
-		case CR_SERVER_HANDSHAKE_ERR:
-		case CR_SERVER_LOST:
-		case CR_COMMANDS_OUT_OF_SYNC:
-		case CR_NAMEDPIPE_CONNECTION:
-		case CR_NAMEDPIPEWAIT_ERROR:
-		case CR_NAMEDPIPEOPEN_ERROR:
-		case CR_NAMEDPIPESETSTATE_ERROR:
-		case CR_CANT_READ_CHARSET:
-		case CR_NET_PACKET_TOO_LARGE:
-		case CR_EMBEDDED_CONNECTION:
-		case CR_PROBE_SLAVE_STATUS:
-		case CR_PROBE_SLAVE_HOSTS:
-		case CR_PROBE_SLAVE_CONNECT:
-		case CR_PROBE_MASTER_CONNECT:
-		case CR_SSL_CONNECTION_ERROR:
-		case CR_MALFORMED_PACKET:
-		case CR_WRONG_LICENSE:
-		case CR_NULL_POINTER:
-		case CR_NO_PREPARE_STMT:
-		case CR_PARAMS_NOT_BOUND:
-		case CR_DATA_TRUNCATED:
-		case CR_NO_PARAMETERS_EXISTS:
-		case CR_INVALID_PARAMETER_NO:
-		case CR_INVALID_BUFFER_USE:
-		case CR_UNSUPPORTED_PARAM_TYPE:
-		case CR_SHARED_MEMORY_CONNECTION:
-		case CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR:
-		case CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR:
-		case CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR:
-		case CR_SHARED_MEMORY_CONNECT_MAP_ERROR:
-		case CR_SHARED_MEMORY_FILE_MAP_ERROR:
-		case CR_SHARED_MEMORY_MAP_ERROR:
-		case CR_SHARED_MEMORY_EVENT_ERROR:
-		case CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR:
-		case CR_SHARED_MEMORY_CONNECT_SET_ERROR:
-		case CR_CONN_UNKNOW_PROTOCOL:
-		case CR_INVALID_CONN_HANDLE:
-		case CR_SECURE_AUTH:
-		case CR_FETCH_CANCELED:
-		case CR_NO_DATA:
-		case CR_NO_STMT_METADATA:
+  char *error_message = (char *)mysql_error(db);
+
+  switch(mysql_error_code) {
+    case CR_UNKNOWN_ERROR:
+    case CR_SOCKET_CREATE_ERROR:
+    case CR_CONNECTION_ERROR:
+    case CR_CONN_HOST_ERROR:
+    case CR_IPSOCK_ERROR:
+    case CR_UNKNOWN_HOST:
+    case CR_SERVER_GONE_ERROR:
+    case CR_VERSION_ERROR:
+    case CR_OUT_OF_MEMORY:
+    case CR_WRONG_HOST_INFO:
+    case CR_LOCALHOST_CONNECTION:
+    case CR_TCP_CONNECTION:
+    case CR_SERVER_HANDSHAKE_ERR:
+    case CR_SERVER_LOST:
+    case CR_COMMANDS_OUT_OF_SYNC:
+    case CR_NAMEDPIPE_CONNECTION:
+    case CR_NAMEDPIPEWAIT_ERROR:
+    case CR_NAMEDPIPEOPEN_ERROR:
+    case CR_NAMEDPIPESETSTATE_ERROR:
+    case CR_CANT_READ_CHARSET:
+    case CR_NET_PACKET_TOO_LARGE:
+    case CR_EMBEDDED_CONNECTION:
+    case CR_PROBE_SLAVE_STATUS:
+    case CR_PROBE_SLAVE_HOSTS:
+    case CR_PROBE_SLAVE_CONNECT:
+    case CR_PROBE_MASTER_CONNECT:
+    case CR_SSL_CONNECTION_ERROR:
+    case CR_MALFORMED_PACKET:
+    case CR_WRONG_LICENSE:
+    case CR_NULL_POINTER:
+    case CR_NO_PREPARE_STMT:
+    case CR_PARAMS_NOT_BOUND:
+    case CR_DATA_TRUNCATED:
+    case CR_NO_PARAMETERS_EXISTS:
+    case CR_INVALID_PARAMETER_NO:
+    case CR_INVALID_BUFFER_USE:
+    case CR_UNSUPPORTED_PARAM_TYPE:
+    case CR_SHARED_MEMORY_CONNECTION:
+    case CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR:
+    case CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR:
+    case CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR:
+    case CR_SHARED_MEMORY_CONNECT_MAP_ERROR:
+    case CR_SHARED_MEMORY_FILE_MAP_ERROR:
+    case CR_SHARED_MEMORY_MAP_ERROR:
+    case CR_SHARED_MEMORY_EVENT_ERROR:
+    case CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR:
+    case CR_SHARED_MEMORY_CONNECT_SET_ERROR:
+    case CR_CONN_UNKNOW_PROTOCOL:
+    case CR_INVALID_CONN_HANDLE:
+    case CR_SECURE_AUTH:
+    case CR_FETCH_CANCELED:
+    case CR_NO_DATA:
+    case CR_NO_STMT_METADATA:
 #if MYSQL_VERSION_ID &gt;= 50000
-		case CR_NO_RESULT_SET:
-		case CR_NOT_IMPLEMENTED:
+    case CR_NO_RESULT_SET:
+    case CR_NOT_IMPLEMENTED:
 #endif
-		{
-			break;
-		}
-		default: {
-			// Hmmm
-			break;
-		}
-	}
+    {
+      break;
+    }
+    default: {
+      // Hmmm
+      break;
+    }
+  }
 
-    flush_pool(connection);
-	rb_raise(eMysqlError, error_message);
+  flush_pool(connection);
+  rb_raise(eMysqlError, error_message);
 }
 
 // Pull an option out of a querystring-formmated option list using CGI::parse
 static char * get_uri_option(VALUE querystring, char * key) {
-	VALUE options_hash, option_value;
+  VALUE options_hash, option_value;
 
-	char * value = NULL;
+  char * value = NULL;
 
-	// Ensure that we're dealing with a string
-	querystring = rb_funcall(querystring, ID_TO_S, 0);
+  // Ensure that we're dealing with a string
+  querystring = rb_funcall(querystring, ID_TO_S, 0);
 
-	options_hash = rb_funcall(rb_cCGI, ID_PARSE, 1, querystring);
+  options_hash = rb_funcall(rb_cCGI, ID_PARSE, 1, querystring);
 
-	// TODO: rb_hash_aref always returns an array?
-	option_value = rb_ary_entry(rb_hash_aref(options_hash, RUBY_STRING(key)), 0);
+  // TODO: rb_hash_aref always returns an array?
+  option_value = rb_ary_entry(rb_hash_aref(options_hash, RUBY_STRING(key)), 0);
 
-	if (Qnil != option_value) {
-		value = StringValuePtr(option_value);
-	}
+  if (Qnil != option_value) {
+    value = StringValuePtr(option_value);
+  }
 
-	return value;
+  return value;
 }
 
 static VALUE cConnection_initialize(VALUE self, VALUE uri) {
-	VALUE r_host, r_user, r_password, r_path, r_options, r_port;
-
-	char *host = &quot;localhost&quot;, *user = &quot;root&quot;, *password = NULL, *path;
-	char *database = &quot;&quot;, *socket = NULL;
-	char *charset = NULL;
-
-	int port = 3306;
-	unsigned long client_flags = 0;
-	int charset_error;
-
-	MYSQL *db = 0, *result;
-	db = (MYSQL *)mysql_init(NULL);
-
-	rb_iv_set(self, &quot;@using_socket&quot;, Qfalse);
-
-	r_host = rb_funcall(uri, rb_intern(&quot;host&quot;), 0);
-	if (Qnil != r_host) {
-		host = StringValuePtr(r_host);
-	}
-
-	r_user = rb_funcall(uri, rb_intern(&quot;user&quot;), 0);
-	if (Qnil != r_user) {
-		user = StringValuePtr(r_user);
-	}
-
-	r_password = rb_funcall(uri, rb_intern(&quot;password&quot;), 0);
-	if (Qnil != r_password) {
-		password = StringValuePtr(r_password);
-	}
-
-	r_path = rb_funcall(uri, rb_intern(&quot;path&quot;), 0);
-	path = StringValuePtr(r_path);
-	if (Qnil != r_path) {
-		database = strtok(path, &quot;/&quot;);
-	}
-
-	if (NULL == database || 0 == strlen(database)) {
-		rb_raise(eMysqlError, &quot;Database must be specified&quot;);
-	}
-
-	// Pull the querystring off the URI
-	r_options = rb_funcall(uri, rb_intern(&quot;query&quot;), 0);
-
-	// Check to see if we're on the db machine.  If so, try to use the socket
-	if (0 == strcasecmp(host, &quot;localhost&quot;)) {
-		socket = get_uri_option(r_options, &quot;socket&quot;);
-		if (NULL != socket) {
-			rb_iv_set(self, &quot;@using_socket&quot;, Qtrue);
-		}
-	}
-
-	r_port = rb_funcall(uri, rb_intern(&quot;port&quot;), 0);
-	if (Qnil != r_port) {
-		port = NUM2INT(r_port);
-	}
-
-	charset = get_uri_option(r_options, &quot;charset&quot;);
-
-	// If ssl? {
-	//   mysql_ssl_set(db, key, cert, ca, capath, cipher)
-	// }
-
-	result = (MYSQL *)mysql_real_connect(
-		db,
-		host,
-		user,
-		password,
-		database,
-		port,
-		socket,
-		client_flags
-	);
-
-	if (NULL == result) {
-		raise_mysql_error(Qnil, db, -1);
-	}
-
-	if (NULL == charset) {
-		charset = (char*)calloc(5, sizeof(char));
-		strcpy(charset, &quot;utf8&quot;);
-	}
-
-	// Set the connections character set
-	charset_error = mysql_set_character_set(db, charset);
-	if (0 != charset_error) {
-		raise_mysql_error(Qnil, db, charset_error);
-	}
-
-	rb_iv_set(self, &quot;@uri&quot;, uri);
-	rb_iv_set(self, &quot;@connection&quot;, Data_Wrap_Struct(rb_cObject, 0, 0, db));
-
-	return Qtrue;
+  VALUE r_host, r_user, r_password, r_path, r_options, r_port;
+
+  char *host = &quot;localhost&quot;, *user = &quot;root&quot;, *password = NULL, *path;
+  char *database = &quot;&quot;, *socket = NULL;
+  char *charset = NULL;
+
+  int port = 3306;
+  unsigned long client_flags = 0;
+  int charset_error;
+
+  MYSQL *db = 0, *result;
+  db = (MYSQL *)mysql_init(NULL);
+
+  rb_iv_set(self, &quot;@using_socket&quot;, Qfalse);
+
+  r_host = rb_funcall(uri, rb_intern(&quot;host&quot;), 0);
+  if (Qnil != r_host) {
+    host = StringValuePtr(r_host);
+  }
+
+  r_user = rb_funcall(uri, rb_intern(&quot;user&quot;), 0);
+  if (Qnil != r_user) {
+    user = StringValuePtr(r_user);
+  }
+
+  r_password = rb_funcall(uri, rb_intern(&quot;password&quot;), 0);
+  if (Qnil != r_password) {
+    password = StringValuePtr(r_password);
+  }
+
+
+  r_path = rb_funcall(uri, rb_intern(&quot;path&quot;), 0);
+  path = StringValuePtr(r_path);
+  if (Qnil != r_path) {
+    database = strtok(path, &quot;/&quot;);
+  }
+
+  if (NULL == database || 0 == strlen(database)) {
+    rb_raise(eMysqlError, &quot;Database must be specified&quot;);
+  }
+
+  // Pull the querystring off the URI
+  r_options = rb_funcall(uri, rb_intern(&quot;query&quot;), 0);
+
+  // Check to see if we're on the db machine.  If so, try to use the socket
+  if (0 == strcasecmp(host, &quot;localhost&quot;)) {
+    socket = get_uri_option(r_options, &quot;socket&quot;);
+    if (NULL != socket) {
+      rb_iv_set(self, &quot;@using_socket&quot;, Qtrue);
+    }
+  }
+
+  r_port = rb_funcall(uri, rb_intern(&quot;port&quot;), 0);
+  if (Qnil != r_port) {
+    port = NUM2INT(r_port);
+  }
+
+  charset = get_uri_option(r_options, &quot;charset&quot;);
+
+  // If ssl? {
+  //   mysql_ssl_set(db, key, cert, ca, capath, cipher)
+  // }
+
+  result = (MYSQL *)mysql_real_connect(
+    db,
+    host,
+    user,
+    password,
+    database,
+    port,
+    socket,
+    client_flags
+  );
+
+  if (NULL == result) {
+    raise_mysql_error(Qnil, db, -1);
+  }
+
+  if (NULL == charset) {
+    charset = (char*)calloc(5, sizeof(char));
+    strcpy(charset, &quot;utf8&quot;);
+  }
+
+  // Set the connections character set
+  charset_error = mysql_set_character_set(db, charset);
+  if (0 != charset_error) {
+    raise_mysql_error(Qnil, db, charset_error);
+  }
+
+  rb_iv_set(self, &quot;@uri&quot;, uri);
+  rb_iv_set(self, &quot;@connection&quot;, Data_Wrap_Struct(rb_cObject, 0, 0, db));
+
+  return Qtrue;
 }
 
 static VALUE cConnection_character_set(VALUE self) {
-	VALUE connection_container = rb_iv_get(self, &quot;@connection&quot;);
-	MYSQL *db;
+  VALUE connection_container = rb_iv_get(self, &quot;@connection&quot;);
+  MYSQL *db;
 
-	const char *charset;
+  const char *charset;
 
-	if (Qnil == connection_container)
-		return Qfalse;
+  if (Qnil == connection_container)
+    return Qfalse;
 
-	db = DATA_PTR(connection_container);
+  db = DATA_PTR(connection_container);
 
-	charset = mysql_character_set_name(db);
+  charset = mysql_character_set_name(db);
 
-	return RUBY_STRING(charset);
+  return RUBY_STRING(charset);
 }
 
 static VALUE cConnection_is_using_socket(VALUE self) {
-	return rb_iv_get(self, &quot;@using_socket&quot;);
+  return rb_iv_get(self, &quot;@using_socket&quot;);
 }
 
 static VALUE cConnection_dispose(VALUE self) {
-	VALUE connection_container = rb_iv_get(self, &quot;@connection&quot;);
+  VALUE connection_container = rb_iv_get(self, &quot;@connection&quot;);
 
-	MYSQL *db;
+  MYSQL *db;
 
-	if (Qnil == connection_container)
-		return Qfalse;
+  if (Qnil == connection_container)
+    return Qfalse;
 
-	db = DATA_PTR(connection_container);
+  db = DATA_PTR(connection_container);
 
-	if (NULL == db)
-		return Qfalse;
+  if (NULL == db)
+    return Qfalse;
 
-	mysql_close(db);
-	rb_iv_set(self, &quot;@connection&quot;, Qnil);
+  mysql_close(db);
+  rb_iv_set(self, &quot;@connection&quot;, Qnil);
 
-	return Qtrue;
+  return Qtrue;
 }
 
 /*
@@ -513,305 +514,305 @@ Accepts an array of Ruby types (Fixnum, Float, String, etc...) and turns them
 into Ruby-strings so we can easily typecast later
 */
 static VALUE cCommand_set_types(VALUE self, VALUE array) {
-	VALUE type_strings = rb_ary_new();
-	int i;
+  VALUE type_strings = rb_ary_new();
+  int i;
 
-	for (i = 0; i &lt; RARRAY(array)-&gt;len; i++) {
-		rb_ary_push(type_strings, RUBY_STRING(rb_class2name(rb_ary_entry(array, i))));
-	}
+  for (i = 0; i &lt; RARRAY(array)-&gt;len; i++) {
+    rb_ary_push(type_strings, RUBY_STRING(rb_class2name(rb_ary_entry(array, i))));
+  }
 
-	rb_iv_set(self, &quot;@field_types&quot;, type_strings);
+  rb_iv_set(self, &quot;@field_types&quot;, type_strings);
 
-	return array;
+  return array;
 }
 
 VALUE cCommand_quote_time(VALUE self, VALUE value) {
-	return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d %H:%M:%S'&quot;));
+  return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d %H:%M:%S'&quot;));
 }
 
 
 VALUE cCommand_quote_date_time(VALUE self, VALUE value) {
-	// TODO: Support non-local dates. we need to call #new_offset on the date to be
-	// quoted and pass in the current locale's date offset (self.new_offset((hours * 3600).to_r / 86400)
-	return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d %H:%M:%S'&quot;));
+  // TODO: Support non-local dates. we need to call #new_offset on the date to be
+  // quoted and pass in the current locale's date offset (self.new_offset((hours * 3600).to_r / 86400)
+  return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d %H:%M:%S'&quot;));
 }
 
 VALUE cCommand_quote_date(VALUE self, VALUE value) {
-	return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d'&quot;));
+  return rb_funcall(value, ID_STRFTIME, 1, RUBY_STRING(&quot;'%Y-%m-%d'&quot;));
 }
 
 static VALUE cCommand_quote_string(VALUE self, VALUE string) {
-	MYSQL *db = DATA_PTR(rb_iv_get(rb_iv_get(self, &quot;@connection&quot;), &quot;@connection&quot;));
-	const char *source = StringValuePtr(string);
-	char *escaped;
-	VALUE result;
-
-	int quoted_length = 0;
-
-	// Allocate space for the escaped version of 'string'.  Use + 3 allocate space for null term.
-	// and the leading and trailing single-quotes.
-	// Thanks to http://www.browardphp.com/mysql_manual_en/manual_MySQL_APIs.html#mysql_real_escape_string
-	escaped = (char *)calloc(strlen(source) * 3 + 3, sizeof(char));
-
-	// Escape 'source' using the current charset in use on the conection 'db'
-	quoted_length = mysql_real_escape_string(db, escaped + 1, source, strlen(source));
-
-	// Wrap the escaped string in single-quotes, this is DO's convention
-	escaped[0] = escaped[quoted_length + 1] = '\'';
-	result = rb_str_new(escaped, quoted_length + 2);
-	free(escaped);
-	return result;
+  MYSQL *db = DATA_PTR(rb_iv_get(rb_iv_get(self, &quot;@connection&quot;), &quot;@connection&quot;));
+  const char *source = StringValuePtr(string);
+  char *escaped;
+  VALUE result;
+
+  int quoted_length = 0;
+
+  // Allocate space for the escaped version of 'string'.  Use + 3 allocate space for null term.
+  // and the leading and trailing single-quotes.
+  // Thanks to http://www.browardphp.com/mysql_manual_en/manual_MySQL_APIs.html#mysql_real_escape_string
+  escaped = (char *)calloc(strlen(source) * 3 + 3, sizeof(char));
+
+  // Escape 'source' using the current charset in use on the conection 'db'
+  quoted_length = mysql_real_escape_string(db, escaped + 1, source, strlen(source));
+
+  // Wrap the escaped string in single-quotes, this is DO's convention
+  escaped[0] = escaped[quoted_length + 1] = '\'';
+  result = rb_str_new(escaped, quoted_length + 2);
+  free(escaped);
+  return result;
 }
 
 static VALUE build_query_from_args(VALUE klass, int count, VALUE *args) {
-	VALUE query = rb_iv_get(klass, &quot;@text&quot;);
-	if ( count &gt; 0 ) {
-		int i;
-		VALUE array = rb_ary_new();
-		for ( i = 0; i &lt; count; i++) {
-			rb_ary_push(array, (VALUE)args[i]);
-		}
-		query = rb_funcall(klass, ID_ESCAPE_SQL, 1, array);
-	}
-	return query;
+  VALUE query = rb_iv_get(klass, &quot;@text&quot;);
+  if ( count &gt; 0 ) {
+    int i;
+    VALUE array = rb_ary_new();
+    for ( i = 0; i &lt; count; i++) {
+      rb_ary_push(array, (VALUE)args[i]);
+    }
+    query = rb_funcall(klass, ID_ESCAPE_SQL, 1, array);
+  }
+  return query;
 }
 
 static VALUE cCommand_execute_non_query(int argc, VALUE *argv, VALUE self) {
-	VALUE query;
+  VALUE query;
 
-	MYSQL_RES *response = 0;
-	int query_result = 0;
+  MYSQL_RES *response = 0;
+  int query_result = 0;
 
-	my_ulonglong affected_rows;
-    VALUE connection = rb_iv_get(self, &quot;@connection&quot;);
-	MYSQL *db = DATA_PTR(rb_iv_get(connection, &quot;@connection&quot;));
-	query = build_query_from_args(self, argc, argv);
+  my_ulonglong affected_rows;
+  VALUE connection = rb_iv_get(self, &quot;@connection&quot;);
+  MYSQL *db = DATA_PTR(rb_iv_get(connection, &quot;@connection&quot;));
+  query = build_query_from_args(self, argc, argv);
 
-	data_objects_debug(query);
+  data_objects_debug(query);
 
-	query_result = mysql_query(db, StringValuePtr(query));
-	CHECK_AND_RAISE(query_result);
+  query_result = mysql_query(db, StringValuePtr(query));
+  CHECK_AND_RAISE(query_result);
 
-	response = (MYSQL_RES *)mysql_store_result(db);
-	affected_rows = mysql_affected_rows(db);
-	mysql_free_result(response);
+  response = (MYSQL_RES *)mysql_store_result(db);
+  affected_rows = mysql_affected_rows(db);
+  mysql_free_result(response);
 
-	if (-1 == affected_rows)
-		return Qnil;
+  if (-1 == affected_rows)
+    return Qnil;
 
-	return rb_funcall(cResult, ID_NEW, 3, self, INT2NUM(affected_rows), INT2NUM(mysql_insert_id(db)));
+  return rb_funcall(cResult, ID_NEW, 3, self, INT2NUM(affected_rows), INT2NUM(mysql_insert_id(db)));
 }
 
 static VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
-	VALUE query, reader;
-	VALUE field_names, field_types;
+  VALUE query, reader;
+  VALUE field_names, field_types;
 
-	int query_result = 0;
-	int field_count;
-	int i;
+  int query_result = 0;
+  int field_count;
+  int i;
 
-	char guess_default_field_types = 0;
-    VALUE connection = rb_iv_get(self, &quot;@connection&quot;);
-	MYSQL *db = DATA_PTR(rb_iv_get(connection, &quot;@connection&quot;));
+  char guess_default_field_types = 0;
+  VALUE connection = rb_iv_get(self, &quot;@connection&quot;);
+  MYSQL *db = DATA_PTR(rb_iv_get(connection, &quot;@connection&quot;));
 
-	MYSQL_RES *response = 0;
-	MYSQL_FIELD *field;
+  MYSQL_RES *response = 0;
+  MYSQL_FIELD *field;
 
-	query = build_query_from_args(self, argc, argv);
-	data_objects_debug(query);
+  query = build_query_from_args(self, argc, argv);
+  data_objects_debug(query);
 
-	query_result = mysql_query(db, StringValuePtr(query));
-	CHECK_AND_RAISE(query_result);
+  query_result = mysql_query(db, StringValuePtr(query));
+  CHECK_AND_RAISE(query_result);
 
-	response = (MYSQL_RES *)mysql_use_result(db);
+  response = (MYSQL_RES *)mysql_use_result(db);
 
-	if (!response) {
-		return Qnil;
-	}
+  if (!response) {
+    return Qnil;
+  }
 
-	field_count = (int)mysql_field_count(db);
+  field_count = (int)mysql_field_count(db);
 
-	reader = rb_funcall(cReader, ID_NEW, 0);
-	rb_iv_set(reader, &quot;@reader&quot;, Data_Wrap_Struct(rb_cObject, 0, 0, response));
-	rb_iv_set(reader, &quot;@opened&quot;, Qtrue);
-	rb_iv_set(reader, &quot;@field_count&quot;, INT2NUM(field_count));
+  reader = rb_funcall(cReader, ID_NEW, 0);
+  rb_iv_set(reader, &quot;@reader&quot;, Data_Wrap_Struct(rb_cObject, 0, 0, response));
+  rb_iv_set(reader, &quot;@opened&quot;, Qtrue);
+  rb_iv_set(reader, &quot;@field_count&quot;, INT2NUM(field_count));
 
-	field_names = rb_ary_new();
-	field_types = rb_iv_get(self, &quot;@field_types&quot;);
+  field_names = rb_ary_new();
+  field_types = rb_iv_get(self, &quot;@field_types&quot;);
 
-	if ( field_types == Qnil || 0 == RARRAY(field_types)-&gt;len ) {
-		field_types = rb_ary_new();
-		guess_default_field_types = 1;
-	} else if (RARRAY(field_types)-&gt;len != field_count) {
-		// Whoops...  wrong number of types passed to set_types.  Close the reader and raise
-		// and error
-		rb_funcall(reader, rb_intern(&quot;close&quot;), 0);
-        flush_pool(connection);
-		rb_raise(eMysqlError, &quot;Field-count mismatch. Expected %d fields, but the query yielded %d&quot;, RARRAY(field_types)-&gt;len, field_count);
-	}
+  if ( field_types == Qnil || 0 == RARRAY(field_types)-&gt;len ) {
+    field_types = rb_ary_new();
+    guess_default_field_types = 1;
+  } else if (RARRAY(field_types)-&gt;len != field_count) {
+    // Whoops...  wrong number of types passed to set_types.  Close the reader and raise
+    // and error
+    rb_funcall(reader, rb_intern(&quot;close&quot;), 0);
+    flush_pool(connection);
+    rb_raise(eMysqlError, &quot;Field-count mismatch. Expected %d fields, but the query yielded %d&quot;, RARRAY(field_types)-&gt;len, field_count);
+  }
 
-	for(i = 0; i &lt; field_count; i++) {
-		field = mysql_fetch_field_direct(response, i);
-		rb_ary_push(field_names, RUBY_STRING(field-&gt;name));
+  for(i = 0; i &lt; field_count; i++) {
+    field = mysql_fetch_field_direct(response, i);
+    rb_ary_push(field_names, RUBY_STRING(field-&gt;name));
 
-		if (1 == guess_default_field_types) {
-			VALUE field_ruby_type_name = RUBY_STRING(ruby_type_from_mysql_type(field));
-			rb_ary_push(field_types, field_ruby_type_name);
-		}
-	}
+    if (1 == guess_default_field_types) {
+      VALUE field_ruby_type_name = RUBY_STRING(ruby_type_from_mysql_type(field));
+      rb_ary_push(field_types, field_ruby_type_name);
+    }
+  }
 
-	rb_iv_set(reader, &quot;@fields&quot;, field_names);
-	rb_iv_set(reader, &quot;@field_types&quot;, field_types);
+  rb_iv_set(reader, &quot;@fields&quot;, field_names);
+  rb_iv_set(reader, &quot;@field_types&quot;, field_types);
 
-	if (rb_block_given_p()) {
-		rb_yield(reader);
-		rb_funcall(reader, rb_intern(&quot;close&quot;), 0);
-	}
+  if (rb_block_given_p()) {
+    rb_yield(reader);
+    rb_funcall(reader, rb_intern(&quot;close&quot;), 0);
+  }
 
-	return reader;
+  return reader;
 }
 
 // This should be called to ensure that the internal result reader is freed
 static VALUE cReader_close(VALUE self) {
-	// Get the reader from the instance variable, maybe refactor this?
-	VALUE reader_container = rb_iv_get(self, &quot;@reader&quot;);
+  // Get the reader from the instance variable, maybe refactor this?
+  VALUE reader_container = rb_iv_get(self, &quot;@reader&quot;);
 
-	MYSQL_RES *reader;
+  MYSQL_RES *reader;
 
-	if (Qnil == reader_container)
-		return Qfalse;
+  if (Qnil == reader_container)
+    return Qfalse;
 
-	reader = DATA_PTR(reader_container);
+  reader = DATA_PTR(reader_container);
 
-	// The Meat
-	if (NULL == reader)
-		return Qfalse;
+  // The Meat
+  if (NULL == reader)
+    return Qfalse;
 
-	mysql_free_result(reader);
-	rb_iv_set(self, &quot;@reader&quot;, Qnil);
+  mysql_free_result(reader);
+  rb_iv_set(self, &quot;@reader&quot;, Qnil);
 
-	return Qtrue;
+  return Qtrue;
 }
 
 // Retrieve a single row
 static VALUE cReader_next(VALUE self) {
-	// Get the reader from the instance variable, maybe refactor this?
-	VALUE reader_container = rb_iv_get(self, &quot;@reader&quot;);
-	VALUE ruby_field_type_strings, row;
+  // Get the reader from the instance variable, maybe refactor this?
+  VALUE reader_container = rb_iv_get(self, &quot;@reader&quot;);
+  VALUE ruby_field_type_strings, row;
 
-	MYSQL_RES *reader;
-	MYSQL_ROW result;
+  MYSQL_RES *reader;
+  MYSQL_ROW result;
 
-	int i;
-	char *field_type;
+  int i;
+  char *field_type;
 
-	if (Qnil == reader_container)
-		return Qfalse;
+  if (Qnil == reader_container)
+    return Qfalse;
 
-	reader = DATA_PTR(reader_container);
+  reader = DATA_PTR(reader_container);
 
-	// The Meat
-	ruby_field_type_strings = rb_iv_get(self, &quot;@field_types&quot;);
-	row = rb_ary_new();
-	result = (MYSQL_ROW)mysql_fetch_row(reader);
+  // The Meat
+  ruby_field_type_strings = rb_iv_get(self, &quot;@field_types&quot;);
+  row = rb_ary_new();
+  result = (MYSQL_ROW)mysql_fetch_row(reader);
 
-	rb_iv_set(self, &quot;@state&quot;, result ? Qtrue : Qfalse);
+  rb_iv_set(self, &quot;@state&quot;, result ? Qtrue : Qfalse);
 
-	if (!result)
-		return Qnil;
+  if (!result)
+    return Qnil;
 
-	for (i = 0; i &lt; reader-&gt;field_count; i++) {
-		// The field_type data could be cached in a c-array
-		field_type = RSTRING(rb_ary_entry(ruby_field_type_strings, i))-&gt;ptr;
-		rb_ary_push(row, typecast(result[i], field_type));
-	}
+  for (i = 0; i &lt; reader-&gt;field_count; i++) {
+    // The field_type data could be cached in a c-array
+    field_type = RSTRING(rb_ary_entry(ruby_field_type_strings, i))-&gt;ptr;
+    rb_ary_push(row, typecast(result[i], field_type));
+  }
 
-	rb_iv_set(self, &quot;@values&quot;, row);
+  rb_iv_set(self, &quot;@values&quot;, row);
 
-	return Qtrue;
+  return Qtrue;
 }
 
 static VALUE cReader_values(VALUE self) {
-	VALUE state = rb_iv_get(self, &quot;@state&quot;);
-	if ( state == Qnil || state == Qfalse ) {
-		rb_raise(eMysqlError, &quot;Reader is not initialized&quot;);
-	}
-	else {
-		return rb_iv_get(self, &quot;@values&quot;);
-	}
+  VALUE state = rb_iv_get(self, &quot;@state&quot;);
+  if ( state == Qnil || state == Qfalse ) {
+    rb_raise(eMysqlError, &quot;Reader is not initialized&quot;);
+  }
+  else {
+    return rb_iv_get(self, &quot;@values&quot;);
+  }
 }
 
 static VALUE cReader_fields(VALUE self) {
-	return rb_iv_get(self, &quot;@fields&quot;);
+  return rb_iv_get(self, &quot;@fields&quot;);
 }
 
 void Init_do_mysql_ext() {
-	rb_require(&quot;rubygems&quot;);
-	rb_require(&quot;bigdecimal&quot;);
+  rb_require(&quot;rubygems&quot;);
+  rb_require(&quot;bigdecimal&quot;);
   rb_require(&quot;date&quot;);
   rb_require(&quot;cgi&quot;);
 
   rb_funcall(rb_mKernel, rb_intern(&quot;require&quot;), 1, RUBY_STRING(&quot;data_objects&quot;));
 
-	ID_TO_I = rb_intern(&quot;to_i&quot;);
-	ID_TO_F = rb_intern(&quot;to_f&quot;);
-	ID_TO_S = rb_intern(&quot;to_s&quot;);
-	ID_PARSE = rb_intern(&quot;parse&quot;);
-	ID_TO_TIME = rb_intern(&quot;to_time&quot;);
-	ID_NEW = rb_intern(&quot;new&quot;);
-	ID_NEW_RATIONAL = rb_intern(&quot;new!&quot;);
-	ID_NEW_DATE = RUBY_VERSION_CODE &lt; 186 ? rb_intern(&quot;new0&quot;) : rb_intern(&quot;new!&quot;);
-	ID_CONST_GET = rb_intern(&quot;const_get&quot;);
-	ID_UTC = rb_intern(&quot;utc&quot;);
-	ID_ESCAPE_SQL = rb_intern(&quot;escape_sql&quot;);
-	ID_STRFTIME = rb_intern(&quot;strftime&quot;);
-	ID_LOGGER = rb_intern(&quot;logger&quot;);
-	ID_DEBUG = rb_intern(&quot;debug&quot;);
-	ID_LEVEL = rb_intern(&quot;level&quot;);
-
-	// Store references to a few helpful clases that aren't in Ruby Core
-	rb_cDate = RUBY_CLASS(&quot;Date&quot;);
-	rb_cDateTime = RUBY_CLASS(&quot;DateTime&quot;);
-	rb_cRational = RUBY_CLASS(&quot;Rational&quot;);
-	rb_cBigDecimal = RUBY_CLASS(&quot;BigDecimal&quot;);
-	rb_cCGI = RUBY_CLASS(&quot;CGI&quot;);
-
-	// Get references to the DataObjects module and its classes
-	mDO = CONST_GET(rb_mKernel, &quot;DataObjects&quot;);
-	cDO_Quoting = CONST_GET(mDO, &quot;Quoting&quot;);
-	cDO_Connection = CONST_GET(mDO, &quot;Connection&quot;);
-	cDO_Command = CONST_GET(mDO, &quot;Command&quot;);
-	cDO_Result = CONST_GET(mDO, &quot;Result&quot;);
-	cDO_Reader = CONST_GET(mDO, &quot;Reader&quot;);
-
-	// Top Level Module that all the classes live under
-	mDOMysql = rb_define_module_under(mDO, &quot;Mysql&quot;);
-
-	eMysqlError = rb_define_class(&quot;MysqlError&quot;, rb_eStandardError);
-
-	cConnection = DRIVER_CLASS(&quot;Connection&quot;, cDO_Connection);
-	rb_define_method(cConnection, &quot;initialize&quot;, cConnection_initialize, 1);
-	rb_define_method(cConnection, &quot;using_socket?&quot;, cConnection_is_using_socket, 0);
-	rb_define_method(cConnection, &quot;character_set&quot;, cConnection_character_set , 0);
-	rb_define_method(cConnection, &quot;dispose&quot;, cConnection_dispose, 0);
-
-	cCommand = DRIVER_CLASS(&quot;Command&quot;, cDO_Command);
-	rb_include_module(cCommand, cDO_Quoting);
-	rb_define_method(cCommand, &quot;set_types&quot;, cCommand_set_types, 1);
-	rb_define_method(cCommand, &quot;execute_non_query&quot;, cCommand_execute_non_query, -1);
-	rb_define_method(cCommand, &quot;execute_reader&quot;, cCommand_execute_reader, -1);
-	rb_define_method(cCommand, &quot;quote_string&quot;, cCommand_quote_string, 1);
-	rb_define_method(cCommand, &quot;quote_date&quot;, cCommand_quote_date, 1);
-	rb_define_method(cCommand, &quot;quote_time&quot;, cCommand_quote_time, 1);
-	rb_define_method(cCommand, &quot;quote_datetime&quot;, cCommand_quote_date_time, 1);
-
-	// Non-Query result
-	cResult = DRIVER_CLASS(&quot;Result&quot;, cDO_Result);
-
-	// Query result
-	cReader = DRIVER_CLASS(&quot;Reader&quot;, cDO_Reader);
-	rb_define_method(cReader, &quot;close&quot;, cReader_close, 0);
-	rb_define_method(cReader, &quot;next!&quot;, cReader_next, 0);
-	rb_define_method(cReader, &quot;values&quot;, cReader_values, 0);
-	rb_define_method(cReader, &quot;fields&quot;, cReader_fields, 0);
+  ID_TO_I = rb_intern(&quot;to_i&quot;);
+  ID_TO_F = rb_intern(&quot;to_f&quot;);
+  ID_TO_S = rb_intern(&quot;to_s&quot;);
+  ID_PARSE = rb_intern(&quot;parse&quot;);
+  ID_TO_TIME = rb_intern(&quot;to_time&quot;);
+  ID_NEW = rb_intern(&quot;new&quot;);
+  ID_NEW_RATIONAL = rb_intern(&quot;new!&quot;);
+  ID_NEW_DATE = RUBY_VERSION_CODE &lt; 186 ? rb_intern(&quot;new0&quot;) : rb_intern(&quot;new!&quot;);
+  ID_CONST_GET = rb_intern(&quot;const_get&quot;);
+  ID_UTC = rb_intern(&quot;utc&quot;);
+  ID_ESCAPE_SQL = rb_intern(&quot;escape_sql&quot;);
+  ID_STRFTIME = rb_intern(&quot;strftime&quot;);
+  ID_LOGGER = rb_intern(&quot;logger&quot;);
+  ID_DEBUG = rb_intern(&quot;debug&quot;);
+  ID_LEVEL = rb_intern(&quot;level&quot;);
+
+  // Store references to a few helpful clases that aren't in Ruby Core
+  rb_cDate = RUBY_CLASS(&quot;Date&quot;);
+  rb_cDateTime = RUBY_CLASS(&quot;DateTime&quot;);
+  rb_cRational = RUBY_CLASS(&quot;Rational&quot;);
+  rb_cBigDecimal = RUBY_CLASS(&quot;BigDecimal&quot;);
+  rb_cCGI = RUBY_CLASS(&quot;CGI&quot;);
+
+  // Get references to the DataObjects module and its classes
+  mDO = CONST_GET(rb_mKernel, &quot;DataObjects&quot;);
+  cDO_Quoting = CONST_GET(mDO, &quot;Quoting&quot;);
+  cDO_Connection = CONST_GET(mDO, &quot;Connection&quot;);
+  cDO_Command = CONST_GET(mDO, &quot;Command&quot;);
+  cDO_Result = CONST_GET(mDO, &quot;Result&quot;);
+  cDO_Reader = CONST_GET(mDO, &quot;Reader&quot;);
+
+  // Top Level Module that all the classes live under
+  mDOMysql = rb_define_module_under(mDO, &quot;Mysql&quot;);
+
+  eMysqlError = rb_define_class(&quot;MysqlError&quot;, rb_eStandardError);
+
+  cConnection = DRIVER_CLASS(&quot;Connection&quot;, cDO_Connection);
+  rb_define_method(cConnection, &quot;initialize&quot;, cConnection_initialize, 1);
+  rb_define_method(cConnection, &quot;using_socket?&quot;, cConnection_is_using_socket, 0);
+  rb_define_method(cConnection, &quot;character_set&quot;, cConnection_character_set , 0);
+  rb_define_method(cConnection, &quot;dispose&quot;, cConnection_dispose, 0);
+
+  cCommand = DRIVER_CLASS(&quot;Command&quot;, cDO_Command);
+  rb_include_module(cCommand, cDO_Quoting);
+  rb_define_method(cCommand, &quot;set_types&quot;, cCommand_set_types, 1);
+  rb_define_method(cCommand, &quot;execute_non_query&quot;, cCommand_execute_non_query, -1);
+  rb_define_method(cCommand, &quot;execute_reader&quot;, cCommand_execute_reader, -1);
+  rb_define_method(cCommand, &quot;quote_string&quot;, cCommand_quote_string, 1);
+  rb_define_method(cCommand, &quot;quote_date&quot;, cCommand_quote_date, 1);
+  rb_define_method(cCommand, &quot;quote_time&quot;, cCommand_quote_time, 1);
+  rb_define_method(cCommand, &quot;quote_datetime&quot;, cCommand_quote_date_time, 1);
+
+  // Non-Query result
+  cResult = DRIVER_CLASS(&quot;Result&quot;, cDO_Result);
+
+  // Query result
+  cReader = DRIVER_CLASS(&quot;Reader&quot;, cDO_Reader);
+  rb_define_method(cReader, &quot;close&quot;, cReader_close, 0);
+  rb_define_method(cReader, &quot;next!&quot;, cReader_next, 0);
+  rb_define_method(cReader, &quot;values&quot;, cReader_values, 0);
+  rb_define_method(cReader, &quot;fields&quot;, cReader_fields, 0);
 }</diff>
      <filename>do_mysql/ext/do_mysql_ext.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3b7727c1169cf032735f8b8206e728d0cc99099a</id>
    </parent>
  </parents>
  <author>
    <name>Bernerd Schaefer</name>
    <email>bj.schaefer@gmail.com</email>
  </author>
  <url>http://github.com/sam/do/commit/3c8216ed3a96f6b8ed4d20de87f8dce998c4912a</url>
  <id>3c8216ed3a96f6b8ed4d20de87f8dce998c4912a</id>
  <committed-date>2008-07-11T10:18:04-07:00</committed-date>
  <authored-date>2008-07-11T10:18:04-07:00</authored-date>
  <message>tabs to spaces, to make do_mysql comparable to dm-core</message>
  <tree>df37d3bd2a5b0a59dc6be6f6936f54e8ce82dddb</tree>
  <committer>
    <name>Bernerd Schaefer</name>
    <email>bj.schaefer@gmail.com</email>
  </committer>
</commit>
