Comments - MariaDB versus MySQL - Compatibility

10 years, 11 months ago Michael Cash

We installed MariaDB 5.5.29 over MySQL 5.5.12 - both 64 bit on Windows.

MariaDB is returning int64 instead of int32 for a literal value, i.e.

Select 103, name, address from employee;

In MySQL the 103 was being returned as an int32 value and in MariaDB it is an int64 value.

Also, we are having some strange character set issues for some fields.

We are using a rather old .net connector 6.1.2.0.

Suggestions? Thank you.

 
10 years, 11 months ago Vladislav Vaintroub

Can you check against more recent version of MySQL?

I have not tried .NET yet, however I do know it uses result set metadata to infer types. So I checked metadata, and for that I ran mysql command line client so it outputs result set metadata with (mysql --column-type-info )

"SELECT <Integer constant>" returns LONGLONG type for both MYSQL and MariaDB, that should translate to int64 if I understand correctly. I cannot comment on character set issues, because the description is not very specific.

mysql -uroot --column-type-info -e "select 1"

Field 1: `1` Catalog: `def` Database: `` Table: `` Org_table: `` Type: LONGLONG Collation: binary (63) Length: 1 Max_length: 1 Decimals: 0 Flags: NOT_NULL BINARY NUM

 
10 years, 11 months ago Vladislav Vaintroub

Addendum:

I tried now also Connector/NET test (latest version of C/NET) .

I ran MySQLCommand.ExecuteScalar() for command "SELECT 1", on both MariaDB and MYSQL, both on version 5.5.31.

In both cases the object returned by ExecuteScalar was System.Int64, which I also would expect. So, I do not see incompatibilities here.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.