CAMOS/MySQL 5.5

penguin8r wrote on Thursday, May 17, 2012:

Just found this little glitch.  There’s something in the CAMOS form table creation scripts that MySQL version 5.5 doesn’t like.
Trying to install CAMOS db tables & enable the form leads to the usual MySQL syntax errors.  Since this has never been an issue before, it’s got to be a change implemented in the new version of MySQL.  Just started digging through the MySQL 5.5 documentation to try to hunt down the problem, wanted to throw this out there as a heads up to anybody else working with Ubuntu 12.  Ubuntu 12 LTS defaults to MySQL 5.5 unless you manually override to a previous version.  Will post the fix when I figure it out.

penguin8r wrote on Thursday, May 17, 2012:

Addendum to above:  it turns out that MySQL 5.5 doesn’t like ANY of the OpenEMR add-on forms.  At least, none that I’ve tried so far.  This could be a stumbling block for using Ubuntu 12 or newer versions of XAMPP.

bradymiller wrote on Friday, May 18, 2012:

Hi,
Sounds like this needs to be fixed before releasing 4.1.1. Is it showing any specific errors? Are there any sql_mode settings in the mysql configuration file?

-brady
OpenEMR

fndtn357 wrote on Friday, May 18, 2012:

thanks for posting - working through this here too.

bradymiller wrote on Friday, May 18, 2012:

Wow,

This may be kind of brutal. One issue in 5.5 is this:
The TYPE table option to specify the storage engine for CREATE TABLE or ALTER TABLE is no longer supported (use ENGINE).

This was actually brought up in this forum by a MAC user previously:
http://sourceforge.net/projects/openemr/forums/forum/202504/topic/5223855

I don’t think anything in sql/database.sql use this but it appears all of the forms sql files use TYPE, which will not work in 5.5. It always amazes me why a software project does such things(do they have grand ideas in the future that will require the TYPE command)…

-brady
OpenEMR

penguin8r wrote on Friday, May 18, 2012:

Yes, it is the TYPE statement that’s failing everything.  I was thinking it was a problem with all the VARCHAR fields, but those are all fine & within acceptable parameters even for MySQL 5.5
So, looks like it’s time to sit down & edit a ton of table.sql source code.
Thanks for the ENGINE hint Brady, I could see what was causing the problem, but couldn’t find the right solution, the MySQL documentation is less useful than one would think.

tmccormi wrote on Friday, May 18, 2012:

This is not new news …  MySQL “TYPE=” command deprecated since MySQL 4.1 removed in MySQL 5.4.4

One of the reasons we should not just turn off warnings and we should regularly (as part of our code review process) identify and remove deprecated code whenever we touch/update anything.

-Tony

penguin8r wrote on Friday, May 18, 2012:

I hadn’t realized just how far behind the times the version of MySQL that shipped on Ubuntu 10.04 really was.  Don’t use Windows, but now I’m wondering what version of MySQL the XAMPP package includes by default.

bradymiller wrote on Friday, May 18, 2012:

Hi,

Looks like xampp 1.7.7 uses MySQL 5.5.16 .

Anybody (or group of people) want to take this joyful bug fix on. I’m happy to also help if have the time. It will involve quick fixes(change TYPE to ENGINE) to all the table.sql files within interface/forms/* and contrib/forms/* (CAMOS seems special since also has table_no_data.sql), and quick mods to the formmaker and xmlformgenerator scripts.

-brady
OpenEMR

fndtn357 wrote on Wednesday, May 23, 2012:

I am working on it right now, as soon as I am done I will read about how to push it to where it can be reviewed.
james

fndtn357 wrote on Friday, May 25, 2012:

Posted code updates for review.

bradymiller wrote on Saturday, May 26, 2012:

Hi James,
Thanks for doing this. Looks good and committed your code to sourceforge.
-brady
OpenEMR