0

My problem:

tdbcmyslq version 1.1.3 works fine only with mariadb-libs and mariadb-clients up to 10.5.11 On higher versions of mariadb-libs allrows and prepare statements make segfault.

My code:

package require tdbc::mysql
namespace import ::tdbc::mysql::*
connection create db -host 127.0.0.1 -port 3306 -passwd mypass -user root -database mydb

#working on all configs
db evaldirect "select product_id from product_to_category where category_id=555"

#seg fault  on mariadb-libs above 10.5.11
db allrows  { select * from category_description }
db prepare  { select * from category_description }

This code segfaults on latest Arch linux distribution,and latest Alpine linux server with mariadb-client and mariadb-libs 10.6.9. And it works fine if i downgrade mariadb-libs to 10.5.11

Pls can u test this, and if its bug, bugreport it, or tell me how to bugreport.

Upd:

I allready found where to bugreport

https://core.tcl-lang.org/tdbcmysql/tktview?name=79e85de788

wee wewewe
  • 27
  • 4

2 Answers2

1

Bug should be fixed in tdbc::mysql 1.1.5.

A workaround is to install the MySQL client libraries alongside the MariaDB ones. On a Debian-based system,

sudo apt install libmysqlclient21

would do it.

This oughtn't to interfere with MariaDB client libraries, and tdbc::mysql runs fine with a MySQL client against a MariaDB server (or I'd have noticed this problem a lot sooner!)

Kevin Kenny
  • 156
  • 5
0

i've post here in stackoverflow a question, later in comp.lang.tcl and finally open a ticket in tdbc::mysql:

Win32 - tdbc 1.1.2 - tcl/tk 8.6.11

Hello, testing this script (parameters are not real, of course):

package require tdbc::mysql
tdbc::mysql::connection create test_conn -user test_admin -passwd \  
test_passw -db test -host www.test.com -port 3306
set consulta "SELECT * FROM entes"
set sentencia [test_conn prepare $consulta ]
$sentencia foreach row {
    puts $row 
}
$sentencia close
test_conn close

I get this

Exit code: 3221225477

However, using this

puts [test_conn evaldirect $consulta ]

i get the right lists.

After testing several versions of libmariadb.dll, i can confirm that only 3.1.17 works, both 3.2.7 and 3.3.1 fails.

Later i've tested a "fixed" 1.1.4 version, however didn't work either for me.

After debug this using my humble C expertise, i'm traced the problem to this line :

if (Tcl_GetCommandInfo(interp, "::tcl::build-info", &info)) {

being the command tcl::build-info added after tcl 8.7.

For all that, i've post a comment in other ticket:

My test with 8.6.xx fails, however this seems caused by new features in 8.7.

I can't confirm it because all Win32 binary distributions are 8.6.xx

I hope someone can check and fix this in the tdbc::mysql.

Saludos,

Alejandro

L. Alejandro M.
  • 619
  • 6
  • 14