Skip to content

Commit

Permalink
Merge pull request #3808 from actiontech/inner-2234&2336
Browse files Browse the repository at this point in the history
[inner-2334&2336&2337] add memory and random a mysql contrast lowerCase logic
  • Loading branch information
wenyh1 authored Sep 6, 2023
2 parents 341fdcd + c25da26 commit 322ea21
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,22 @@ private static SystemVariables checkVersionAGetSystemVariables(ConfigInitializer
//check packetSize/lowerCase
ConfigUtil.getAndSyncKeyVariables(changeItemList, true);
//keep the original system variables
newSystemVariables = DbleServer.getInstance().getSystemVariables();
SystemVariables memorySystemVariables = DbleServer.getInstance().getSystemVariables();
SystemVariables currentSystemVariables = getSystemVariablesFromdbGroup(loader, loader.getDbGroups());
int memoryLowerCase = memorySystemVariables.isLowerCaseTableNames() ? 1 : 0;
if (memorySystemVariables.isLowerCaseTableNames() != currentSystemVariables.isLowerCaseTableNames()) { // check if the lowerCase of the backend has changed
throw new Exception("Dble memory's lowercase value is " + memoryLowerCase + ", " +
"But it was found that the lower_case_table_names value of the dbInstance is not " + memoryLowerCase + ". " +
"Please unify dbInstances's lower_case_table_names or use 'reload @@config_all -r;'");
} else {
newSystemVariables = memorySystemVariables;
}
}
ReloadLogHelper.briefInfo("check and get system variables from random node end");
return newSystemVariables;
}



/**
* test connection
*/
Expand Down

0 comments on commit 322ea21

Please sign in to comment.