• unknown's avatar
    Fix bug #3443, better foreign key error messsages. · e4b0b0d0
    unknown authored
    
    innobase/dict/dict0dict.c:
      Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format.
    innobase/include/dict0dict.h:
      Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format.
    innobase/include/os0file.h:
      Add os_file_read_string.
    innobase/include/trx0trx.h:
      Add trx_set_detailed_error and trx_set_detailed_error_from_file functions
      and a detailed_error field to trx_struct.
    innobase/include/ut0mem.h:
      Add ut_strlcpy.
    innobase/os/os0file.c:
      Add os_file_read_string.
    innobase/row/row0ins.c:
      Add row_ins_set_detailed function and call it when needed.
      
      Adapt to changes in dict_print_info_on_foreign_key_in_create_format.
    innobase/trx/trx0trx.c:
      Add trx_set_detailed_error and trx_set_detailed_error_from_file.
      
      Clear trx->detailed_error in trx_create.
    innobase/ut/ut0mem.c:
      Add ut_strlcpy.
    mysql-test/r/innodb.result:
      Add new tests, adapt existing ones whose output was changed.
    mysql-test/t/innodb.test:
      Add new tests, adapt existing ones whose output was changed.
    sql/ha_innodb.cc:
      Add get_error_message.
      
      Clear trx->detailed_error in start_stmt and external_lock.
    sql/ha_innodb.h:
      Add get_error_message.
    sql/handler.cc:
      Add special case code in print_error for HA_ERR_ROW_IS_REFERENCED and
      HA_ERR_NO_REFERENCED_ROW.
      
      Change SETMSG to point to new error messages.
    sql/share/errmsg.txt:
      Add ER_ROW_IS_REFERENCED_2 and ER_NO_REFERENCED_ROW_2.
    e4b0b0d0
trx0trx.h 26.7 KB