SQL_MODE
. I guess I should have realized that the following two lines from my my.cnf
option file would probably not be liked by Wordpress either:
default-storage-engine=InnoDB #Set the default storage engine (table type) for tables.
init-connect="set autocommit=0" #set autocommit off on connect
So, I went back and hacked
wp-includes/wp-db.php
again. Now the fix read:
// fix sql_mode
mysql_query("SET SESSION SQL_MODE := ''",$this->dbh);
mysql_query("SET SESSION AUTOCOMMIT=ON",$this->dbh);
// end fix sql_mode
Let's hope this was the last one ....
2 comments:
Roland, Did you file your patches in Wordpress's trac bug system
http://trac.wordpress.org/
As Yoda says, "If in trac, your bug is not. Then a bug it is not. Hrrm!"
Hi Yusuf,
actually, I tried to file a bug, but somehow I could not log in...Probably due to me - it was really late at night for me....
I'd like to contribute the patch if you can call it that. However, I think a check should be added to figure out whether the MySQL server actually supports sql_mode. My fix just blindly assumes it does and might not go down well with older MySQL servers.
If you can help me get going with contributing the patches, I'd appreciate your help.
Cheers,
Roland
Post a Comment