add left padding

fix https://github.com/chrislusf/seaweedfs/issues/654
This commit is contained in:
Chris Lu 2018-05-21 10:28:46 -07:00
parent a4740ca836
commit 6ce0097846

View file

@ -198,7 +198,7 @@ CREATE TABLE IF NOT EXISTS %s (
func (s *MySqlStore) createTables(db *sql.DB, tableName string, postfix int) error { func (s *MySqlStore) createTables(db *sql.DB, tableName string, postfix int) error {
var realTableName string var realTableName string
if s.isSharding { if s.isSharding {
realTableName = fmt.Sprintf("%s_%4d", tableName, postfix) realTableName = fmt.Sprintf("%s_%04d", tableName, postfix)
} else { } else {
realTableName = tableName realTableName = tableName
} }