This repository was archived by the owner on Aug 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
mysql-test/suite/sysschema Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ # Reset the sys.sys_config table
2+
3+ # Note, we can *not* reset the set_by column back to NULL
4+ # as the sys.sys_config_update_set_user trigger will overwrite it to the current user
5+ UPDATE sys .sys_config SET value = 64 WHERE variable = ' statement_truncate_len' ;
6+
7+ DELETE FROM sys .sys_config WHERE variable NOT IN (' statement_truncate_len' );
Original file line number Diff line number Diff line change 1+ DESC sys.sys_config;
2+ Field Type Null Key Default Extra
3+ variable varchar(128) NO PRI NULL
4+ value varchar(128) YES NULL
5+ set_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
6+ set_by varchar(128) YES NULL
7+ SELECT variable, value, set_by FROM sys.sys_config;
8+ variable value set_by
9+ statement_truncate_len 64 NULL
10+ UPDATE sys.sys_config SET value = 128 WHERE variable = 'statement_truncate_len';
11+ SELECT variable, value, set_by FROM sys.sys_config;
12+ variable value set_by
13+ statement_truncate_len 128 root@localhost
14+ INSERT INTO sys.sys_config (variable, value) VALUES ('foo', 'bar');
15+ SELECT variable, value, set_by FROM sys.sys_config;
16+ variable value set_by
17+ foo bar root@localhost
18+ statement_truncate_len 128 root@localhost
19+ UPDATE sys.sys_config SET value = 64 WHERE variable = 'statement_truncate_len';
20+ DELETE FROM sys.sys_config WHERE variable NOT IN ('statement_truncate_len');
Original file line number Diff line number Diff line change 1+ # Tests for sys schema
2+ # Verify the sys.sys_config table is as expected
3+
4+ DESC sys.sys_config;
5+
6+ SELECT variable, value, set_by FROM sys.sys_config;
7+
8+ # Ensure the sys.sys_config_update_set_user trigger functions correctly
9+ UPDATE sys.sys_config SET value = 128 WHERE variable = 'statement_truncate_len';
10+
11+ SELECT variable, value, set_by FROM sys.sys_config;
12+
13+ # Ensure the sys.sys_config_insert_set_user trigger functions correctly
14+ INSERT INTO sys.sys_config (variable, value) VALUES ('foo', 'bar');
15+
16+ SELECT variable, value, set_by FROM sys.sys_config;
17+
18+ --source ../include/sys_config_cleanup.inc
You can’t perform that action at this time.
0 commit comments