Technote Details :: When i try to use User Login, I get an error about temporary tables
Issue
I have built a login page using MX User Login. When I try it in the browser, I get the following error message:
Error:
Internal Error.
Developer Details:
tNG_fields.getFakeRecordset:
SQL error: Error creating temporary table:
Table 'KT_fakeRS_20050802' already exists
I have granted permissions for the user to create temporary tables.
Reason
This happens because the user login operation uses the fake (transaction) recordset to display entered data in case of error. This recordset is stored with the help of a temporary table, which is created at the start of the transaction, and dropped when it is no longer needed.
In this case, the error occurred because the temporary table could not be removed. This happens because the account used to connect to the database server does not have the DROP TABLE permission.
Solution
There are two possible solutions for this problem if using MySQL 4 or newer:
- Grant the DROP TABLE permission for the user that already has CREATE TEMPORARY TABLES permission. If the user only has one of the rights, the error will occur.
- Remove the CREATE TEMPORARY TABLES permission for the user. If none of the rights are granted to the user, the program will not attempt to create temporary tables.
If using MySQL version 3.x, the user must have the DROP TABLES permission.
For instructions on granting permissions for users, contact the database server administrator or consult the user manual of your database server software.