Skip to content

Commit 1ee0144

Browse files
committed
Merge 10.3 into 10.4
2 parents ae2004c + d07a6e3 commit 1ee0144

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (!`SELECT @@aria_used_for_temp_tables`)
2+
{
3+
skip Need Aria to be used for temporary tables;
4+
}

mysql-test/main/information_schema.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
# on the presence of the log tables (which are CSV-based).
99
--source include/have_csv.inc
1010

11+
# Without aria_used_for_temp_tables some I_S tables will be MyISAM,
12+
# while the test expects them to be Aria
13+
-- source include/have_aria_used_for_temp_tables.inc
14+
1115
-- source include/have_innodb.inc
1216

1317
# Save the initial number of concurrent sessions

mysql-test/main/invisible_field_debug.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ a invisible
1717
1 9
1818
insert into t1(a, invisible) values(99,99);
1919
ERROR 42S22: Unknown column 'invisible' in 'field list'
20+
select default(invisible) from t1;
21+
ERROR 42S22: Unknown column 'invisible' in 'field list'
2022
insert into t1(invisible) values(99);
2123
ERROR 42S22: Unknown column 'invisible' in 'field list'
2224
insert into t_tmp select a, invisible from t1;

mysql-test/main/invisible_field_debug.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ select a , invisible from t1;
1313
--error ER_BAD_FIELD_ERROR
1414
insert into t1(a, invisible) values(99,99);
1515
--error ER_BAD_FIELD_ERROR
16+
select default(invisible) from t1;
17+
--error ER_BAD_FIELD_ERROR
1618
insert into t1(invisible) values(99);
1719
insert into t_tmp select a, invisible from t1;
1820
--error ER_WRONG_VALUE_COUNT_ON_ROW

mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# bool readonly
22

3+
--source include/have_aria_used_for_temp_tables.inc
34
--source include/have_maria.inc
45
#
56
# show the global and session values;

mysql-test/suite/sys_vars/t/sysvars_aria.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
--source include/have_aria.inc
2+
--source include/have_aria_used_for_temp_tables.inc
23
--source include/word_size.inc
34

45
--vertical_results

mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
###################### tmp_memory_table_size_func.test ########################
22

3+
--source include/have_aria_used_for_temp_tables.inc
4+
35
--source include/load_sysvars.inc
46
--source include/have_sequence.inc
57

sql/item.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9053,7 +9053,11 @@ bool Item_default_value::fix_fields(THD *thd, Item **items)
90539053
field value (mark column for read)
90549054
*/
90559055
enum_column_usage save_column_usage= thd->column_usage;
9056-
thd->column_usage= COLUMNS_READ;
9056+
/*
9057+
Fields which has defult value could be read, so it is better hide system
9058+
invisible columns.
9059+
*/
9060+
thd->column_usage= COLUMNS_WRITE;
90579061
if (arg->fix_fields_if_needed(thd, &arg))
90589062
{
90599063
thd->column_usage= save_column_usage;

storage/innobase/log/log0recv.cc

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ static void recv_addr_trim(ulint space_id, unsigned pages, lsn_t lsn)
227227
hash_cell_t* const cell = hash_get_nth_cell(
228228
recv_sys->addr_hash, i);
229229
for (recv_addr_t* addr = static_cast<recv_addr_t*>(cell->node),
230-
*prev = NULL, *next;
231-
addr;
232-
prev = addr, addr = next) {
230+
*next;
231+
addr; addr = next) {
233232
next = static_cast<recv_addr_t*>(addr->addr_hash);
234233

235234
if (addr->space != space_id || addr->page_no < pages) {
@@ -251,22 +250,6 @@ static void recv_addr_trim(ulint space_id, unsigned pages, lsn_t lsn)
251250
}
252251
recv = n;
253252
}
254-
255-
if (UT_LIST_GET_LEN(addr->rec_list)) {
256-
DBUG_PRINT("ib_log",
257-
("preserving " ULINTPF
258-
" records for page %u:%u",
259-
UT_LIST_GET_LEN(addr->rec_list),
260-
addr->space, addr->page_no));
261-
} else {
262-
ut_ad(recv_sys->n_addrs);
263-
--recv_sys->n_addrs;
264-
if (addr == cell->node) {
265-
cell->node = next;
266-
} else {
267-
prev->addr_hash = next;
268-
}
269-
}
270253
}
271254
}
272255
if (fil_space_t* space = fil_space_get(space_id)) {
@@ -2022,8 +2005,7 @@ static ulint recv_read_in_area(const page_id_t page_id)
20222005
/** Apply the hash table of stored log records to persistent data pages.
20232006
@param[in] last_batch whether the change buffer merge will be
20242007
performed as part of the operation */
2025-
void
2026-
recv_apply_hashed_log_recs(bool last_batch)
2008+
void recv_apply_hashed_log_recs(bool last_batch)
20272009
{
20282010
ut_ad(srv_operation == SRV_OPERATION_NORMAL
20292011
|| srv_operation == SRV_OPERATION_RESTORE
@@ -2088,7 +2070,8 @@ recv_apply_hashed_log_recs(bool last_batch)
20882070
recv_addr = static_cast<recv_addr_t*>(
20892071
HASH_GET_NEXT(addr_hash, recv_addr))) {
20902072

2091-
if (recv_addr->state == RECV_DISCARDED) {
2073+
if (recv_addr->state == RECV_DISCARDED
2074+
|| !UT_LIST_GET_LEN(recv_addr->rec_list)) {
20922075
ut_a(recv_sys->n_addrs);
20932076
recv_sys->n_addrs--;
20942077
continue;

0 commit comments

Comments
 (0)