forums › forums › SQLyog › Using SQLyog › Innodb Table Handler
- This topic is empty.
-
AuthorPosts
-
-
January 2, 2006 at 2:53 pm #9425Luc_40Member
when i hit relationships/foreign keys, i always get the message “the selected table does not have InnoDB table handler, You cannot make relations for the table”. I am sure that it is an InnoDB table.
—
What am i doing wrong ?
-
January 2, 2006 at 3:36 pm #20149peterlaursenParticipant
Please paste in the 'create statement for the table' from the SQLyog OBJECTS-tab. It should look like
Code:CREATE TABLE `currentusers` ( Â Â Â Â Â
        `uid` varchar(255) NOT NULL,     Â
        `starttime` int(11) default NULL,  Â
        `lasttime` int(11) default NULL,   Â
        PRIMARY KEY  (`uid`)         Â
       ) ENGINE=InnoDB DEFAULT CHARSET=latin1It sounds very much as if it is NOT an INNOdb table! And I don't think there is much that you can do wrong here 😉
Please note that if INNOdb is not enabled with the server configuration than MySQL will 'silently' replace INNOdb with the default table type (that is probably MyISAM)
What is the MySQL server version?
-
January 2, 2006 at 3:56 pm #20150Luc_40Member
strange, it keeps returning MyISAM, even when i do 'change table type to … InnoDB'
codes CREATE TABLE `codes` (
`ID` int(11) NOT NULL auto_increment,
`DOMEIN` tinytext collate latin1_general_ci NOT NULL,
`CODE` tinytext collate latin1_general_ci NOT NULL,
`OMS_N` tinytext collate latin1_general_ci,
`OMS_F` tinytext collate latin1_general_ci,
`OMS_E` tinytext collate latin1_general_ci,
`OMS_D` tinytext collate latin1_general_ci,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=DYNAMIC
-
January 2, 2006 at 4:06 pm #20151peterlaursenParticipant
It is not an INNODB tale but a MYISAM table – it says:
Code:ENGINE=MyISAMNote what I wrote:
Please note that if INNOdb is not enabled with the server configuration than MySQL will 'silently' replace INNOdb with the default table type (that is probably MyISAM). You won't get an error than but a warning
If MySQL is ver.5 there is an SQL_MODE available so that an invalid table type used in ALTER TABLE statements will raise an error instead.
-
January 2, 2006 at 4:11 pm #20152peterlaursenParticipant
That SQL_MODE is 'NO_ENGINE_SUBSTITUTION'
read
http://www.webyog.com/faq/28_72_en.html
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
I think the easiest thing to do here is to get “MySQL Administrator” and check the “support for INNODB” on ther Server Control .. Configure Service -tab. If Server configuration is under your control. Some ISP's disable INNODB.
Of course the server must be restarted, for the change to take effect
From SQLyog .. tools .. show .. variables you can see the current value for system variable “@@have innodb” Or you can use this SQL
Code:select @@have_innodb; -
January 2, 2006 at 4:25 pm #20153peterlaursenParticipant
BTW: what is the reason for using all those TINYTEXTs ?
A TINYTEXT is only 256 characteres according to
(http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html)
2^8 – 1 = 255.
so a CHAR or VARCHAR would probably be much better to use here (much more effective), where you will need INDEXES and CONSTRAINTS.
Read about string types:
-
January 2, 2006 at 5:10 pm #20154Luc_40Member
Sorry people, i am indeed a newbie, and i was using sql server 4.1.13. Now that i have updated to 5 it works fine. Sorry, i feel ashame …
By the way : congratulations for the quick response, thanks
Concerning the tiny text : the maximum length needs no more than 10 (codes and domains)
-
January 2, 2006 at 5:34 pm #20155peterlaursenParticipantQuote:the maximum length needs no more than 10 (codes and domains)
then I would recommend that you use a char(10) or varchar(10) for those fields.
BTW. InnoDB works fine with 4.1.x too. But it looks like a fresh server install solved the issue!
-
-
AuthorPosts
- You must be logged in to reply to this topic.