*** Bug #41870 ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY, 
myblob LONGBLOB
);

** Load BLOB data into table

INSERT INTO t1 (myblob) VALUES (repeat('a', 1*1024*1024));
SELECT pk, LENGTH(myblob) FROM t1;
pk	LENGTH(myblob)
1	1048576
** Recording initial size of falcon_user.fts tablespace file

** Verify that falcon_scavenge_schedule is as expected:

SHOW VARIABLES LIKE '%falcon_scavenge_schedule%';
Variable_name	Value
falcon_scavenge_schedule	1,6,11,16,21,26,31,36,41,46,51,56 * * * * *

** Updating BLOB data 50 times

50 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
49 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
48 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
47 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
46 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
45 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
44 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
43 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
42 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
41 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
40 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
39 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
38 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
37 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
36 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
35 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
34 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
33 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
32 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
31 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
30 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
29 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
28 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
27 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
26 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
25 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
24 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
23 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
22 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
21 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
20 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
19 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
18 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
17 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
16 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
15 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
14 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
13 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
12 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
11 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
10 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
9 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
8 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
7 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
6 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
5 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
4 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
3 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
2 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;
1 updates left
UPDATE t1 SET myblob = (repeat('b', 1*1024*1024)) WHERE pk = 1;

** Checking file size of default tablespace file (falcon_user.fts)...
** Tablespace growth threshold: 52428800 bytes
** File size growth below test threshold. Test OK.

** Final checks and cleanup...

SELECT count(*) FROM t1;
count(*)
1
SELECT pk, LENGTH(myblob) FROM t1;
pk	LENGTH(myblob)
1	1048576
DROP TABLE t1;
