Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions mysql-test/suite/vcol/r/vcol_misc.result
Original file line number Diff line number Diff line change
Expand Up @@ -591,3 +591,21 @@ DROP TABLE t;
#
# End of 10.5 tests
#
#
# MDEV-28610 Assertion `marked_for_read()' failed upon range select with virtual column in index
#
CREATE TABLE t (
a INT UNSIGNED NOT NULL DEFAULT 0,
b INT AS (a) VIRTUAL,
c TIME,
d INT,
e DATE,
f VARCHAR(1024),
PRIMARY KEY(c),
KEY(c,b,d,f(64))
);
INSERT INTO t (c) VALUES ('00:00:00'),('00:00:04');
SELECT c FROM t WHERE c BETWEEN '00:00:00' AND '00:00:00' ORDER BY d;
c
00:00:00
DROP TABLE t;
20 changes: 20 additions & 0 deletions mysql-test/suite/vcol/t/vcol_misc.test
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,23 @@ DROP TABLE t;
--echo #
--echo # End of 10.5 tests
--echo #

--echo #
--echo # MDEV-28610 Assertion `marked_for_read()' failed upon range select with virtual column in index
--echo #

CREATE TABLE t (
a INT UNSIGNED NOT NULL DEFAULT 0,
b INT AS (a) VIRTUAL,
c TIME,
d INT,
e DATE,
f VARCHAR(1024),
PRIMARY KEY(c),
KEY(c,b,d,f(64))
);
INSERT INTO t (c) VALUES ('00:00:00'),('00:00:04');
SELECT c FROM t WHERE c BETWEEN '00:00:00' AND '00:00:00' ORDER BY d;

# Cleanup
DROP TABLE t;
2 changes: 1 addition & 1 deletion sql/sql_select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32822,7 +32822,7 @@ void JOIN::init_join_cache_and_keyread()
tuple.
*/
if (!(table->file->index_flags(table->file->keyread, 0, 1) & HA_CLUSTERED_INDEX))
table->mark_index_columns(table->file->keyread, table->read_set);
table->mark_index_columns_for_read(table->file->keyread);
}
bool init_for_explain= false;

Expand Down
2 changes: 1 addition & 1 deletion sql/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7664,7 +7664,7 @@ inline void TABLE::mark_index_columns_no_reset(uint index, MY_BITMAP *bitmap)
}


inline void TABLE::mark_index_columns_for_read(uint index)
void TABLE::mark_index_columns_for_read(uint index)
{
do_mark_index_columns(this, index, read_set, true);
}
Expand Down