Ubuntu, MySQL Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)
OpenFPC version 0.6-314 from release tarball
There are 2 issues.
First, when openfpc-cx2db creates the per-instance-day session tables, it does
not specify that the engine for the table should be MyISAM. At least on my
system, this is not the default, but since cx2db relies on it for MERGE tables,
it should be explicit even if it is the default. Just add "ENGINE=MyISAM" to
the create SQL in new_session_table.
The second issue seems to be a syntax error (or may be related to the wrong
engine of the daily tables). I get an error in /var/log/openfpc-cx2db.log:
[*] Connecting to database...
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to
use near 'TYPE=MERGE UNION=( session_Sandbox1_20120926,
session_Sandbox1_20120927)' at line 26 at /usr/bin/openfpc-cx2db line 573.
According to http://dev.mysql.com/doc/refman/5.5/en/merge-storage-engine.html,
the syntax for creating a merge table is
create table foo ( ... ) ENGINE=MERGE UNION=( ... )
Making this trivial change to cx2db (line 570, s/TYPE=/ENGINE=/) results in a
proper session table, and a working session tracker.
I can provide a patch for these 2 changed lines if desired.
Original issue reported on code.google.com by jpvlsmv@gmail.com on 27 Sep 2012 at 1:52
Original issue reported on code.google.com by
jpvlsmv@gmail.com
on 27 Sep 2012 at 1:52