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
From function initialGlobal, we can see that global tableName variable is get from property file with field name table if it is empty
but in initClientCommand, there is a flag setting the global tableName variable, so when we set it in cmd flags, it will always has value when it goes into intialGlobal and check its length
and in all db implementations, they are using tableName from property file, take mysql as an example
global variable in main.go
variable in db implementation mysql
we can see they are different
More
By digging deeper, I found that the DB field defined in prop.go is not used anywhere. The db implementations are using dbName from global variable and is set by command flag, in the mean time, we can see that the real tableName takes effect is from property file, the different ways we set these two associated variables make user confuse.
Suggestion
We should make it clean and unique, either we set these two variables by cmd flags, or by property file.
The text was updated successfully, but these errors were encountered:
Code
From function
initialGlobal
, we can see that global tableName variable is get from property file with field nametable
if it is emptybut in
initClientCommand
, there is a flag setting the global tableName variable, so when we set it in cmd flags, it will always has value when it goes intointialGlobal
and check its lengthand in all db implementations, they are using tableName from property file, take mysql as an example
Debug
in workloads/workloada
global variable in main.go
variable in db implementation mysql
we can see they are different
More
By digging deeper, I found that the
DB
field defined inprop.go
is not used anywhere. The db implementations are usingdbName
from global variable and is set by command flag, in the mean time, we can see that the real tableName takes effect is from property file, the different ways we set these two associated variables make user confuse.Suggestion
We should make it clean and unique, either we set these two variables by cmd flags, or by property file.
The text was updated successfully, but these errors were encountered: