Problem with database upgarde from 5.0.0 to 5.0.1 with sql_upgrade.php


(Dr Torabi) #1

Hello.

I have installed open-emr xampp package from this link:

https://sourceforge.net/projects/openemr/files/OpenEMR%20Current/5.0.0.6/openemr-5.0.0.zip/download

Recently, I tried to upgrade to version 5.0.1

I downloaded openemr 5.0.1 from this link:

http://sourceforge.net/projects/openemr/files/OpenEMR%20Current/5.0.1.6/openemr-5.0.1.zip/download

I followed this instruction for upgrading openemr 5.0.0 to 5.0.1 :
https://www.open-emr.org/wiki/index.php/Windows_Upgrade_5.0.0_to_5.0.1

In the 8th level during database upgrade I encountered this error:

Processing 5_0_0-to-5_0_1_upgrade.sql …
Skipping section #IfMissingColumn list_options edit_options
Skipping section #IfMissingColumn list_options timestamp
CREATE TABLE multiple_db ( id int(11) NOT NULL AUTO_INCREMENT, namespace varchar(255) NOT NULL, username varchar(255) NOT NULL, password text, dbname varchar(255) NOT NULL, host varchar(255) NOT NULL DEFAULT ‘localhost’, port smallint(4) NOT NULL DEFAULT ‘3306’, date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY namespace (namespace), PRIMARY KEY (id) ) ENGINE=InnoDB

Query Error

ERROR: query failed: CREATE TABLE multiple_db ( id int(11) NOT NULL AUTO_INCREMENT, namespace varchar(255) NOT NULL, username varchar(255) NOT NULL, password text, dbname varchar(255) NOT NULL, host varchar(255) NOT NULL DEFAULT ‘localhost’, port smallint(4) NOT NULL DEFAULT ‘3306’, date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY namespace (namespace), PRIMARY KEY (id) ) ENGINE=InnoDB

Error: Specified key was too long; max key length is 767 bytes

C:\xampp\htdocs\openemr\library\sql_upgrade_fx.php at 892:sqlStatement
C:\xampp\htdocs\openemr\sql_upgrade.php at 91:upgradeFromSqlFile(5_0_0-to-5_0_1_upgrade.sql)

Please help me!


(Brady Miller) #2

hi @Dr_Torabi ,

I bet this is related to this issue:
Possible key limit size bug in 5.0.0 · Issue #532 · openemr/openemr · GitHub

“…related to combination of an older mysql version that also disables the innodb_large_prefix setting…”