The following changes to Sybase IQ error messages support the 12.7 ESD #3 LOCK TABLE feature described in “LOCK TABLE support [CR 480880, CR 472791, CR 463196, 444921]”.
The LOCK TABLE command returns errors as follows.
When the specified table does not exist, you see the message:
Table '%1' not found (SQLCODE -141, SQLSTATE 42W33)
'%1' is the name of the first user-specified table-name that does not exist.
If you specify an invalid time interval on the WAIT option, you see the ASA error message:
Cannot convert %1 to a %2 (SQLCODE -157, SQL STATE 53018)
In the preceding messages, ‘%1’ is the invalid time-string and ‘%2’ is “timestamp.”
The LOCK TABLE for WRITE mode returns the following errors:
When the table name appears more than once in the table-list, you see the message:
Item '%1' already exists (Constant SQLE_NAME_NOT_UNIQUE, SQLCODE -110, SQLSTATE 52010)
'%1' is the name of the first user-specified table-name that is duplicate.
When the table-list contains both IQ and SA tables, you see the ASA error message:
Table '%1' not found (SQLCODE 141, SQLSTATE 42W33)
'%1' is the name of the first SA table in the list.
When lock(s) cannot be acquired during the specified time interval, you see the message:
Unable to acquire table locks in specified time (LOCK_TIMEOUT, SQLCODE -1175L, SQLSTATE 42WC4)
If the command is interrupted, you see the ASA error message:
Statement interrupted by user (SQLCODE -299, SQLSTATE 57014)
If any table is not an IQ base table, you see the following ASA error messages.
For temporary tables, join virtual tables, or Adaptive Server Anywhere tables, you see the ASA error:
Table '%1' not found (SQLCODE 141, SQLSTATE 42W33).
%1 is the name of the first non-IQ base table in the list.
When attempting to lock a read-only table, you see this ASA error:
Permission denied: you do not have permission to use the %1 (SQLCODE –121, SQLSTATE 42501)
In the preceding statement, %1 is the LOCK TABLE WRITE statement.
Examples of a locking a read-only table include, but are not limited to, locking a table owned by the multiplex write server on a query server or locking a table when the database is read-only.
When the WITH HOLD option is specified, you see the error message:
Syntax error near '%1', %2 (SQLCODE -131, SQLSTATE 42W04)
If the WAIT option is not specified, you see the message:
Syntax error near '%1', %2 (SQLCODE -131, SQLSTATE 42W04)
If the user does not have at least one of the required permissions necessary to either insert, load, update, delete or truncate on all the table(s), you see the ASA error:
Permission denied: you do not have permission to use the %1 (SQLCODE –121, SQLSTATE 42501)
In the preceding statement, %1 is the LOCK TABLE WRITE statement.
The LOCK TABLE READ/EXCLUSIVE statement returns the following error.
If the statement fails, even with WAIT option specified, you see the ASA error:
-210, User '%1' has the row in '%2' locked.
‘%1’ is the name of the user who owns the lock. ‘%2’ is the user-specified table name.
DML update commands return the same error when a write-write conflict occurs.