000001  hash-threshold 8
000002  
000003  statement ok
000004  CREATE TABLE t1( x INTEGER, y VARCHAR(8) )
000005  
000006  statement ok
000007  INSERT INTO t1 VALUES(1,'true')
000008  
000009  statement ok
000010  INSERT INTO t1 VALUES(0,'false')
000011  
000012  statement ok
000013  INSERT INTO t1 VALUES(NULL,'NULL')
000014  
000015  statement ok
000016  CREATE INDEX t1i1 ON t1(x)
000017  
000018  # There is no REINDEX in the SQL92 standard.
000019  # So far, this only runs well on SQLite and Postgres.
000020  # I believe MySQL uses the form REPAIR TABLE [tbl_name].
000021  
000022  # skip this entire file if ms sql server
000023  onlyif mssql
000024  halt
000025  
000026  # skip this entire file if oracle
000027  onlyif oracle
000028  halt
000029  
000030  # skip this entire file if oracle
000031  onlyif mysql
000032  halt
000033  
000034  # EVIDENCE-OF: R-52173-44778 The REINDEX command is used to delete and
000035  # recreate indices from scratch.
000036  
000037  statement ok
000038  REINDEX t1i1
000039  
000040  statement error
000041  REINDEX tXiX
000042  
000043  # TBD-EVIDENCE-OF: R-38396-20088 In the first form, all indices in all
000044  # attached databases that use the named collation sequence are
000045  # recreated.
000046  
000047  # TBD-EVIDENCE-OF: R-46980-03026 In the second form, if
000048  # [database-name.]table/index-name identifies a table, then all indices
000049  # associated with the table are rebuilt.
000050  
000051  # TBD-EVIDENCE-OF: R-50401-40957 If an index is identified, then only this
000052  # specific index is deleted and recreated.
000053  
000054  # TBD-EVIDENCE-OF: R-59524-35239 If no database-name is specified and there
000055  # exists both a table or index and a collation sequence of the specified
000056  # name, then indices associated with the collation sequence only are
000057  # reconstructed.
000058