Open hhaensel opened 1 year ago
Hello,
Same here, must fall back on branch 10 of MariaDb.
The C Lib used seems quite old, released in December. 2019.
In fact, after some debugging, the library returns a zero in field_type, causing it to be misinterpreted as Dec64
/src/MySQL.jl
# --> Here, the real type is VARCHAR
function juliatype(field_type, notnullable, isunsigned, isbinary, date_and_time)
@info field_type # --> 0
T = API.juliatype(field_type)
@info T # --> Dec64
T2 = isunsigned && !(T <: AbstractFloat) ? unsigned(T) : T
T3 = !isbinary && T2 == Vector{UInt8} ? String : T2
T4 = date_and_time && T3 <: DateTime ? DateAndTime : T3
return notnullable ? T4 : Union{Missing, T4}
end
Regards, Pascal.
column types are not correctly inferred when updating mariadb to version 11. It's probably worthwhile switching to the latest mariadb c connector with MariaDB Server 10:
with MariaDB Server 11:
If I store strings that can be parsed as numbers in the field 'uname' the columns are indeed read as Dec64.
This behaviour is consistent with the (wrong) column type stored in the query result: