SOLVED: Missing MYSQL Header in the package

Windows specific questions.
Post Reply
exagonx
Posts: 315
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

SOLVED: Missing MYSQL Header in the package

Post by exagonx »

Hello friends.
In the latest versions of Free BASIC I no longer find the mysql.bi file in the "include" folder, I wanted to know if I have to migrate all my codes to sqlite or is there another reason.

I am currently using the .bi file taken from an old version and it is not showing incompatibility with the new MySQL C libraries, but I would like to know more information about it, so that if I start a new project or if I have to update an old one I know what choices undertake.

Thank you all.
Last edited by exagonx on Mar 27, 2024 23:23, edited 1 time in total.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Missing MYSQL Header in the package

Post by St_W »

The MySQL binding hasn't been updated for a very long time (>10 years) and isn't compatible with 64-bit systems yet.
However, I've added MariaDB bindings a few years ago, which should work in most situations as drop-in replacement for MySQL.

see https://freebasic.net/forum/viewtopic.p ... 80#p293580

The mariadb have been integrated into the official fbc repo meanwhile:
https://github.com/freebasic/fbc/blob/m ... mariadb.bi

In your code #include "mariadb.bi" instead of mysql.
exagonx
Posts: 315
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: Missing MYSQL Header in the package

Post by exagonx »

St_W wrote: Mar 27, 2024 14:58 The MySQL binding hasn't been updated for a very long time (>10 years) and isn't compatible with 64-bit systems yet.
However, I've added MariaDB bindings a few years ago, which should work in most situations as drop-in replacement for MySQL.

see https://freebasic.net/forum/viewtopic.p ... 80#p293580

The mariadb have been integrated into the official fbc repo meanwhile:
https://github.com/freebasic/fbc/blob/m ... mariadb.bi

In your code #include "mariadb.bi" instead of mysql.
Thanks for your reply and clarification, I was currently using "mysql.bi" in the 64 bit version of Linux and Windows and they are working perfectly with the 64 libraries (Connector for C) provided by the Oracle site.

In any case, taking your suggestion into account and to avoid future problems, I will start migrating to the libraries and connector for mariadb
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Missing MYSQL Header in the package

Post by St_W »

exagonx wrote: Mar 27, 2024 23:03Thanks for your reply and clarification, I was currently using "mysql.bi" in the 64 bit version of Linux and Windows and they are working perfectly with the 64 libraries (Connector for C) provided by the Oracle site.
Interesting. The mysql bindings have been created at a time when a 64-bit version of FreeBasic didn't exist yet, it's surprising that they work. They were added to the "doesn't support 64-bit yet" list about 10 years ago by dkl: https://github.com/freebasic/fbc/commit ... 3800d6aa59 , not sure why, though. Maybe they just have never been checked/reviewed for 64-bit compatibility since then (opposed to many other libraries, which have been removed from the list since then).

You can still find the old headers in the repo, btw:
https://github.com/freebasic/fbc/tree/master/inc/mysql
They are just excluded from most binary packages.
Post Reply