Commit 99fa7c6c authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.2 into 10.3

parents 2898c7ec b4c5e4a7
......@@ -1335,11 +1335,17 @@ UPDATE t6 SET b = "updated by client 2";
SELECT * FROM t6;
a b aa bb
1 inserted by client 1 1 inserted by client 1
2 updated by client 2 2 inserted by client 1
2 inserted by client 1 2 inserted by client 1
3 inserted by client 1 3 inserted by client 1
4 updated by client 2 4 inserted by client 1
5 updated by client 2 NULL NULL
10 updated by client 2 1 inserted by client 1
SELECT * FROM t6 LOCK IN SHARE MODE;
a b aa bb
2 updated by client 2 2 inserted by client 1
4 updated by client 2 4 inserted by client 1
5 updated by client 2 NULL NULL
10 updated by client 2 1 inserted by client 1
SELECT COUNT(*) FROM t6;
COUNT(*)
6
......
......@@ -1701,7 +1701,7 @@ variable_value - @innodb_rows_inserted_orig
964
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
866
865
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
variable_value - @innodb_row_lock_waits_orig
0
......
......@@ -301,6 +301,7 @@ SELECT COUNT(*) FROM t5;
UPDATE t6 SET b = "updated by client 2";
SELECT * FROM t6;
SELECT * FROM t6 LOCK IN SHARE MODE;
SELECT COUNT(*) FROM t6;
DELETE FROM t7;
......
......@@ -1417,12 +1417,13 @@ dict_check_sys_tables(
continue;
}
/* If the table is not a predefined tablespace then it must
be in a file-per-table tablespace.
Note that flags2 is not available for REDUNDANT tables,
so don't check those. */
ut_ad(!DICT_TF_GET_COMPACT(flags)
|| flags2 & DICT_TF2_USE_FILE_PER_TABLE);
/* For tables or partitions using .ibd files, the flag
DICT_TF2_USE_FILE_PER_TABLE was not set in MIX_LEN
before MySQL 5.6.5. The flag should not have been
introduced in persistent storage. MariaDB will keep
setting the flag when writing SYS_TABLES entries for
newly created or rebuilt tables or partitions, but
will otherwise ignore the flag. */
/* Now that we have the proper name for this tablespace,
look to see if it is already in the tablespace cache. */
......
......@@ -3620,7 +3620,6 @@ innobase_init(
int err;
char *default_path;
ulong num_pll_degree;
ulint srv_buf_pool_size_org = 0;
DBUG_ENTER("innobase_init");
handlerton* innobase_hton= (handlerton*) p;
......@@ -4128,31 +4127,9 @@ innobase_init(
mysql_cond_register("innodb", all_innodb_conds, count);
#endif /* HAVE_PSI_INTERFACE */
/* Set buffer pool size to default for fast startup when mysqld is
run with --help --verbose options. */
/* JAN: TODO: MySQL 5.7 has opt_verbose
if (opt_help && opt_verbose
&& srv_buf_pool_size > srv_buf_pool_def_size) {
ib::warn() << "Setting innodb_buf_pool_size to "
<< srv_buf_pool_def_size << " for fast startup, "
<< "when running with --help --verbose options.";
srv_buf_pool_size_org = srv_buf_pool_size;
srv_buf_pool_size = srv_buf_pool_def_size;
}
*/
err = innobase_start_or_create_for_mysql();
if (srv_buf_pool_size_org != 0) {
/* Set the original value back to show in help. */
srv_buf_pool_size_org =
buf_pool_size_align(srv_buf_pool_size_org);
innobase_buffer_pool_size =
static_cast<long long>(srv_buf_pool_size_org);
} else {
innobase_buffer_pool_size =
static_cast<long long>(srv_buf_pool_size);
}
innobase_buffer_pool_size = static_cast<long long>(srv_buf_pool_size);
if (err != DB_SUCCESS) {
innodb_shutdown();
......@@ -8822,7 +8799,13 @@ ha_innobase::update_row(
goto func_exit;
}
{
if (!uvect->n_fields) {
/* This is the same as success, but instructs
MySQL that the row is not really updated and it
should not increase the count of updated rows.
This is fix for http://bugs.mysql.com/29157 */
DBUG_RETURN(HA_ERR_RECORD_IS_THE_SAME);
} else {
const bool vers_set_fields = m_prebuilt->versioned_write
&& m_prebuilt->upd_node->update->affects_versioned();
const bool vers_ins_row = vers_set_fields
......@@ -8879,20 +8862,12 @@ ha_innobase::update_row(
innobase_srv_conc_exit_innodb(m_prebuilt);
func_exit:
err = convert_error_code_to_mysql(
error, m_prebuilt->table->flags, m_user_thd);
/* If success and no columns were updated. */
if (err == 0 && uvect->n_fields == 0) {
/* This is the same as success, but instructs
MySQL that the row is not really updated and it
should not increase the count of updated rows.
This is fix for http://bugs.mysql.com/29157 */
err = HA_ERR_RECORD_IS_THE_SAME;
} else if (err == HA_FTS_INVALID_DOCID) {
if (error == DB_FTS_INVALID_DOCID) {
err = HA_FTS_INVALID_DOCID;
my_error(HA_FTS_INVALID_DOCID, MYF(0));
} else {
err = convert_error_code_to_mysql(
error, m_prebuilt->table->flags, m_user_thd);
}
/* Tell InnoDB server that there might be work for
......
......@@ -1450,16 +1450,8 @@ bool
dict_table_is_file_per_table(
const dict_table_t* table) /*!< in: table to check */
{
bool is_file_per_table = table->space != fil_system.sys_space
return table->space != fil_system.sys_space
&& table->space != fil_system.temp_space;
/* If the table is file-per-table and it is not redundant, then
it should have the flags2 bit for DICT_TF2_USE_FILE_PER_TABLE. */
ut_ad(!is_file_per_table
|| !DICT_TF_GET_COMPACT(table->flags)
|| DICT_TF2_FLAG_IS_SET(table, DICT_TF2_USE_FILE_PER_TABLE));
return(is_file_per_table);
}
/** Get reference count.
......
......@@ -2104,6 +2104,9 @@ logs_empty_and_mark_files_at_shutdown(void)
goto loop;
}
/* Ensure that all buffered changes are written to the
redo log before fil_close_all_files(). */
fil_flush_file_spaces(FIL_TYPE_LOG);
} else {
lsn = srv_start_lsn;
}
......
......@@ -108,11 +108,6 @@ Created 2/16/1996 Heikki Tuuri
#include "btr0scrub.h"
#include "ut0new.h"
#ifdef HAVE_LZO1X
#include <lzo/lzo1x.h>
extern bool srv_lzo_disabled;
#endif /* HAVE_LZO1X */
/** Log sequence number immediately after startup */
lsn_t srv_start_lsn;
/** Log sequence number at shutdown */
......@@ -1492,16 +1487,6 @@ innobase_start_or_create_for_mysql()
srv_use_doublewrite_buf = FALSE;
}
#ifdef HAVE_LZO1X
if (lzo_init() != LZO_E_OK) {
ib::warn() << "lzo_init() failed, support disabled";
srv_lzo_disabled = true;
} else {
ib::info() << "LZO1X support available";
srv_lzo_disabled = false;
}
#endif /* HAVE_LZO1X */
compile_time_assert(sizeof(ulint) == sizeof(void*));
#ifdef UNIV_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment