DatabaseProcApplicationCreatedLinks
sybsystemprocssp_jdbc_getisolationlevels  14 déc. 14Defects Propagation Dependencies

1     
2     /**
3      * 

This procedure is used to determine which transaction isolation 4 * levels are supported by this ASE server. This proc is registered 5 * with the spt_mda table to be executed when the user calls: 6 * DatabaseMetaData.supportsTransactionIsolationLevel(int) . 7 * If the int specified is found in the row returned by this procedure, 8 * then that level is supported. The levels are indicated by using the 9 * integer mappings found in the java.sql.Connection interface. 10 *

13 * 15 *

This procedure accesses the @@version string, determines the 16 * version of ASE, and returns the appropriate levels. 17 *

WARNING: Should future versions of ASE support more transaction 18 * isolation levels (e.g., TRANSACTION_REPEATABLE_READ (4)), this proc 19 * must be modified. 20 */ 21 22 create or replace procedure sp_jdbc_getisolationlevels as 23 24 /* the convoluted logic in this stored procedure was needed only for ASE versions < 10.0.1 25 whereas this SQL is for version 16.0 and up only, so we can simply return the required value. 26 Moreover the spt_mda entry for TRANSACTIONLEVELS will be modified to return values directly. 27 This stored prcoedure being modified only to update the procedure that produces error 28 */ 29 select 8, 2, 1 30 return (0) 31



exec sp_procxmode 'sp_jdbc_getisolationlevels', 'AnyMode'
go

Grant Execute on sp_jdbc_getisolationlevels to public
go
RESULT SETS
sp_jdbc_getisolationlevels_rset_001

DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_jdbc_getisolationlevels  
 MUCO 3 Useless Code Useless Brackets 30
 QNAM 3 Select expression has no name 1 29
 QNAM 3 Select expression has no name 2 29
 QNAM 3 Select expression has no name 8 29
 MRST 2 Result Set Marker 29
 MTR1 2 Metrics: Comments Ratio Comments: 83% 22
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 22
 MTR3 2 Metrics: Query Complexity Complexity: 3 22

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_jdbc_getisolationlevels_rset_001