text: -- MODULE  IST007  
  
  -- SQL Test Suite, V6.0, Interactive SQL, ist007.sql
  -- 59-byte ID
  -- TEd Version #
  
  -- AUTHORIZATION FLATER            
  
     SELECT USER FROM HU.ECCO;
  -- RERUN if USER value does not match preceding AUTHORIZATION comment
     ROLLBACK WORK;
  
  -- date_time print
  
  -- TEST:0609 Orphaned IS data structures, Transitional SQL!
  
     SELECT COUNT (DISTINCT TABLE_CAT)
  FROM INFO_SCHEM.TABLES;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT TABLE_CAT)
  FROM INFO_SCHEM.VIEWS;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT TABLE_CAT)
  FROM INFO_SCHEM.COLUMNS;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT CAT_NAME)
  FROM INFO_SCHEM.SCHEMATA;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT TABLE_CAT)
  FROM INFO_SCHEM.TABLE_PRIVILEGES;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT TABLE_CAT)
  FROM INFO_SCHEM.COLUMN_PRIVILEGES;
  -- PASS:0609 If count = 1?
  
     SELECT COUNT (DISTINCT OBJECT_CAT)
  FROM INFO_SCHEM.USAGE_PRIVILEGES;
  -- PASS:0609 If count = 0 or 1?
  
     SELECT TABLE_CAT
  FROM INFO_SCHEM.TABLES
  WHERE TABLE_NAME = 'WCOV';
  -- PASS:0609 If 1 row is selected?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.TABLES
  WHERE TABLE_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR TABLE_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.VIEWS
  WHERE TABLE_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR TABLE_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.COLUMNS
  WHERE TABLE_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR TABLE_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.SCHEMATA
  WHERE CAT_NAME <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR CAT_NAME IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.TABLE_PRIVILEGES
  WHERE TABLE_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR TABLE_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.COLUMN_PRIVILEGES
  WHERE TABLE_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR TABLE_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE OBJECT_CAT <>
  (SELECT TABLE_CAT FROM INFO_SCHEM.TABLES WHERE TABLE_NAME = 'WCOV')
  OR OBJECT_CAT IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT CHAR_SET_CAT,
  CHAR_SET_SCHEM,
  CHAR_SET_NAME,
  COLLATION_CAT,
  COLLATION_SCHEM,
  COLLATION_NAME,
  DOMAIN_CAT,
  DOMAIN_SCHEM,
  DOMAIN_NAME,
  INTERVAL_TYPE,
  INTERVAL_PREC
  FROM INFO_SCHEM.COLUMNS
  WHERE TABLE_SCHEM = 'FLATER'
  AND TABLE_NAME = 'USIG'
  AND COLUMN_NAME = 'C1';
  -- PASS:0609 If successful completion?
  -- PASS:0609 OR WARNING:  string data, right truncation?
  
     SELECT DEF_CHAR_SET_CAT,
  DEF_CHAR_SET_SCHEM,
  DEF_CHAR_SET_NAME
  FROM INFO_SCHEM.SCHEMATA
  WHERE SCHEM_NAME = 'FLATER';
  -- PASS:0609 If successful completion?
  -- PASS:0609 OR WARNING:  string data, right truncation?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE GRANTEE NOT IN ('PUBLIC', USER)
  AND GRANTOR <> USER;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE PRIVILEGE_TYPE <> 'USAGE'
  OR PRIVILEGE_TYPE IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE IS_GRANTABLE IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE IS_GRANTABLE NOT IN
  ('YES', 'NO');
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES
  WHERE GRANTOR IS NULL
  OR GRANTEE IS NULL
  OR OBJECT_SCHEM IS NULL
  OR OBJECT_NAME IS NULL
  OR OBJECT_TYPE IS NULL;
  -- PASS:0609 If count = 0?
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES;
  -- NOTE:0609 Save this result; compare with next statement.
  
     SELECT COUNT(*)
  FROM INFO_SCHEM.USAGE_PRIVILEGES A,
  INFO_SCHEM.USAGE_PRIVILEGES B
  WHERE A.GRANTOR = B.GRANTOR
  AND A.GRANTEE = B.GRANTEE
  AND A.OBJECT_SCHEM = B.OBJECT_SCHEM
  AND A.OBJECT_NAME = B.OBJECT_NAME
  AND A.OBJECT_TYPE = B.OBJECT_TYPE;
  -- PASS:0609 If count is same as that of previous statement?
  
     ROLLBACK WORK;
  
  -- END TEST >>> 0609 <<< END TEST
  
  -- *************************************************////END-OF-MODULE
  