mariadb/storage/ibmdb2i
V Narayanan 2e8eb6ce94 Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
With ibmdb2i_create_index_option set to 1, creating an IBMDB2I table
with a primary key should produce an additional index that uses EBCDIC
hexadecimal sorting. However, this does not work. Adding indexes that
are not primary keys does work. The ibmdb2i_create_index_option should
be honoured when creating a table with a primary key.

This patch adds code to the create() function to check for the value
of the ibmdb2i_create_index_option variable and, when appropriate, to 
generate a *HEX-based shadow index in DB2 for the primary key. Previously 
this behavior was limited to secondary indexes.

Additionally, this patch restricts the creation of shadow indexes to
cases in which a non-*HEX sort sequence is used, as the documentation
for ibmdb2i_create_index_option describes. Previously, the shadow index
would in some cases be created even when the MySQL-specific index used
*HEX sorting, leading to redundant indexes.

Finally, the code used to generate the list of fields for indexes 
and the code used to generate the SQL statement for the shadow
indexes has been refactored into individual functions.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Add tests to verify that the ibmdb2i_create_index_option is being honoured
  when creating a table with a primary key.
storage/ibmdb2i/ha_ibmdb2i.cc:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  - Add code to the create() function to check for the value of the
    ibmdb2i_create_index_option variable and, when appropriate, to 
    generate a *HEX-based shadow index in DB2 for the primary key.
  
  - Restrict the creation of shadow indexes to cases in which a
    non-*HEX sort sequence is used.
  
  - Refractor code used to generate the list of fields for indexes
    and the code used to generate the SQL statement for the shadow
    indexes into individual functions.
storage/ibmdb2i/ha_ibmdb2i.h:
  Bug#45983 ibmdb2i_create_index_option=1 not working for primary key
  
  Add function prototypes for the functions that.
  
  - Generate the list of fields for indexes
  - Generate the SQL statement for the shadow
    indexes
2009-07-08 14:40:01 +05:30
..
CMakeLists.txt
db2i_blobCollection.cc
db2i_blobCollection.h
db2i_charsetSupport.cc
db2i_charsetSupport.h
db2i_collationSupport.cc
db2i_collationSupport.h
db2i_constraints.cc
db2i_conversion.cc
db2i_errors.cc
db2i_errors.h
db2i_file.cc
db2i_file.h
db2i_global.h
db2i_iconv.h
db2i_ileBridge.cc
db2i_ileBridge.h
db2i_ioBuffers.cc
db2i_ioBuffers.h
db2i_misc.h
db2i_myconv.cc
db2i_myconv.h
db2i_rir.cc
db2i_safeString.h
db2i_sqlStatementStream.cc
db2i_sqlStatementStream.h
db2i_validatedPointer.h
ha_ibmdb2i.cc Bug#45983 ibmdb2i_create_index_option=1 not working for primary key 2009-07-08 14:40:01 +05:30
ha_ibmdb2i.h Bug#45983 ibmdb2i_create_index_option=1 not working for primary key 2009-07-08 14:40:01 +05:30
Makefile.am
plug.in