Add majority logic behind createTicket() in MySQL's DP.