MySQL 5.5.8 -> TYPE Deprecation

Issue #36 resolved
Former user created an issue

When installing OpenBiblio on MySQL 5.5.8, the install.php script fails, stating that TYPE is no longer supported.

Here's what it dumped in the trace:

{{{

!php

C:\wamp\www\lib\classes\Error.php:137 FatalHandler->printBackTrace() C:\wamp\www\lib\classes\Error.php:105 FatalHandler->dbError(' create table biblio ( bibid integer auto_increment primary key ,create_dt datetime not null ,last_change_dt datetime not null ,last_change_userid integer not null ,material_cd smallint not null ,collection_cd smallint not null ,call_nmbr1 varchar(20) null ,call_nmbr2 varchar(20) null ,call_nmbr3 varchar(20) null ,title text null ,title_remainder text null ,responsibility_stmt text null ,author text null ,topic1 text null ,topic2 text null ,topic3 text null ,topic4 text null ,topic5 text null ,opac_flg char(1) not null ) TYPE=MyISAM ', 'Database query 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=MyISAM\' at line 22') C:\wamp\www\lib\classes\Query.php:91 Fatal->dbError(' create table biblio ( bibid integer auto_increment primary key ,create_dt datetime not null ,last_change_dt datetime not null ,last_change_userid integer not null ,material_cd smallint not null ,collection_cd smallint not null ,call_nmbr1 varchar(20) null ,call_nmbr2 varchar(20) null ,call_nmbr3 varchar(20) null ,title text null ,title_remainder text null ,responsibility_stmt text null ,author text null ,topic1 text null ,topic2 text null ,topic3 text null ,topic4 text null ,topic5 text null ,opac_flg char(1) not null ) TYPE=MyISAM ', 'Database query 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=MyISAM\' at line 22') C:\wamp\www\lib\classes\Query.php:266 Query->_act(' create table biblio ( bibid integer auto_increment primary key ,create_dt datetime not null ,last_change_dt datetime not null ,last_change_userid integer not null ,material_cd smallint not null ,collection_cd smallint not null ,call_nmbr1 varchar(20) null ,call_nmbr2 varchar(20) null ,call_nmbr3 varchar(20) null ,title text null ,title_remainder text null ,responsibility_stmt text null ,author text null ,topic1 text null ,topic2 text null ,topic3 text null ,topic4 text null ,topic5 text null ,opac_flg char(1) not null ) TYPE=MyISAM ') C:\wamp\www\lib\classes\Query.php:271 Query->_exec(' create table biblio ( bibid integer auto_increment primary key ,create_dt datetime not null ,last_change_dt datetime not null ,last_change_userid integer not null ,material_cd smallint not null ,collection_cd smallint not null ,call_nmbr1 varchar(20) null ,call_nmbr2 varchar(20) null ,call_nmbr3 varchar(20) null ,title text null ,title_remainder text null ,responsibility_stmt text null ,author text null ,topic1 text null ,topic2 text null ,topic3 text null ,topic4 text null ,topic5 text null ,opac_flg char(1) not null ) TYPE=MyISAM ') C:\wamp\www\lib\classes\InstallQuery.php:121 Query->exec(' create table biblio ( bibid integer auto_increment primary key ,create_dt datetime not null ,last_change_dt datetime not null ,last_change_userid integer not null ,material_cd smallint not null ,collection_cd smallint not null ,call_nmbr1 varchar(20) null ,call_nmbr2 varchar(20) null ,call_nmbr3 varchar(20) null ,title text null ,title_remainder text null ,responsibility_stmt text null ,author text null ,topic1 text null ,topic2 text null ,topic3 text null ,topic4 text null ,topic5 text null ,opac_flg char(1) not null ) TYPE=MyISAM ') C:\wamp\www\lib\classes\InstallQuery.php:96 InstallQuery->executeSqlFile('../install/0.7.0/sql/biblio.sql', '') C:\wamp\www\lib\classes\InstallQuery.php:84 InstallQuery->executeSqlFilesInDir('../install/0.7.0/sql', '') C:\wamp\www\lib\install\install.php:69 InstallQuery->freshInstall('en', true) }}}

Comments (23)

  1. Former user Account Deleted

    The ENGINE and TYPE options specify the storage engine for the table. ENGINE was added in MySQL 4.0.18 (for 4.0) and 4.1.2 (for 4.1). It is the preferred option name as of those versions, and TYPE has become deprecated. TYPE is supported throughout the 4.x series but it was removed in MySQL 5.5. When upgrading to MySQL 5.5 or later, you MUST convert existing applications that rely on TYPE to use ENGINE instead. So, for all MySQL versions since 4.0.18 and 4.1.2 you can use ENGINE.

    To answer your problem, go through every file and change TYPE to ENGINE

    Perhaps any new versions of OpenBiblio will have that change incorporated with cautions for users of older versions of MySQL.

  2. Former user Account Deleted

    Well, i walked away for a bit and found the files but i stillget three errors but the databases is opening. Any clue on these three? Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\openbiblio\shared\common.php on line 24

    Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\openbiblio\classes\Query.php on line 247

    Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\openbiblio\shared\header.php on line 6

    Thanks

  3. Former user Account Deleted

    "Deprecated" should go away with production values in PHP.INI error_reporting = E_ALL & E_DEPRECATED display_errors = Off

    If it works OK, with the changes you've made, please report your exact MySQL and PHP version. Thanks.

  4. Former user Account Deleted

    New errors showed up today Database query failed

    Please give all the information on this page to your support personnel.

    Query create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid failed. The DBMS said this:

    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=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b w' at line 1

    Debug Backtrace (most recent call first):

    C:\xampp\htdocs\openbiblio\classes\Error.php:100 FatalHandler->printBackTrace() C:\xampp\htdocs\openbiblio\classes\Error.php:68 FatalHandler->dbError('create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid ', 'Database query 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=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b w\' at line 1') C:\xampp\htdocs\openbiblio\classes\Query.php:91 Fatal->dbError('create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid ', 'Database query 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=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b w\' at line 1') C:\xampp\htdocs\openbiblio\classes\Query.php:266 Query->_act('create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid ') C:\xampp\htdocs\openbiblio\classes\Query.php:271 Query->_exec('create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid ') C:\xampp\htdocs\openbiblio\classes\DmQuery.php:66 Query->exec('create temporary table mbrout type=heap select b.material_cd, c.bibid, c.copyid from biblio_copy c, biblio b where c.mbrid=4 and b.bibid=c.bibid ') C:\xampp\htdocs\openbiblio\circ\mbr_view.php:190 DmQuery->getCheckoutStats('4')

    OpenBiblio 0.6.1 MySQL 5.0.22 PHP 5.3.5 XAMPP 1.7.4

  5. Former user Account Deleted

    Also with the above I can create members but the checkout option is not available

  6. Hans van der Weij

    When using XAMPP 1.7.4, your MySQL server version must be 5.5.8. Perhaps the MySQL client reports 5.0.22, but the TYPE deprecation problem is with the server.

    OK, you've chosen the interesting but perhaps not always joyful experience of running OpenBiblio on a MySQL version that hasn't been tested with OpenBiblio. I think you are almost done, now that you've come this far (fixing the install scripts). I have found one more TYPE= in the source: https://bitbucket.org/mstetson/obiblio/src/3ad73c631685/classes/DmQuery.php#cl-62 Change type=heap into ENGINE=MEMORY

    I don't know what to think of this issue. And how MySQL thinks we should deal with it... If type= simply is changed into engine= , MySQL versions below 4.0.18 would not be supported. https://bitbucket.org/mstetson/obiblio/src/3ad73c631685/install_instructions.html#cl-60 says 4.0.12 or higher is supported.

  7. Former user Account Deleted

    Deprecated: Function eregi_replace() is deprecated in C:\xampp\htdocs\schoolopedia\timetable\backs.php on line 46 how to solve this error i am using mysql version 5.5.8

  8. Former user Account Deleted

    Deprecated: Function ereg_replace() is deprecated in C:\xampp\htdocs\schoolopedia\timetable\backs.php on line 46 how to solve this error i am using mysql version 5.5.8 plz reply as soon as possible

  9. Log in to comment