Login or Register

RSS IconRecent posts in this topic

avatar
Torgny Bjers on Jul 23. 2006. 2:51 pm
Hello,

I just discovered a little bug in the installation script. I've included a fix for this below.
In Mysql prior to v4 (3.23), you MUST use "TYPE = " instead of "ENGINE = ".

top of install/installation/templates/sql/mysql_schema.php:

<?php
$compatType = 'ENGINE';
// Determine MySQL version.
$mysqlInfo = mysql_get_server_info();
if (is_string($mysqlInfo))
{
if (version_compare($mysqlInfo, '4.0') == -1)
{
$compatType = 'TYPE';
}
}
?>

Then replace every instance of "ENGINE=" with:

<?php echo $compatType; ?>=

Regards,
Torgny
avatar
Torgny Bjers on Jul 23. 2006. 3:19 pm
The above results in the tables being created, but the initial information is not put into the database because in MySQL 3.23.58 the method executeMultipleQueries returns null/false or something, and that makes the code actually abort.

My fixes can be found here:

http://www.bjers.biz/FinishStep.tar.gz

Please consider this alteration and I am sure you can improve upon it, but that's what I did to fix my installation with MySQL 3.23.58.

Warm Regards,
Torgny
avatar Staff
Ilija Studen on Jul 24. 2006. 12:03 pm
Thanks for the fix, I'll check that one out. One thing that I also need to do is to make InnoDB a requirement and make the installer check if Inno is supported.
activeCollab Team Member
avatar
Torgny Bjers on Jul 24. 2006. 1:52 pm
In MySQL 4.1.2 you can use SHOW ENGINE InnoDB; or SHOW ENGINES; for older versions of MySQL you'll have to use SHOW TABLE TYPES;

SHOW TABLE TYPES returns the following in my MySQL 5.x:

mysql> SHOW TABLE TYPES;
+------------+---------+----------------------------------------------------------------+
| Engine     | Support | Comment                                                        |
+------------+---------+----------------------------------------------------------------+
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     |
| BerkeleyDB | YES     | Supports transactions and page-level locking                   |
| BLACKHOLE  | NO      | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE    | NO      | Example storage engine                                         |
| ARCHIVE    | NO      | Archive storage engine                                         |
| CSV        | NO      | CSV storage engine                                             |
| ndbcluster | NO      | Clustered, fault-tolerant, memory-based tables                 |
| FEDERATED  | NO      | Federated MySQL storage engine                                 |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          |
| ISAM       | NO      | Obsolete storage engine                                        |
+------------+---------+----------------------------------------------------------------+

12 rows in set, 1 warning (0.00 sec)

Which is the same as what a 3.23.x would return, only that 5.x signals a warning (probably since show table types is in fact deprecated).
avatar Staff
Ilija Studen on Jul 24. 2006. 2:08 pm
You just saved me a lot of googling :)
activeCollab Team Member
avatar
Torgny Bjers on Jul 24. 2006. 2:14 pm
I'm glad I could help. If you need anything else, just give me a holler!
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic