FrankC wrote:the table doesn't change one iota, while I do get the message that the query has been executed successfully.
What's up with that??
Your answer is incorrect, because after removing the primary key, the ALTER did work.
FrankC wrote:It's just a matter of the change to default InnoDB as per MySQL 5.5 that caused the problem. Which can be solved by removing the primary key or changing the database engine back to MyISAM.
FrankC wrote:But PHPMyAdmin (not XAMPP) should give a warning that ALTER does not work on InnoDB databases when tables have a primary key. It should certainly not report back (anymore) that such a query has been executed successfully.
FrankC wrote:But PHPMyAdmin (not XAMPP) should give a warning that ALTER does not work on InnoDB databases when tables have a primary key.
CREATE TABLE IF NOT EXISTS `innodb_test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`col1` smallint(6) NOT NULL,
`col2` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
INSERT INTO `innodb_test` (`id`, `col1`, `col2`) VALUES
(1, 0, 'def\r\nghi'),
(2, 0, 'mno\r\noqr'),
(3, 123, 'abc\r\ndef'),
(4, 456, 'ghi\r\njkl');
ALTER TABLE `innodb_test` MODIFY `col1` BIGINT;
http://dev.mysql.com/doc/refman/5.5/en/alter-table.html wrote:ORDER BY does not make sense for InnoDB tables that contain a user-defined clustered index (PRIMARY KEY or NOT NULL UNIQUE index). InnoDB always orders table rows according to such an index if one is present.
Nobbie wrote:See above - it is completely stupid to use SQL without primary key. What is the idea of a database without primary key? You could use simple text files instead.
Altrea wrote:So for MySQL the SQL Statement was executed successful. The result is as expected.
Altrea wrote:If you want to use a banana to knock in a nail into a stone wall, your expected result is a knocked in nail in a stone wall?
FrankC wrote:A comparison that doesn't make any sense whatsoever.
FrankC wrote:It's a pity to see that not having to admit is more important to you than your credibility and reputation of being a reasonable person.
Altrea wrote:you are using the wrong tool relating to your expectation.
Users browsing this forum: No registered users and 55 guests