From fec844aca88e1c6b9c36bb0b811e92d9d023ffb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 6 Sep 2016 09:43:16 +0300 Subject: Merge InnoDB 5.7 from mysql-5.7.14. Contains also: MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan) Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) enable tests that were fixed in MDEV-10549 MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables --- storage/innobase/include/row0mysql.h | 72 +++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 18 deletions(-) (limited to 'storage/innobase/include/row0mysql.h') diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 5b195734be9..2d508c1a7df 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -130,7 +130,7 @@ row_mysql_read_geometry( MySQL format */ ulint col_len) /*!< in: BLOB reference length (not BLOB length) */ - __attribute__((nonnull(1,2), warn_unused_result)); + MY_ATTRIBUTE((nonnull(1,2), warn_unused_result)); /**************************************************************//** Pad a column with spaces. */ void @@ -229,6 +229,7 @@ row_lock_table_autoinc_for_mysql( row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in the MySQL table handle */ MY_ATTRIBUTE((nonnull, warn_unused_result)); + /*********************************************************************//** Sets a table lock on the table mentioned in prebuilt. @return error code or DB_SUCCESS */ @@ -253,7 +254,7 @@ dberr_t row_insert_for_mysql( const byte* mysql_rec, row_prebuilt_t* prebuilt) - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Builds a dummy query graph used in selects. */ @@ -289,7 +290,7 @@ dberr_t row_update_for_mysql( const byte* mysql_rec, row_prebuilt_t* prebuilt) - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /** Delete all rows for the given table by freeing/truncating indexes. @param[in,out] table table handler @@ -297,7 +298,7 @@ row_update_for_mysql( dberr_t row_delete_all_rows( dict_table_t* table) - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /** This can only be used when srv_locks_unsafe_for_binlog is TRUE or this session is using a READ COMMITTED or READ UNCOMMITTED isolation level. @@ -381,13 +382,14 @@ row_create_table_for_mysql( dict_table_t* table, /*!< in, own: table definition (will be freed, or on DB_SUCCESS added to the data dictionary cache) */ - const char* compression, - /*!< in: compression algorithm to use, - can be NULL */ + const char* compression, + /*!< in: compression algorithm to use, + can be NULL */ trx_t* trx, /*!< in/out: transaction */ bool commit, /*!< in: if true, commit the transaction */ fil_encryption_t mode, /*!< in: encryption mode */ - ulint key_id);/*!< in: encryption key_id */ + ulint key_id) /*!< in: encryption key_id */ + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Does an index creation operation for MySQL. TODO: currently failure @@ -407,7 +409,7 @@ row_create_index_for_mysql( then checked for not being too large. */ dict_table_t* handler) /* ! in/out: table handler. */ - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function @@ -438,7 +440,7 @@ row_table_add_foreign_constraints( size_t sql_length, const char* name, ibool reject_fks) - __attribute__((warn_unused_result)); + MY_ATTRIBUTE((warn_unused_result)); /*********************************************************************//** The master thread in srv0srv.cc calls this regularly to drop tables which @@ -489,8 +491,8 @@ row_drop_table_for_mysql( trx_t* trx, /*!< in: dictionary transaction handle */ bool drop_db,/*!< in: true=dropping whole database */ ibool create_failed,/*!vc_templ. +@param[in,out] table the table whose virtual column template +dbname and tbname to be renamed. */ +void +innobase_rename_vc_templ( + dict_table_t* table); #define ROW_PREBUILT_FETCH_MAGIC_N 465765687 @@ -964,4 +994,10 @@ innobase_get_computed_value( #include "row0mysql.ic" #endif +#ifdef UNIV_DEBUG +/** Wait for the background drop list to become empty. */ +void +row_wait_for_background_drop_list_empty(); +#endif /* UNIV_DEBUG */ + #endif /* row0mysql.h */ -- cgit v1.2.1