Hi, Sergei
In my mind, table->read_set and table->write_set correspond to read and write a
table.
For example:
CREATE TABLE t1 (id INT, name CHAR(10), sex CHAR(10));
INSERT INTO t1(id, sex) VALUES(1, "Man");
write_set will be 5 (00...00101).
SELECT id, name, sex FROM t1;
read_set will be 7 (00...00111).
In other words, they mark which fields would be read and written.
But in "SELECT id, name, sex FROM t1;", storage engine will put some data into
table->field[...] (table->record[0])
by table->field[...]->store(). In field->store(), there is a assertion. However,
the assertion is to test write_set,
instead of read_set. Why? In my mind, write_set works in INSERT, and read_set works in
SELECT.
Or, they have other useful?
Regards,
Robin
| Thread |
|---|
| • Some questions about table->read_set and table->write_set | scut_tang | 28 Jul |