#4125 operation "copy table" uses removed parameter "TYPE"

4.0.7
invalid
nobody
type (1)
5
2013-10-10
2013-10-08
No

an SQL error is shown while sending "CREATE TABLE... () TYPE=..."
MySQL Verion is 5.5.28

cite from SQL documentation:
Section 5.1.7, “Server SQL Modes”.
Note:
The older TYPE option was synonymous with ENGINE. TYPE was deprecated in MySQL 4.0 and 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.

Discussion

  • Marc Delisle

    Marc Delisle - 2013-10-08

    I assume you are reporting a problem in phpMyAdmin 4.0.7. I had a look at the copy table logic. phpMyAdmin does not directly generate the TYPE or ENGINE keyword, it uses the output of the "SHOW CREATE TABLE mydb.mytable" statement. So please try this command, replacing by your db and table name, and show us the output.

    When I try this on MySQL 5.5.31, the output uses the ENGINE keyword.

     
  • Max Wildgrube

    Max Wildgrube - 2013-10-08

    Hi Marc,
    this is what I got:

    SQL result

    Host: Test
    Database: usr_p185246_1
    Generation Time: Oct 08, 2013 at 10:02 PM
    Generated by: phpMyAdmin 4.0.7 / MySQL 5.5.28
    SQL query: show create table _list_tab;
    Rows: 1

      Table    |            Create Table    
    ---------- | ----------------------------------------
    _list_tab  | CREATE TABLE `_list_tab` (
               | `ID` smallint(6) DEFAULT NULL,
               | `Name` varchar(999) DEFAULT NULL,
               | `Vorname` varchar(999) DEFAULT NULL,
               | `Info` varchar(999) DEFAULT NULL,
               | `Typ` varchar(999) DEFAULT NULL,
               | `Telefon` varchar(999) DEFAULT NULL,
               | `Index` varchar(999) DEFAULT NULL,
               | `_Anschrift` varchar(999) DEFAULT NULL,
               | `email_` varchar(999) DEFAULT NULL,
               | `löschen_` varchar(999) DEFAULT NULL
               | ) TYPE=MyISAM
               |
    
     
  • Marc Delisle

    Marc Delisle - 2013-10-08

    Hmmm, I'm not sure why it generates the "TYPE" keyword. Could you show me the output of this command:

    show variables like 'sql_mode'

     
  • Max Wildgrube

    Max Wildgrube - 2013-10-08

    Hi Marc,
    this is the...
    SQL result

    Host: Test
    Database:
    Generation Time: Oct 09, 2013 at 01:35 AM
    Generated by: phpMyAdmin 4.0.7 / MySQL 5.5.28
    SQL query: show variables like 'sql_mode' ;
    Rows: 1

    Variable_name |            Value    
    ------------- | ----------------------------
    sql_mode      | MYSQL40,HIGH_NOT_PRECEDENCE
    
     
  • Marc Delisle

    Marc Delisle - 2013-10-09

    Hi Max,
    your server, due to its running in MySQL 4.0 mode, outputs the TYPE keyword. Any particular reason why it's running with this mode?

     
  • Max Wildgrube

    Max Wildgrube - 2013-10-09

    Hi Marc,
    It's not my sever, it's the server of my provider (and he is a sub-provider). I don't know why the server is running in 4.0.
    But: if mySQL run in 4.0 why does it creating an error message for a syntax which is correct in 4.0?

     
  • Marc Delisle

    Marc Delisle - 2013-10-10

    Hi Max,
    the SQL mode only affects a part of the server's behavior.

     
  • Marc Delisle

    Marc Delisle - 2013-10-10
    • status: open --> invalid