Re: [gnome-db] Problem with MySQL provider

2012/1/25 JA Magallón <jamagallon ono com>

First, hello to wveryone, I'm new to the list.


And now the bad things ;).
I an just trying to use gda-browser to connect to a mysql server, and
I just get an error on startup about the syntax of 'where Variable_name = ...'
thing. I will reproduce it from  mysql (well, really mariadb) cli client:

werewolf:~> mysql --host=xxxxx --user=magallon --password=xxxxx magallon
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 891633
Server version: 4.1.7-log

Copyright (c) 2000, 2011, Oracle and/or its affiliates.
2009-2011 Monty Program Ab

This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [magallon]> show variables where Variable_name='lower_case_table_names';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where Variable_name='lower_case_table_names'' at line 1

This is the error I get from gda-browser-5.0 on connection.

It looks like the sorrect syntax is something like:

MySQL [magallon]> show variables like 'lower_case_table_names';
| Variable_name          | Value |
| lower_case_table_names | 0     |
1 row in set (0.06 sec)

Is this really a bug ? Is mysql 4.1 too old for gda ?

I must admit I have not tested Libgda's MySQL provider with MySQL 4 for a very long time...

Now, you're right, when opening the connection, the " SHOW VARIABLES WHERE Variable_name = 'lower_case_table_names'" query is executed, and it seems to be the cause of the error you get.

I'll correct this ASAP (probably over the WE), in the meanwhile, you can do it locally yourself if you can compile Libgda from sources (this query string is in the providers/mysql/gda-mysql-provider.c file).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]