Query problem: there can be only one auto column
This will apparently work with MyISAM as storage engine, not InnoDB, if you can live with that.

Another way to get it to work is if you swap places of queue and idx in the primary key declaration.