diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-27 21:05:16 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-27 21:05:16 +0200 |
commit | da34c7de5dacac85c4dc1f714bcd7edf3b7fe5f9 (patch) | |
tree | a778bf78d1b0d503b91ad734cd622202f36e5da2 /storage/innobase/row | |
parent | 5883c6905b5345be55f3c1a1efbd741bb697b115 (diff) | |
download | mariadb-git-da34c7de5dacac85c4dc1f714bcd7edf3b7fe5f9.tar.gz |
5.6.42
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0import.cc | 19 | ||||
-rw-r--r-- | storage/innobase/row/row0merge.cc | 17 | ||||
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 3 | ||||
-rw-r--r-- | storage/innobase/row/row0sel.cc | 4 |
4 files changed, 34 insertions, 9 deletions
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index cd3f88c240e..c4f6eed4aad 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1337,11 +1337,20 @@ row_import::match_schema( /* Do some simple checks. */ if (m_flags != m_table->flags) { - ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH, - "Table flags don't match, server table has 0x%lx " - "and the meta-data file has 0x%lx", - (ulong) m_table->n_cols, (ulong) m_flags); - + if (dict_tf_to_row_format_string(m_flags) != + dict_tf_to_row_format_string(m_table->flags)) { + ib_errf(thd, IB_LOG_LEVEL_ERROR, + ER_TABLE_SCHEMA_MISMATCH, + "Table flags don't match," + "server table has %s " + "and the meta-data file has %s", + dict_tf_to_row_format_string(m_table->flags), + dict_tf_to_row_format_string(m_flags)); + } else { + ib_errf(thd, IB_LOG_LEVEL_ERROR, + ER_TABLE_SCHEMA_MISMATCH, + "Table flags don't match"); + } return(DB_ERROR); } else if (m_table->n_cols != m_n_cols) { ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH, diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 4a6fb763da6..002700a592c 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -3116,15 +3116,27 @@ row_merge_file_create_low( const char* path) { int fd; + char filename[] = "Innodb Merge Temp File\0"; + char* filepath = NULL; + int path_len; + if (path == NULL) { + path = innobase_mysql_tmpdir(); + } #ifdef UNIV_PFS_IO /* This temp file open does not go through normal file APIs, add instrumentation to register with performance schema */ + path_len = strlen(path) + sizeof "/" + strlen(filename)+1; + filepath = static_cast<char*>(mem_alloc(path_len)); + memcpy(filepath,path,strlen(path)); + ut_snprintf(filepath + strlen(path),path_len - strlen(path), + "%c%s",'/',filename); struct PSI_file_locker* locker = NULL; + PSI_file_locker_state state; locker = PSI_FILE_CALL(get_thread_file_name_locker)( &state, innodb_file_temp_key, PSI_FILE_OPEN, - "Innodb Merge Temp File", &locker); + filepath, &locker); if (locker != NULL) { PSI_FILE_CALL(start_file_open_wait)(locker, __FILE__, @@ -3137,6 +3149,7 @@ row_merge_file_create_low( PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)( locker, fd); } + mem_free(filepath); #endif if (fd < 0) { diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index cfd640ed4d5..3782d815e9e 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -5066,6 +5066,9 @@ row_rename_table_for_mysql( " = TO_BINARY(:old_table_name);\n" "END;\n" , FALSE, trx); + if (err != DB_SUCCESS) { + goto end; + } } else if (n_constraints_to_drop > 0) { /* Drop some constraints of tmp tables. */ diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 706b5436981..8c61e959a4d 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2018, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -4368,7 +4368,7 @@ rec_loop: passed to InnoDB when there is no ICP and number of loops in row_search_for_mysql for rows found but not reporting due to search views etc. */ - if (prev_rec != NULL + if (prev_rec != NULL && !prebuilt->innodb_api && prebuilt->mysql_handler->end_range != NULL && prebuilt->idx_cond == NULL && end_loop >= 100) { |