View Issue Details

IDProjectCategoryView StatusLast Update
0037169FPCDatabasepublic2020-06-03 23:57
ReporterKinlion Yan Assigned ToMichael Van Canneyt  
Status assignedResolutionopen 
Product Version3.0.4 
Summary0037169: select bit field from mariadb always returns 0
DescriptionWhen open a sql with command "SELECT A_BIT_FIELD FROM some_table",
the result Fields[0].AsInteger is always 0, no matter what the real value in database.

  Server: Ubuntu 18.04
  Database: MariaDB 10.4.13
  Client: Win10 x64

Lazarus 2.0.8 + FPC 3.0.4
Connection: TMySQL56Connection
Steps To Reproduce1. Create a table in a database
    CREATE TABLE test_bit(flag BIT(1));

2. Insert a value for test
    INSERT INTO test_bit(flag) VALUES(1);

3. Open a TSQLQuery to get the bit value
    SELECT * FROM test_bit;

4. The result Fields[0].AsInteger is 0
Additional InformationThe attachment is the libmysql.dll which I used to open database. I got it from HeidiSQL.,49980.msg363806.html#msg363806
Tagsbit field, mysql
Fixed in Revision
Attached Files


Kinlion Yan

2020-06-03 03:19

reporter   ~0123196

Sorry, I can't upload the libmysql.dll for the poor connection speed.

Issue History

Date Modified Username Field Change
2020-06-03 03:17 Kinlion Yan New Issue
2020-06-03 03:19 Kinlion Yan Note Added: 0123196
2020-06-03 03:21 Kinlion Yan Tag Attached: mysql
2020-06-03 03:21 Kinlion Yan Tag Attached: bit field
2020-06-03 23:57 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-06-03 23:57 Michael Van Canneyt Status new => assigned