You are not logged in.
Ok, you may be right
I look at qt source, there is reference to mysql_config --libs/--flags but nothing about --socket
But, if i modify mysql_config by hand, it would not fix my qt test program... So, if rebuilding Qt is not needed, there is something more to fix... (as mysql client depend on libmysqlclient and works)
Last edited by gnumdk (2009-11-19 01:48:41)
Offline
mysql-python and akonadi fixed.
btw, I am not sure amarok needs a rebuild.
Not really ... I have an application (mod_python/mysql) and it does not work at all.
The fix does solve the problem for PHP though.
What do I have to do to get mysql-python going? Is there a config file I need to update or something?
R.
Offline
I've also tried to create a symlink to /var/run/mysqld/mysqld.sock in /tmp but that does not work either.
R.
Offline
ok, with mysql 5.1.41-2 this works here; I think qt apps are fixed now. Let me know if akonadi, amarok and mythtv work or not.
mysql.pro
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += sql
# Input
SOURCES += mysql.cpp
mysql.cpp
#include <QApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QDebug>
int main( int argc, char *argv[] ){
QApplication app( argc, argv );
QSqlDatabase defaultDB = QSqlDatabase::addDatabase( "QMYSQL3");
defaultDB.setDatabaseName( "dbname");
defaultDB.setUserName( "user" );
defaultDB.setPassword( "pass" );
defaultDB.setHostName( "localhost" );
if ( defaultDB.open() ) {
// Database successfully opened; we can now issue
qDebug () << "ok";
}
else {
qDebug() << defaultDB.lastError().databaseText().toLatin1();
}
}
Offline
Not really ... I have an application (mod_python/mysql) and it does not work at all.
The fix does solve the problem for PHP though.What do I have to do to get mysql-python going? Is there a config file I need to update or something?
wait for mysql 5.1.41-2:
server_version.py
#!/usr/bin/python
import MySQLdb
conn = MySQLdb.connect (host = "localhost",
user = "user",
passwd = "pass",
db = "database")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()
$ ./server_version.py
server version: 5.1.41
Offline
Amarok ok, akonadi ok!!!
Thanks!
Offline
kidoz wrote:PHP 5.3.0-5 can not connect to mysql 5.1.41-1. Wait for updates?
You need to edit php.ini and set
(line 1215) mysql.default_socket =/var/run/mysqld/mysqld.sock
Thank you! Works.
Offline
mythtv 0.22 still does not work..
the error accessing the database when running mythtv-setup is
2009-11-19 08:57:19.987 DB Error (SimpleDBStorage::Save() query):
Query was:
SELECT * FROM settings WHERE value = ? AND hostname = ?;
Bindings were:
:WHEREHOSTNAME=emmet, :WHEREVALUE=JobAllowUserJob1
Driver error was [2/1210]:
QMYSQL3: Unable to execute statement
Database error was:
Incorrect arguments to mysqld_stmt_execute
from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.
ive ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock but the issue is still there
Offline
mythtv 0.22 still does not work..
from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.
are you using mysql 5.1.41-2?
Offline
eldragon wrote:mythtv 0.22 still does not work..
from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.are you using mysql 5.1.41-2?
yes
extra/libmysqlclient 5.1.41-2 [installed]
MySQL client libraries
extra/mysql 5.1.41-2 [installed]
A fast SQL database server
extra/mysql-clients 5.1.41-2 [installed]
MySQL client tools
from some extra searaching, they claim the issue is with qt's mysql bindings, which is what mythtv uses.. thats as far as my puny intelect goes
EDIT
check http://www.gossamer-threads.com/lists/m … 83;#387205 post 7
Last edited by eldragon (2009-11-19 12:37:15)
Offline
Amarok ok with mysql 5.1.41-2! Thanks :)
Last edited by estevao (2009-11-19 12:39:55)
Offline
and checked the current PKGBUILD which already has the workaround applied: CFLAGS += -fno-strict-aliasing
so we are back to square 1.
gonna dump the entire database and start over again...
EDIT: not a database issue.
Last edited by eldragon (2009-11-19 13:33:07)
Offline
unfortunately we built mythtv with mysql 5.1-41-1; rebuilding mythtv now.
Offline
I can't get the mailing list to load but this is what was said in regards to the issue:
You need to get a version of MySQL that was compiled properly.
If you're building from source, you can either use proper optimization
(i.e. don't set -O in CFLAGS) or apply the changes Davin posted to the
MySQL bug tracker (as mentioned at
http://svn.mythtv.org/trac/ticket/6683#comment:6 ) or using
-fno-strict-aliasing (as he mentioned in the MySQL bug report).If you're using packages, get your packager to fix it. You might want
to direct your packager to Davin's comment at the link above.Mike
Looking at the suggest ticket leads to http://bugs.mysql.com/bug.php?id=48284
This states
Suggested fix:
The fix is fairly trivial, two things should be changed:
1) change the declared type of the "pos" parameter in store_param_type from "char **" to
"uchar **"
2) remove the "char **" cast from line 2554 in cli_stmt_execute. (Not strictly necessary,
but GCC gives a warning if you don't).For a workaround with current version, it's easy just to add "-fno-strict-aliasing" to
CFLAGS.
Offline
I can't get the mailing list to load but this is what was said in regards to the issue:
You need to get a version of MySQL that was compiled properly.
If you're building from source, you can either use proper optimization
(i.e. don't set -O in CFLAGS) or apply the changes Davin posted to the
MySQL bug tracker (as mentioned at
http://svn.mythtv.org/trac/ticket/6683#comment:6 ) or using
-fno-strict-aliasing (as he mentioned in the MySQL bug report).If you're using packages, get your packager to fix it. You might want
to direct your packager to Davin's comment at the link above.Mike
Looking at the suggest ticket leads to http://bugs.mysql.com/bug.php?id=48284
This states
Suggested fix:
The fix is fairly trivial, two things should be changed:
1) change the declared type of the "pos" parameter in store_param_type from "char **" to
"uchar **"
2) remove the "char **" cast from line 2554 in cli_stmt_execute. (Not strictly necessary,
but GCC gives a warning if you don't).For a workaround with current version, it's easy just to add "-fno-strict-aliasing" to
CFLAGS.
ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG
Offline
Using the latest 5.1.41-2 mysql and mysql-python 1.2.3c1-1, I still get the error:
.....
conn = dbapi.connect(**params)
File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 188, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")
I made it work by going in to my.conf and changing the sockets to /tmp/mysql.sock instead of /var/run/mysqld/mysqld.sock. I'm sure this would break something else (luckily I don't use mysql for anything else right now).
Is that still a mysql-python error? I thought you had fixed that already with the 1.2.3c1-1 release.
Thanks for your help on this!
Scott
Offline
ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG
How did you find this out? I do not see this option being set in the x86_64 mysql pkgbuild.
http://repos.archlinux.org/wsvn/package … 4/PKGBUILD
Offline
eldragon wrote:ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG
How did you find this out? I do not see this option being set in the x86_64 mysql pkgbuild.
http://repos.archlinux.org/wsvn/package … 4/PKGBUILD
scratch that.. i was looking at an old PKGBUILD!
anyway, it should have been fixed by now. if you want to, check the source files for the changes proposed
Offline
What source files are you talking about? The files in trunk appear to be the same as those in the repos.
local abs tree, forgot to update it
anyway, mythtv 0.22-3 made it to the repos. yet the issue persists..... any more ideas anyone?
EDIT
Ive checked the sources, and no, it was not patched yet. did the patch manually and am building mysql.
will report back with results
fix suggested here: http://bugs.mysql.com/bug.php?id=48284
Last edited by eldragon (2009-11-19 18:56:44)
Offline
Forgive me for being confused, but it seems like compiling mysql with the -fno-strict-aliasing cflag may fix the issue.
Have you tried this yet? I will give it a go, but I am sure it will take a long time on a Sempron +2200
Offline
Forgive me for being confused, but it seems like compiling mysql with the -fno-strict-aliasing cflag may fix the issue.
Have you tried this yet? I will give it a go, but I am sure it will take a long time on a Sempron +2200
call me stupid, but i dont actually know where to put the CFLAGS in the pkgbuild, so i just modified libmysql.c as explained in the bug report and im buildiung just that.
/me builds on an athlon 3000
EDIT: finnished building. installed. and restarted both mysqld and mythbackend.
this time, mythbackend ran correctly. im not at home so i cannot test if it actually works. but everything looks like it does.
Last edited by eldragon (2009-11-19 19:29:07)
Offline
I just added export CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing" to the pkgbuild.
These are the default CFLAGS in makepkg with the added -fno-strict-aliasing.
export CFLAGS=$CFLAGS+"-fno-strict-aliasing" might be cleaner
Actually I just applied the said fix in the code. Here is the patch
--- libmysql/libmysql.c.old 2009-11-19 14:26:39.542270424 -0500
+++ libmysql/libmysql.c 2009-11-19 14:28:47.422256556 -0500
@@ -2285,7 +2285,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *st
/* Store type of parameter in network buffer. */
-static void store_param_type(char **pos, MYSQL_BIND *param)
+static void store_param_type(uchar **pos, MYSQL_BIND *param)
{
uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0);
int2store(*pos, typecode);
Last edited by pyther (2009-11-19 19:33:12)
Offline