| 1 |
## Test to verifies compression level ajustment on the server side |
| 2 |
# |
| 3 |
|
| 4 |
--source include/xplugin_preamble.inc |
| 5 |
--source include/xplugin_create_user.inc |
| 6 |
|
| 7 |
--source ../include/compression_level_adjustment_common.inc |
| 8 |
|
| 9 |
# LZ4_MESSAGE algorithm |
| 10 |
#default level |
| 11 |
SET GLOBAL mysqlx_lz4_default_compression_level=4; |
| 12 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=16; |
| 13 |
exec $MYSQLXTEST -ux_root --password='' --compression-mode=required |
| 14 |
--compression-algorithm=LZ4_MESSAGE |
| 15 |
-v%EXPECT_LEVEL%=4 |
| 16 |
--file=$MYSQL_TMP_DIR/compression_level_adjustment.xpl 2>&1; |
| 17 |
|
| 18 |
#min level |
| 19 |
SET GLOBAL mysqlx_lz4_default_compression_level=4; |
| 20 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=16; |
| 21 |
exec $MYSQLXTEST -ux_root --password='' --compression-mode=required |
| 22 |
--compression-algorithm=LZ4_MESSAGE |
| 23 |
--compression-level=-100 |
| 24 |
-v%EXPECT_LEVEL%=0 |
| 25 |
--file=$MYSQL_TMP_DIR/compression_level_adjustment.xpl 2>&1; |
| 26 |
|
| 27 |
#max default level |
| 28 |
SET GLOBAL mysqlx_lz4_default_compression_level=4; |
| 29 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=DEFAULT; |
| 30 |
exec $MYSQLXTEST -ux_root --password='' --compression-mode=required |
| 31 |
--compression-algorithm=LZ4_MESSAGE |
| 32 |
--compression-level=100 |
| 33 |
-v%EXPECT_LEVEL%=8 |
| 34 |
--file=$MYSQL_TMP_DIR/compression_level_adjustment.xpl 2>&1; |
| 35 |
|
| 36 |
#max level |
| 37 |
SET GLOBAL mysqlx_lz4_default_compression_level=4; |
| 38 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=16; |
| 39 |
exec $MYSQLXTEST -ux_root --password='' --compression-mode=required |
| 40 |
--compression-algorithm=LZ4_MESSAGE |
| 41 |
--compression-level=100 |
| 42 |
-v%EXPECT_LEVEL%=16 |
| 43 |
--file=$MYSQL_TMP_DIR/compression_level_adjustment.xpl 2>&1; |
| 44 |
|
| 45 |
#default level adjusted to max |
| 46 |
SET GLOBAL mysqlx_lz4_default_compression_level=4; |
| 47 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=3; |
| 48 |
exec $MYSQLXTEST -ux_root --password='' --compression-mode=required |
| 49 |
--compression-algorithm=LZ4_MESSAGE |
| 50 |
-v%EXPECT_LEVEL%=3 |
| 51 |
--file=$MYSQL_TMP_DIR/compression_level_adjustment.xpl 2>&1; |
| 52 |
|
| 53 |
|
| 54 |
## Cleanup |
| 55 |
SET GLOBAL mysqlx_lz4_max_client_compression_level=DEFAULT; |
| 56 |
SET GLOBAL mysqlx_lz4_default_compression_level=DEFAULT; |
| 57 |
SET GLOBAL mysqlx_compression_algorithms=DEFAULT; |
| 58 |
|
| 59 |
--source ../include/xplugin_cleanup.inc |