Parameters
mask | sum of the option values that will be affected (set or delete setting) |
value | sum of the option values that should be sets |
[cdp | client context variable] |
Since version:
5.1
Description
The 602SQL server allow you to set the rate of compatibility with older versions. This setting may be modified even when an application is running and different settings may be valid for different clients at the same time.
Specify the sum of option values you want to set in the mask parameter (e.g. the SQLOPT_NULLEQNULL option should be set and the SQLOPT_NULLCOMP options shouldn't be set (because it was set previously and you want to delete the setting): set the value 3(=1+2)).
Specify the value value of the option that should be set, or set 0 for the option that shouldn't be set (example from the last paragraph: set 1(=1+0)).
When a new client connects to the server all its option will be set according to server property DefaultSQLOptions
. If the value of this property is not modified, 602SQL syntax will be enabled for all options.
The Set_sql_option
procedure is also implemented on the server in an SQL language. You must then use the numeric values on the parameters.
Example (SQL): numeric overflow should cause an error
CALL Set_sql_option(8,0)
You may also read and modify the current setting in the SQL server using the system variable @@SQLOPTIONS .
Function value
This function returns TRUE if unsuccessful;
Example:
Set ALTER TABLE to be compatible with SQL2:
Set_sql_option(128,0);
Set all options for compatibility with older server versions:
Set_sql_option(1048575, 1048575);
See