diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-11-11 22:27:13 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-11-11 22:27:13 -0800 |
| commit | 3abbaccb70f6b36cbb8f5499cbca52ff5770803a (patch) | |
| tree | 7148ff67ed7aceb25c2eebfd3fc611b08c20197a /weed/command/scaffold | |
| parent | 177129013ca7e753ae17507da9a03b23be0d687b (diff) | |
| download | seaweedfs-3abbaccb70f6b36cbb8f5499cbca52ff5770803a.tar.xz seaweedfs-3abbaccb70f6b36cbb8f5499cbca52ff5770803a.zip | |
filer: fix mysql command to upsert
Diffstat (limited to 'weed/command/scaffold')
| -rw-r--r-- | weed/command/scaffold/filer.toml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/scaffold/filer.toml b/weed/command/scaffold/filer.toml index aec409408..e26aaa1c7 100644 --- a/weed/command/scaffold/filer.toml +++ b/weed/command/scaffold/filer.toml @@ -61,7 +61,7 @@ connection_max_lifetime_seconds = 0 interpolateParams = false # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax: enableUpsert = true -upsertQuery = """INSERT INTO ` + "`%s`" + ` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)""" +upsertQuery = """INSERT INTO `%s` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)""" [mysql2] # or memsql, tidb enabled = false @@ -85,7 +85,7 @@ connection_max_lifetime_seconds = 0 interpolateParams = false # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax: enableUpsert = true -upsertQuery = """INSERT INTO ` + "`%s`" + ` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)""" +upsertQuery = """INSERT INTO `%s` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)""" [postgres] # or cockroachdb, YugabyteDB # CREATE TABLE IF NOT EXISTS filemeta ( |
