You can answer at the end, how runtime of such apps is handled? (high availability - could be handled by ESB; recovery of instances, HTTP server that handling requests, etc.). Isn't the only possible approach in this case use CORBA?
Hello,
I found bug in [CreateTableSQL]function of adodb. For definition of db table:
$tbl_definition = "
user_id I PRIMARY NOTNULL,
transaction_id I NOTNULL,
realization_tstamp T NOTNULL,
delta_value N(9.2) NOT NULL,
realted_contract I
";
$tbl_options = array(
'mysql' => 'TYPE=MyISAM',
'constraints' =>
'FOREIGN KEY (user_id) REFERENCES cms_module_feusers_users (id),
FOREIGN KEY (transaction_id) REFERENCES cms_module_pscd_transtypes (id)',
);
It generate following output:
CREATE TABLE cms_module_pscd_trans ( user_id INTEGER NOT NULL, transaction_id INTEGER NOT NULL, realization_tstamp TIME NOT NULL, delta_value NUMERIC(9,2), realted_contract INTEGER, PRIMARY KEY (user_id) FOREIGN KEY (user_id) REFERENCES cms_module_feusers_users (id), FOREIGN KEY (transaction_id) REFERENCES cms_module_pscd_transtypes (id) )TYPE=MyISAM
This is however not correct (execution of such output will fail on database site due the syntax error). It is because of mistake in function _TableSQL(adodb-datadict.inc.php) in following implementation:
...
if (isset($tableoptions['CONSTRAINTS']))
$s .= "\n".$tableoptions['CONSTRAINTS'];
...
As you can see all CONSTRAINTS in this case will start without comma character at begin what cause that the final command will fail due the syntax error.
Solution in my case was following:
...
if (isset($tableoptions['CONSTRAINTS']))
$s .= ",\n".$tableoptions['CONSTRAINTS'];
...
I don't know whether it fulfills all the use cases so (somebody has to perform regression test). I also attached corrected version of php sourcecode
Regards,
mOOnSPa