PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: Thomas Bock on March 13, 2024, 11:19:19 AM
-
We encounter problems with a newer version of libmariadb.so.3
PxPlus 20.10 is installed on a Linux server.
The program below runs with version 3.1.13 on a Linux server. With version 3.2.7 the result is empty and msg(-1) returns "MYSQL:0:".
begin
dbOpt$ = "SERVER=my_server;USER=my_account;PASSWORD=my_password;DATETIME_CONVERT=N"
dbName$ = "[MYSQL]my_database;;"
channel = hfn
open (channel, OPT = dbOpt$, tim = 10) dbName$
query$ = "SELECT * FROM `myTable` limit 1"
write record (channel)query$
gosub buildPVXIOList
repeat
read record(channel,err=*next)sqlResultItem$
if tcb(2) {
print msg(err)
print msg(-1)
break
}
print ++c,": ",sqlResultItem$
until 0
close( channel)
end
buildPVXIOList:
local sqlIOL$ = ken(channel, ind = 3)
local pvxIOL$ = "IOLIST "
local separator$ = $$
local items = pos(";" = sqlIOL$, 1, 0)
local counter = 0
local virtual = 0
repeat
fieldDefinition$ = arg(sqlIOL$, counter + 1, ";")
read data from fieldDefinition$, sep = "," to fieldName$, fieldType$
fieldName$ = tbl(nul(fieldName$), fieldName$, "_VIRTUAL" + str(++virtual))
pvxIOL$ += separator$ + fieldName$
if (mid(fieldType$, 1, 3) = "CHR") or (fieldType$ = "DATE") {
pvxIOL$ += "$"
}
separator$ = ","
until (++counter > items)
pvxIOL$ = sub(pvxIOL$, "-", "_")
dim sqlResultItem$ : cpl(pvxIOL$)
return
What needs to be done in order to work with then newer version?
-
I'm running CentOS8, my MariaDB library version is:
libmariadb.so.3-3.1.11-2.el8_3.x86_64
Your program codes works without an error in v20.10 (64-bit).
-
That's what I'm saying.
But the issue comes with version 3.2.7.
-
Can you tell me the Linux version that you are using (I assume it's the 64-bit version of both the OS and PxPlus) ?
-
The customer uses openSUSE Leap 15.5
We use a Gentoo and can reproduce the issue
-
Are there any new insights?
-
PvxPlus Technologies is looking into this.
-
A temporary work-around is to downgrade the mariadb3 package to version 3.1.13-3.30.1 - the PxPlus MYSQL interface works correctly with that version.