Delimiter //
/**
 * Check if the given table exists
 * 
 * @param varchar(100) tablename
 * @return boolean
 */
Drop Procedure if exists CASH_ISTABLE//
Create Procedure CASH_ISTABLE (
    In  tablename varchar(100)
    , Out  res Boolean
)
Begin

    Declare Exit Handler For SQLEXCEPTION
    Begin
        Set res = true;
    End;

    Set @query = Concat('Create temporary Table ', tablename, ' as Select 1 test');
    Prepare stmt from @query ;
    Execute stmt;
    Deallocate prepare stmt;

    Set @query = Concat('Drop temporary Table If Exists ', tablename);
    Prepare stmt from @query ;
    Execute stmt;
    Deallocate prepare stmt;
    Set res = false;

End //
Delimiter ;