--source include/have_debug.inc --source include/count_sessions.inc --source include/have_innodb_max_16k.inc --echo # --echo # Bug #27624990 ASSERTION `FALSE' FAILED AT BOOL WRAPPER_TO_STRING() IN SQL/JSON_DOM.CC --echo # --echo # --echo # Scenario 1: The row format is DYNAMIC (no blob prefix). The READ --echo # UNCOMMITTED transaction will see the new value of column f1 but --echo # old value of column f2. --echo # create table t1 (f1 int, f2 longblob) row_format=dynamic; show create table t1; insert into t1 values (1, repeat('x', 40000)); SET DEBUG_SYNC = 'blob_write_middle SIGNAL do_select WAIT_FOR continue_insert'; --send update t1 set f1 = 2, f2 = repeat('y', 100000) where f1 = 1; connect (con1,localhost,root,,); SET DEBUG_SYNC = 'now WAIT_FOR do_select'; SET SESSION transaction_isolation = 'READ-UNCOMMITTED'; begin; select f1, f2 from t1; commit; SET DEBUG_SYNC = 'now SIGNAL continue_insert'; connection default; --reap disconnect con1; drop table t1; --source include/wait_until_count_sessions.inc --echo # --echo # Scenario 2: The row format is REDUNDANT (no blob prefix). The READ --echo # UNCOMMITTED transaction will see only the local prefix of f2. --echo # create table t1 (f1 int primary key, f2 longblob) row_format=redundant; show create table t1; insert into t1 values (1, repeat('x', 40000)); SET DEBUG_SYNC = 'blob_write_middle SIGNAL do_select WAIT_FOR continue_insert EXECUTE 2'; --send update t1 set f2 = repeat('y', 100000) where f1 = 1; connect (con1,localhost,root,,); SET DEBUG_SYNC = 'now WAIT_FOR do_select'; SET DEBUG_SYNC = 'now SIGNAL continue_insert'; SET DEBUG_SYNC = 'now WAIT_FOR do_select'; SET SESSION transaction_isolation = 'READ-UNCOMMITTED'; begin; select length(f2) from t1 where f1 = 1; commit; SET DEBUG_SYNC = 'now SIGNAL continue_insert'; connection default; --reap disconnect con1; drop table t1; --source include/wait_until_count_sessions.inc --echo # --echo # Scenario 3: The row format is REDUNDANT (no blob prefix). The READ --echo # UNCOMMITTED transaction will see the local prefix of new blob and --echo # the external part of the old blob. --echo # create table t1 (f1 int primary key, f2 longblob) row_format=redundant; show create table t1; insert into t1 values (1, repeat('x', 40000)); SET DEBUG_SYNC = 'blob_write_middle SIGNAL do_select WAIT_FOR continue_insert'; --send update t1 set f2 = repeat('y', 100000) where f1 = 1; connect (con1,localhost,root,,); SET DEBUG_SYNC = 'now WAIT_FOR do_select'; SET SESSION transaction_isolation = 'READ-UNCOMMITTED'; begin; select f2 from t1 where f1 = 1; commit; SET DEBUG_SYNC = 'now SIGNAL continue_insert'; connection default; --reap disconnect con1; drop table t1; --source include/wait_until_count_sessions.inc --echo # --echo # Scenario 4: The row format is REDUNDANT (no blob prefix). --echo # The READ UNCOMMITTED transaction will see the local prefix --echo # of new blob and external part of old blob. It is different --echo # from Scenario 3 because this involves blob operation code --echo # OPCODE_INSERT_UPDATE. --echo # create table t1 (f1 int primary key, f2 longblob) row_format=redundant; show create table t1; start transaction; insert into t1 values (1, repeat('x', 40000)); delete from t1 where f1 = 1; SET DEBUG_SYNC = 'blob_write_middle SIGNAL do_select WAIT_FOR continue_insert'; --send insert into t1 values (1, repeat('y', 40000)); connect (con1,localhost,root,,); SET DEBUG_SYNC = 'now WAIT_FOR do_select'; SET SESSION transaction_isolation = 'READ-UNCOMMITTED'; begin; select f2 from t1 where f1 = 1; commit; SET DEBUG_SYNC = 'now SIGNAL continue_insert'; connection default; --reap commit; disconnect con1; drop table t1; --source include/wait_until_count_sessions.inc