@@ -1856,19 +1856,6 @@ func (ses *Session) InitGlobalSystemVariables() error {
18561856 pu := ses .GetParameterUnit ()
18571857 mp := ses .GetMemPool ()
18581858
1859- updateSqls := ses .getUpdateVariableSqlsByToml ()
1860- for _ , sql := range updateSqls {
1861- _ , err = executeSQLInBackgroundSession (
1862- sysTenantCtx ,
1863- ses ,
1864- mp ,
1865- pu ,
1866- sql )
1867- if err != nil {
1868- return err
1869- }
1870- }
1871-
18721859 rsset , err = executeSQLInBackgroundSession (
18731860 sysTenantCtx ,
18741861 ses ,
@@ -1915,19 +1902,6 @@ func (ses *Session) InitGlobalSystemVariables() error {
19151902 pu := ses .GetParameterUnit ()
19161903 mp := ses .GetMemPool ()
19171904
1918- updateSqls := ses .getUpdateVariableSqlsByToml ()
1919- for _ , sql := range updateSqls {
1920- _ , err = executeSQLInBackgroundSession (
1921- tenantCtx ,
1922- ses ,
1923- mp ,
1924- pu ,
1925- sql )
1926- if err != nil {
1927- return err
1928- }
1929- }
1930-
19311905 rsset , err = executeSQLInBackgroundSession (
19321906 tenantCtx ,
19331907 ses ,
@@ -1969,24 +1943,6 @@ func (ses *Session) InitGlobalSystemVariables() error {
19691943 return err
19701944}
19711945
1972- func (ses * Session ) getUpdateVariableSqlsByToml () []string {
1973- updateSqls := make ([]string , 0 )
1974- tenantInfo := ses .GetTenantInfo ()
1975- // sql_mode
1976- if getVariableValue (ses .pu .SV .SqlMode ) != gSysVarsDefs ["sql_mode" ].Default {
1977- sqlForUpdate := getSqlForUpdateSystemVariableValue (ses .pu .SV .SqlMode , uint64 (tenantInfo .GetTenantID ()), "sql_mode" )
1978- updateSqls = append (updateSqls , sqlForUpdate )
1979- }
1980-
1981- // lower_case_table_names
1982- if getVariableValue (ses .pu .SV .LowerCaseTableNames ) != gSysVarsDefs ["lower_case_table_names" ].Default {
1983- sqlForUpdate := getSqlForUpdateSystemVariableValue (getVariableValue (ses .pu .SV .LowerCaseTableNames ), uint64 (tenantInfo .GetTenantID ()), "lower_case_table_names" )
1984- updateSqls = append (updateSqls , sqlForUpdate )
1985- }
1986-
1987- return updateSqls
1988- }
1989-
19901946func (ses * Session ) GetPrivilege () * privilege {
19911947 ses .mu .Lock ()
19921948 defer ses .mu .Unlock ()
0 commit comments