Just like in: frappe/frappe#22620 frappe/bench#1489
My issue is that the deprecation warning is used as a table name 😆
/bin/bash: line 1: /home/frappe/benches/…/sites/test.example.com/.migrate/mysql: Deprecated program name. It will be removed in a future release, use /usr/bin/mariadb instead.sql.gz: No such file or directory
mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
mysqldump: Couldn't find table: "mysql: Deprecated program name. It will be removed in a future release, use /usr/bin/mariadb instead"
Indeed, the tables property returns ["mysql: Deprecated program name. It will be removed in a future release, use /usr/bin/mariadb instead"]
|
@property |
|
def tables(self): |
|
return self.execute( |
|
"mysql --disable-column-names -B -e 'SHOW TABLES' " |
|
f"-h {self.host} -u {self.user} -p{self.password} {self.database}" |
|
)["output"].split("\n") |
Which is then used as the table name:
|
backup_file = os.path.join( |
|
self.backup_directory, f"{table}.sql.gz" |
And then bash complains that it can't find the file to write to it:
|
f" | gzip > '{backup_file}'", |
And mysqldump complains that it's name is deprecated AND that the table does not exist.
Links to code on github
|
f"mysql -h {self.host} -uroot -p{mariadb_root_password}" |
|
f"mysql -h {self.host} -uroot -p{mariadb_root_password}" |
|
f"mysqlbinlog --short-form --database {database} " |
|
"mysql -h 127.0.0.1 -P 6032 " |
|
f"mysql -h {self.host} -uroot -p{mariadb_root_password}" |
|
f"mysql -h {self.host} -uroot -p{mariadb_root_password}" |
|
f"mysql -h {self.host} -u {self.user} -p{self.password} " |
|
"mysqldump --single-transaction --quick --lock-tables=false " |
|
f"mysql -h {self.host} -u {self.user} -p{self.password} " |
|
f"mysql -h {self.host} -u {self.user} -p{self.password} " |
|
f"mysql -h {self.host} -u{self.database} -p{self.password} " |
|
"mysql --disable-column-names -B -e 'SHOW TABLES' " |
|
f"mysql -sN -h {self.host} -u{self.user} -p{self.password}" |
|
f"mysql -sN -h {self.host} -u{self.user} -p{self.password}" |
|
f"mysql -sN -h {self.host} -u{self.user} -p{self.password}" |
|
f"mysql -sN -h {self.host} -u{self.user} -p{self.password}" |
List of files to change
agent/bench.py:238
agent/bench.py:254
agent/database.py:30
agent/proxysql.py:21
agent/site.py:274
agent/site.py:290
agent/site.py:320
agent/site.py:463
agent/site.py:533
agent/site.py:548
agent/site.py:630
agent/site.py:640
agent/site.py:674
agent/site.py:750
agent/site.py:791
agent/site.py:812
Just like in: frappe/frappe#22620 frappe/bench#1489
My issue is that the deprecation warning is used as a table name 😆
Indeed, the
tablesproperty returns["mysql: Deprecated program name. It will be removed in a future release, use /usr/bin/mariadb instead"]agent/agent/site.py
Lines 637 to 642 in 2d8eadf
Which is then used as the table name:
agent/agent/site.py
Lines 458 to 459 in 2d8eadf
And then
bashcomplains that it can't find the file to write to it:agent/agent/site.py
Line 466 in 2d8eadf
And mysqldump complains that it's name is deprecated AND that the table does not exist.
Links to code on github
agent/agent/bench.py
Line 238 in 2d8eadf
agent/agent/bench.py
Line 254 in 2d8eadf
agent/agent/database.py
Line 30 in 2d8eadf
agent/agent/proxysql.py
Line 21 in 2d8eadf
agent/agent/site.py
Line 274 in 2d8eadf
agent/agent/site.py
Line 290 in 2d8eadf
agent/agent/site.py
Line 320 in 2d8eadf
agent/agent/site.py
Line 463 in 2d8eadf
agent/agent/site.py
Line 533 in 2d8eadf
agent/agent/site.py
Line 548 in 2d8eadf
agent/agent/site.py
Line 630 in 2d8eadf
agent/agent/site.py
Line 640 in 2d8eadf
agent/agent/site.py
Line 674 in 2d8eadf
agent/agent/site.py
Line 750 in 2d8eadf
agent/agent/site.py
Line 791 in 2d8eadf
agent/agent/site.py
Line 812 in 2d8eadf
List of files to change