Browse Source

mysql: Missed escaping column name

fix https://github.com/seaweedfs/seaweedfs/issues/4129
pull/4130/head
chrislu 2 years ago
parent
commit
361d97941b
  1. 2
      weed/filer/mysql/mysql_sql_gen.go

2
weed/filer/mysql/mysql_sql_gen.go

@ -30,7 +30,7 @@ func (gen *SqlGenMysql) GetSqlUpdate(tableName string) string {
} }
func (gen *SqlGenMysql) GetSqlFind(tableName string) string { func (gen *SqlGenMysql) GetSqlFind(tableName string) string {
return fmt.Sprintf("SELECT `meta` FROM `%s` WHERE `dirhash` = ? AND `name = ? AND `directory` = ?", tableName)
return fmt.Sprintf("SELECT `meta` FROM `%s` WHERE `dirhash` = ? AND `name` = ? AND `directory` = ?", tableName)
} }
func (gen *SqlGenMysql) GetSqlDelete(tableName string) string { func (gen *SqlGenMysql) GetSqlDelete(tableName string) string {

Loading…
Cancel
Save