Skip to content

Commit

Permalink
added medium int as int32 fixes crystal-lang#33
Browse files Browse the repository at this point in the history
  • Loading branch information
crisward committed Jul 18, 2017
1 parent 900c346 commit f65bb2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/db_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ DB::DriverSpecs(MySql::Any).run do
sample_value false, "bool", "false", type_safe_value: false
sample_value 5_i8, "tinyint(1)", "5", type_safe_value: false
sample_value 54_i16, "smallint(2)", "54", type_safe_value: false
sample_value 123, "mediumint(2)", "123", type_safe_value: false
sample_value 1, "int", "1", type_safe_value: false
sample_value 1_i64, "bigint", "1"
sample_value "hello", "varchar(25)", "'hello'"
Expand Down
2 changes: 1 addition & 1 deletion src/mysql/types.cr
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ abstract struct MySql::Type
end
end
decl_type LongLong, 0x08u8, ::Int64
decl_type Int24, 0x09u8
decl_type Int24, 0x09u8, ::Int32

def self.datetime_read(packet)
pkt = packet.read_byte!
Expand Down

0 comments on commit f65bb2d

Please sign in to comment.