OK - retried with Db2 V12.1 at this level:
db2inst1@DESKTOP-F5VOQKN:~$ db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL12010" with level
identifier "02010110".
Informational tokens are "DB2 v12.1.0.0", "special_50594",
"DYN2411071022AMD64_50594", and Fix Pack "0".
Product is installed at "/opt/ibm/db2/V12.1".
Db2 reports correct error message:
db2inst1@DESKTOP-F5VOQKN:~$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUXX8664 12.1.0.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
db2inst1@DESKTOP-F5VOQKN:~$ db2 -tvf test.db2
create schema "my_schema"
DB20000I The SQL command completed successfully.
create table "my_schema"."my_table" ( "id" INT NOT NULL PRIMARY KEY, "text" VARCHAR(32672) )
DB20000I The SQL command completed successfully.
create index "my_table_text" on "my_schema"."my_table" ("text")
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0614N The index or index extension "my_table_text" cannot be created or
altered because the combined length of the specified columns is too long.
SQLSTATE=54008
Error message explanation:
db2inst1@DESKTOP-F5VOQKN:~$ db2 ? sql0614n
SQL0614N The index or index extension "<index-name>" cannot be created
or altered because the combined length of the specified columns is
too long.
Explanation:
The index could not be created or altered because the sum of the key
column internal lengths would exceed the index key length limit. Also,
an index cannot be created using a LONG VARCHAR, LONG VARGRAPHIC, or LOB
column. If the index is defined on a typed table, there is additional
index overhead that reduces the maximum length by 4 bytes. The index may
be altered by an ALTER TABLE or ALTER NICKNAME statement that alters the
data type of one or more columns.
An index extension could not be created because the sum of the columns
returned by the GENERATE KEY function would exceed the index key length
limit.
The index key length limit is based on the page size of the tablespace
used by the index:
Max Key Length Page size
-------------- ---------
1K 4K
2K 8K
4K 16K
8K 32K
The statement cannot be processed. The specified index or index
extension was not created or the table or nickname could not be altered.
User response:
To modify the index definition or alter column, eliminate one or more
key columns and reduce the key length to the permitted maximum. For an
index extension definition, specify a different GENERATE KEY function,
or redefine the function to reduce the length of the returned row.
sqlcode: -614
sqlstate: 54008