Problem with Wt::Dbo MySql Backend
Added by Juan Burgos over 9 years ago
Hi,
I have found a problem performing any kind of query with the MySql Backend using the latest version both of Wt (Wt-3.3.5) and MySql Server (5.7.10). I also posted a question in Stackoverflow:
In summay, I always get the exception:
"MySQL error performing query: 'SET storage_engine=INNODB;': Unknown system variable 'storage_engine'"
But the storage engine is INNODB by default, I have triple-checked. I believe Wt::Dbo is trying to execute an invalid command because I tried "SET storage_engine=INNODB;" in the MySql command line and I get the same error.
Might be that the system variable "storage_engine" was changed in the most recent version of MySql to "default_storage_engine" but I am not sure since I am a database noob.
O is it that I am missing something?
Replies (1)
RE: Problem with Wt::Dbo MySql Backend - Added by Juan Burgos over 9 years ago
I have solved it. Posted the full answer in stackoverflow. Copy in here, there are two possible solutions:
I have found in the following links that indeed the variable "storage_engine" has been renamed to "default_storage_engine", which has caused some software to start getting issues with recent versions of MySql.
https://confluence.atlassian.com/display/CONFKB/Confluence+fails+to+start+with+error'Unknown+system+variable'storage_engine''+using+MySQL+5.7.x
There are to possible solutions:
1) Change Wt::Dbo source by modifying the file "MySQL.C" around line 980 in function :
void MySQL::init()
{
executeSql("SET sql_mode='ANSI_QUOTES,REAL_AS_FLOAT'");
executeSql("SET storage_engine=INNODB;");
executeSql("SET NAMES 'utf8';");
}
By first somehow testing first which MySql version the server has and then SET the "default_storage_engine" variable instead "storage_engine". And then recompile the full Wt::Dbo library.
OR
2) Go back to the most recent version of MySql in which the variable "storage_engine" has not yet been renamed.
I opted for solution 2 and uninstalled MySql 5.7 and installed MySql 5.4 and now everything works just fine.
Hope this helps somebody out there... cheers!