iv Using IBM DB2 for i as a Storage Engine of MySQL
3.4.1 Checking the prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.4.2 Installing and configuring the MySQL Database Server on IBM i . . . . . . . . . . . . . 50
3.4.3 Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.4.4 Post installation tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.4.5 Installing the IBMDB2I Storage Engine plug-in component for MySQL . . . . . . . . 63
3.4.6 Common installation and restoration errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.4.7 Uninstalling the MySQL Database Server on IBM i . . . . . . . . . . . . . . . . . . . . . . . 64
3.5 Running additional same-release MySQL instances . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.6 Installing additional MySQL instances of different releases . . . . . . . . . . . . . . . . . . . . . 69
Chapter 4. Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.1 Finding objects in DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.1.1 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.1.2 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.1.3 Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.1.4 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.1.5 Journal and journal receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2 Accessing MySQL data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2.1 Accessing MySQL data with DB2 tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2.2 Accessing MySQL data from RPG using embedded SQL . . . . . . . . . . . . . . . . . . 77
4.2.3 Accessing MySQL data from RPG with native access . . . . . . . . . . . . . . . . . . . . . 78
4.2.4 Accessing MySQL data from Query/400. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.2.5 Use of Copy File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.2.6 Updating MySQL data from CL commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3 DB2 updates of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.1 Renaming tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.2 Altering tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.3 Deleting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.4 Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.5 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.3.6 Triggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 5. Configuration options and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.1 IBMDB2I Storage Engine startup options and system variables. . . . . . . . . . . . . . . . . . 84
5.2 Summary of options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.3 Details of options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.3.1 ibmdb2i_assume_exclusive_use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.3.2 ibmdb2i_async_enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.3.3 ibmdb2i_compat_opt_time_as_duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.3.4 ibmdb2i_rdb_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.3.5 ibmdb2i_lob_alloc_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.3.6 ibmdb2i_max_read_buffer_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.3.7 ibmdb2i_max_write_buffer_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.3.8 ibmdb2i_transaction_unsafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.3.9 ibmdb2i_compat_opt_blob_cols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.3.10 ibmdb2i_create_index_option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.3.11 ibmdb2i_system_trace_level. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.3.12 ibmdb2i_compat_opt_allow_zero_date_vals . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.3.13 ibmdb2i_propagate_default_col_vals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.3.14 ibmdb2i_compat_opt_year_as_int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Chapter 6. Transaction management and locking considerations. . . . . . . . . . . . . . . . 93
6.1 MySQL transaction management and IBMDB2I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.2 Transaction isolation level and locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94