mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer.store.mysql: Replace deprecated upsert syntax (#4096)
This commit is contained in:
parent
265a56630b
commit
c2280e94cf
|
@ -61,7 +61,7 @@ connection_max_lifetime_seconds = 0
|
||||||
interpolateParams = false
|
interpolateParams = false
|
||||||
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
|
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
|
||||||
enableUpsert = true
|
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 (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
|
||||||
|
|
||||||
[mysql2] # or memsql, tidb
|
[mysql2] # or memsql, tidb
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -85,7 +85,7 @@ connection_max_lifetime_seconds = 0
|
||||||
interpolateParams = false
|
interpolateParams = false
|
||||||
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
|
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
|
||||||
enableUpsert = true
|
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 (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
|
||||||
|
|
||||||
[postgres] # or cockroachdb, YugabyteDB
|
[postgres] # or cockroachdb, YugabyteDB
|
||||||
# CREATE TABLE IF NOT EXISTS filemeta (
|
# CREATE TABLE IF NOT EXISTS filemeta (
|
||||||
|
|
Loading…
Reference in a new issue