Commit 059801d8 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #5511 include unsigned float in our type comparitor

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48778 c7de825b-a66e-492c-adef-691d508d4ae1
parent fdb48339
...@@ -2913,22 +2913,22 @@ bool fields_are_same_type( ...@@ -2913,22 +2913,22 @@ bool fields_are_same_type(
#endif #endif
{ {
TOKU_TYPE toku_type = mysql_to_toku_type(a); TOKU_TYPE toku_type = mysql_to_toku_type(a);
if (toku_type == toku_type_int) { if ((toku_type == toku_type_int || toku_type == toku_type_float) &&
if ( ((a->flags & UNSIGNED_FLAG) == 0) != ((b->flags & UNSIGNED_FLAG) == 0) ) { (a->flags & UNSIGNED_FLAG) != (b->flags & UNSIGNED_FLAG)) {
retval = false; retval = false;
goto cleanup; goto cleanup;
} }
if ((a->flags & AUTO_INCREMENT_FLAG) != (b->flags & AUTO_INCREMENT_FLAG)) { if (toku_type == toku_type_int &&
retval = false; (a->flags & AUTO_INCREMENT_FLAG) != (b->flags & AUTO_INCREMENT_FLAG)) {
goto cleanup; retval = false;
} goto cleanup;
} }
if (a->pack_length() != b->pack_length()) { if (a->pack_length() != b->pack_length()) {
retval = false; retval = false;
goto cleanup; goto cleanup;
} }
}
break; break;
}
case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_BLOB: case MYSQL_TYPE_BLOB:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment