You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
[xhe@PC tidb-test]$ cat t5.sh
#!/bin/sh
mycli -h 127.0.0.1 -P 4000 -u root --no-warn << "EOF"
set global tidb_enable_alter_placement=on;
EOF
mycli -h 127.0.0.1 -P 4000 -u root --no-warn << "EOF"
select @@global.tidb_enable_alter_placement;
drop table if exists test.t1;
create table test.t1 (a int) partition by hash(a) partitions 2;
alter table test.t1 alter partition p0 alter placement policy role=leader;
EOF
[xhe@PC tidb-test]$ cat t4.sh
#!/bin/sh
mycli -h 127.0.0.1 -P 4000 -u root --no-warn << "EOF"
select @@global.tidb_enable_alter_placement;
drop table if exists test.t1;
create table test.t1 (a int) partition by hash(a) partitions 2;
alter table test.t1 alter partition p0 alter placement policy role=leader;
EOF
# start a new tiup playground
[xhe@PC tidb-test]$ ./t5.sh
@@global.tidb_enable_alter_placement
1
(1105, 'alter partition alter placement is experimental and it is switched off by tidb_enable_alter_placement')
[xhe@PC tidb-test]$ ./t4.sh
@@global.tidb_enable_alter_placement
1
# start a new tiup playground
[xhe@PC tidb-test]$ ./t5.sh
./@@global.tidb_enable_alter_placement
1
(1105, 'alter partition alter placement is experimental and it is switched off by tidb_enable_alter_placement')
[xhe@PC tidb-test]$ ./t4.sh
@@global.tidb_enable_alter_placement
1
(1105, 'alter partition alter placement is experimental and it is switched off by tidb_enable_alter_placement')
[xhe@PC tidb-test]$ ./t4.sh
@@global.tidb_enable_alter_placement
1
2. What did you expect to see? (Required)
If I see select @@global.tidb_enable_alter_placement == 1, then the command should execute successfully. In another word, the sessionVars of session should be updated.
3. What did you see instead (Required)
An outdated session variable is causing SQL failure.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
If I see
select @@global.tidb_enable_alter_placement == 1
, then the command should execute successfully. In another word, thesessionVars
of session should be updated.3. What did you see instead (Required)
An outdated session variable is causing SQL failure.
4. What is your TiDB version? (Required)
59ccb29, the current/latest master commit.
The text was updated successfully, but these errors were encountered: