@@ -64,7 +64,7 @@ func TestDMLCapturePlanBaseline(t *testing.T) {
6464 rows := tk .MustQuery ("show global bindings" ).Rows ()
6565 require .Len (t , rows , 0 )
6666
67- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
67+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
6868 tk .MustExec ("delete from t where b = 1 and c > 1" )
6969 tk .MustExec ("delete from t where b = 1 and c > 1" )
7070 tk .MustExec ("update t set a = 1 where b = 1 and c > 1" )
@@ -111,7 +111,7 @@ func TestCapturePlanBaseline(t *testing.T) {
111111 rows := tk .MustQuery ("show global bindings" ).Rows ()
112112 require .Len (t , rows , 0 )
113113
114- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
114+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
115115 tk .MustExec ("select * from t where a > 10" )
116116 tk .MustExec ("select * from t where a > 10" )
117117 tk .MustExec ("admin capture bindings" )
@@ -143,7 +143,7 @@ func TestCapturePlanBaseline4DisabledStatus(t *testing.T) {
143143 rows := tk .MustQuery ("show global bindings" ).Rows ()
144144 require .Len (t , rows , 0 )
145145
146- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
146+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
147147 tk .MustExec ("select * from t where a > 10" )
148148 tk .MustExec ("select * from t where a > 10" )
149149 tk .MustExec ("admin capture bindings" )
@@ -191,7 +191,7 @@ func TestCaptureDBCaseSensitivity(t *testing.T) {
191191 tk .MustExec ("use SPM" )
192192 tk .MustExec ("create table t(a int, b int, key(b))" )
193193 tk .MustExec ("create global binding for select * from t using select /*+ use_index(t) */ * from t" )
194- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
194+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
195195 tk .MustExec ("select /*+ use_index(t,b) */ * from t" )
196196 tk .MustExec ("select /*+ use_index(t,b) */ * from t" )
197197 tk .MustExec ("admin capture bindings" )
@@ -217,7 +217,7 @@ func TestCaptureBaselinesDefaultDB(t *testing.T) {
217217 tk .MustExec ("drop database if exists spm" )
218218 tk .MustExec ("create database spm" )
219219 tk .MustExec ("create table spm.t(a int, index idx_a(a))" )
220- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
220+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
221221 tk .MustExec ("select * from spm.t ignore index(idx_a) where a > 10" )
222222 tk .MustExec ("select * from spm.t ignore index(idx_a) where a > 10" )
223223 tk .MustExec ("admin capture bindings" )
@@ -244,7 +244,7 @@ func TestCapturePreparedStmt(t *testing.T) {
244244 tk := testkit .NewTestKit (t , store )
245245
246246 stmtsummary .StmtSummaryByDigestMap .Clear ()
247- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
247+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
248248 tk .MustExec ("use test" )
249249 tk .MustExec ("drop table if exists t" )
250250 tk .MustExec ("create table t(a int, b int, c int, key idx_b(b), key idx_c(c))" )
@@ -279,7 +279,7 @@ func TestCapturePlanBaselineIgnoreTiFlash(t *testing.T) {
279279 tk .MustExec ("use test" )
280280 tk .MustExec ("drop table if exists t" )
281281 tk .MustExec ("create table t(a int, b int, key(a), key(b))" )
282- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
282+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
283283 tk .MustExec ("select * from t" )
284284 tk .MustExec ("select * from t" )
285285 // Create virtual tiflash replica info.
@@ -354,7 +354,7 @@ func TestBindingSource(t *testing.T) {
354354 tk .MustExec ("SET GLOBAL tidb_capture_plan_baselines = off" )
355355 }()
356356 tk .MustExec ("use test" )
357- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
357+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
358358 tk .MustExec ("select * from t ignore index(idx_a) where a < 10" )
359359 tk .MustExec ("select * from t ignore index(idx_a) where a < 10" )
360360 tk .MustExec ("admin capture bindings" )
@@ -374,7 +374,7 @@ func TestCapturedBindingCharset(t *testing.T) {
374374 tk := testkit .NewTestKit (t , store )
375375
376376 stmtsummary .StmtSummaryByDigestMap .Clear ()
377- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
377+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
378378 tk .MustExec ("use test" )
379379 tk .MustExec ("create table t(name varchar(25), index idx(name))" )
380380
@@ -407,7 +407,7 @@ func TestConcurrentCapture(t *testing.T) {
407407 tk .MustExec ("use test" )
408408 tk .MustExec ("drop table if exists t" )
409409 tk .MustExec ("create table t(a int, b int)" )
410- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
410+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
411411 tk .MustExec ("select * from t" )
412412 tk .MustExec ("select * from t" )
413413 tk .MustExec ("admin capture bindings" )
@@ -427,7 +427,7 @@ func TestUpdateSubqueryCapture(t *testing.T) {
427427 tk .MustExec ("create table t1(a int, b int, c int, key idx_b(b))" )
428428 tk .MustExec ("create table t2(a int, b int)" )
429429 stmtsummary .StmtSummaryByDigestMap .Clear ()
430- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
430+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
431431 tk .MustExec ("update t1 set b = 1 where b = 2 and (a in (select a from t2 where b = 1) or c in (select a from t2 where b = 1))" )
432432 tk .MustExec ("update t1 set b = 1 where b = 2 and (a in (select a from t2 where b = 1) or c in (select a from t2 where b = 1))" )
433433 tk .MustExec ("admin capture bindings" )
@@ -481,7 +481,7 @@ func TestIssue20417(t *testing.T) {
481481 stmtsummary .StmtSummaryByDigestMap .Clear ()
482482 tk .MustExec ("SET GLOBAL tidb_capture_plan_baselines = on" )
483483 dom .BindHandle ().CaptureBaselines ()
484- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
484+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
485485 tk .MustExec ("select * from t where b=2 and c=213124" )
486486 tk .MustExec ("select * from t where b=2 and c=213124" )
487487 tk .MustExec ("admin capture bindings" )
@@ -526,7 +526,7 @@ func TestCaptureWithZeroSlowLogThreshold(t *testing.T) {
526526 tk .MustExec ("drop table if exists t" )
527527 tk .MustExec ("create table t(a int)" )
528528 stmtsummary .StmtSummaryByDigestMap .Clear ()
529- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
529+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
530530 tk .MustExec ("set tidb_slow_log_threshold = 0" )
531531 tk .MustExec ("select * from t" )
532532 tk .MustExec ("select * from t" )
@@ -552,7 +552,7 @@ func TestIssue25505(t *testing.T) {
552552 tk .MustExec ("create table t (a int(11) default null,b int(11) default null,key b (b),key ba (b))" )
553553 tk .MustExec ("create table t1 (a int(11) default null,b int(11) default null,key idx_ab (a,b),key idx_a (a),key idx_b (b))" )
554554 tk .MustExec ("create table t2 (a int(11) default null,b int(11) default null,key idx_ab (a,b),key idx_a (a),key idx_b (b))" )
555- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
555+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
556556
557557 spmMap := map [string ]string {}
558558 spmMap ["with recursive `cte` ( `a` ) as ( select ? union select `a` + ? from `test` . `t1` where `a` < ? ) select * from `cte`" ] =
@@ -619,7 +619,7 @@ func TestCaptureUserFilter(t *testing.T) {
619619 tk .MustExec ("drop table if exists t" )
620620 tk .MustExec ("create table t(a int)" )
621621
622- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
622+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
623623 tk .MustExec ("select * from t where a > 10" )
624624 tk .MustExec ("select * from t where a > 10" )
625625 tk .MustExec ("admin capture bindings" )
@@ -642,7 +642,7 @@ func TestCaptureUserFilter(t *testing.T) {
642642 tk .MustExec (`grant all on *.* to usr1 with grant option` )
643643 tk2 := testkit .NewTestKit (t , store )
644644 tk2 .MustExec ("use test" )
645- require .NoError (t , tk2 .Session ().Auth (& auth.UserIdentity {Username : "usr1" , Hostname : "%" }, nil , nil ))
645+ require .NoError (t , tk2 .Session ().Auth (& auth.UserIdentity {Username : "usr1" , Hostname : "%" }, nil , nil , nil ))
646646 tk2 .MustExec ("select * from t where a > 10" )
647647 tk2 .MustExec ("select * from t where a > 10" )
648648 tk2 .MustExec ("admin capture bindings" )
@@ -707,7 +707,7 @@ func TestCaptureWildcardFilter(t *testing.T) {
707707 tk .MustExec ("SET GLOBAL tidb_capture_plan_baselines = off" )
708708 }()
709709
710- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
710+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
711711 dbs := []string {"db11" , "db12" , "db2" }
712712 tbls := []string {"t11" , "t12" , "t2" }
713713 for _ , db := range dbs {
@@ -813,7 +813,7 @@ func TestCaptureFilter(t *testing.T) {
813813 tk .MustExec ("drop table if exists t" )
814814 tk .MustExec ("create table t(a int)" )
815815
816- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
816+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
817817 tk .MustExec ("select * from t where a > 10" )
818818 tk .MustExec ("select * from t where a > 10" )
819819 tk .MustExec ("admin capture bindings" )
@@ -965,7 +965,7 @@ func TestCaptureHints(t *testing.T) {
965965 tk .MustExec ("use test" )
966966 tk .MustExec ("drop table if exists t" )
967967 tk .MustExec ("create table t(pk int primary key, a int, b int, key(a), key(b))" )
968- require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil ))
968+ require .NoError (t , tk .Session ().Auth (& auth.UserIdentity {Username : "root" , Hostname : "%" }, nil , nil , nil ))
969969
970970 captureCases := []struct {
971971 query string
0 commit comments