| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
|
| 7 |
Assert bounds of ndb_replica_blob_write_batch_bytes |
| 8 |
|
| 9 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = -1; |
| 10 |
Warnings: |
| 11 |
Warning 1292 Truncated incorrect ndb_replica_blob_write_batch_bytes value: '-1' |
| 12 |
show variables like 'ndb_replica_blob_write_batch_bytes'; |
| 13 |
Variable_name Value |
| 14 |
ndb_replica_blob_write_batch_bytes 0 |
| 15 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = 2 * 1024 * 1024 * 1024 + 1; |
| 16 |
Warnings: |
| 17 |
Warning 1292 Truncated incorrect ndb_replica_blob_write_batch_bytes value: '2147483649' |
| 18 |
show variables like 'ndb_replica_blob_write_batch_bytes'; |
| 19 |
Variable_name Value |
| 20 |
ndb_replica_blob_write_batch_bytes 2147483648 |
| 21 |
set @@SESSION.ndb_replica_blob_write_batch_bytes = 32768; |
| 22 |
ERROR HY000: Variable 'ndb_replica_blob_write_batch_bytes' is a GLOBAL variable and should be set with SET GLOBAL |
| 23 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = DEFAULT; |
| 24 |
show variables like 'ndb_replica_blob_write_batch_bytes'; |
| 25 |
Variable_name Value |
| 26 |
ndb_replica_blob_write_batch_bytes 2097152 |
| 27 |
|
| 28 |
set global replica_allow_batching = ON; |
| 29 |
set ndb_blob_write_batch_bytes = DEFAULT; |
| 30 |
set ndb_blob_read_batch_bytes = DEFAULT; |
| 31 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = 512; |
| 32 |
show global variables like 'ndb_replica_blob_write_batch_bytes'; |
| 33 |
Variable_name Value |
| 34 |
ndb_replica_blob_write_batch_bytes 512 |
| 35 |
set global ndb_log_update_as_write = ON; |
| 36 |
create table t1 (a int primary key, b blob) engine=ndb; |
| 37 |
create table t2 (a int primary key, b blob) engine=ndb; |
| 38 |
|
| 39 |
Bulk insert (~1MB) and update with low batch size |
| 40 |
|
| 41 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = 4 * 1024 * 1024; |
| 42 |
show global variables like 'ndb_replica_blob_write_batch_bytes'; |
| 43 |
Variable_name Value |
| 44 |
ndb_replica_blob_write_batch_bytes 4194304 |
| 45 |
|
| 46 |
Bulk insert (~1MB) and update with higher batch size |
| 47 |
|
| 48 |
Observe that the number of execute() decrease significantly while PK ops are maintained. |
| 49 |
Execute() calls should have decreased by, at least, a factor of 8. |
| 50 |
SELECT @high_batch_exec_count < @low_batch_exec_count AS 'Large batch size execute calls are less'; |
| 51 |
Large batch size execute calls are less |
| 52 |
1 |
| 53 |
SELECT @high_batch_pk_op_count = @low_batch_pk_op_count AS 'Same PK ops'; |
| 54 |
Same PK ops |
| 55 |
1 |
| 56 |
SELECT @low_batch_exec_count / @high_batch_exec_count >= 8 AS 'Factor of at least >= 8 for large batch'; |
| 57 |
Factor of at least >= 8 for large batch |
| 58 |
1 |
| 59 |
Cleanup |
| 60 |
set @@GLOBAL.ndb_log_update_as_write = ON; |
| 61 |
drop table t1; |
| 62 |
drop table t2; |
| 63 |
set @@GLOBAL.ndb_replica_blob_write_batch_bytes = DEFAULT; |
| 64 |
set @@GLOBAL.replica_allow_batching = ON; |
| 65 |
include/rpl_end.inc |