Old Pedant Sir,
The above procedure worked like a charm but, I did small change in the create table, As below.
CREATE TABLE tickets_base (
ticketcount INT AUTO_INCREMENT,
PRIMARY KEY ( prefix), KEY (ticketcount)
//Because You can have an auto-Incremental column that is not the PRIMARY KEY, as long as there is an index (key) on it: