I have a server running an old MySQL version (5.5.41) where the following was supported:
create table mytest33
(
topicnum mediumint,
postnum mediumint auto_increment,
primary key (topicnum,postnum)
);
So when I insert values into this table, it would go like this:
Topicnum Postnum
1 1
1 2
2 1
And so forth. So the postnum value would go back to 1, if the topicnum was different.
This is no longer supported - when I try creating the same table in MySQL version 5.6.17 I get an error:
ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key.
I'm using the MyISAM engine.
How do I get around this?