Modify ↓
Opened 6 years ago
Last modified 14 months ago
#13104 new defect
TracAdmin hotcopy fails with InnoDB backend
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Discussed in gmessage:trac-users:G3c4SoOVOZU/Ca_fpdq9BgAJ. The proposed change is:
-
trac/db/mysql_backend.py
diff --git a/trac/db/mysql_backend.py b/trac/db/mysql_backend.py index f607bce30..01cb4fc1d 100644
a b class MySQLConnector(Component): 240 240 db_params = db_prop.setdefault('params', {}) 241 241 db_name = os.path.basename(db_prop['path']) 242 242 243 args = [self.mysqldump_path, '--no-defaults'] 243 defaults_opt = '--no-defaults' 244 args = [] 244 245 if 'host' in db_prop: 245 246 args.extend(['-h', db_prop['host']]) 246 247 if 'port' in db_prop: … … class MySQLConnector(Component): 252 253 args.append('--compress') 253 254 elif name == 'named_pipe' and as_int(value, 0): 254 255 args.append('--protocol=pipe') 255 elif name == 'read_default_file': # Must be first256 args.insert(1, '--defaults-file=' + value)256 elif name == 'read_default_file': 257 defaults_opt = '--defaults-file=' + value 257 258 elif name == 'unix_socket': 258 259 args.extend(['--protocol=socket', '--socket=' + value]) 259 260 elif name not in ('init_command', 'read_default_group'): 260 261 self.log.warning("Invalid connection string parameter '%s'", 261 262 name) 262 args.extend(['-r', dest_file, db_name]) 263 args = [self.mysqldump_path, defaults_opt, '--single-transaction', 264 '--quick'] + args + ['-r', dest_file, db_name] 263 265 264 266 environ = os.environ.copy() 265 267 if 'password' in db_prop:
Attachments (0)
Change History (3)
comment:1 by , 5 years ago
Milestone: | next-stable-1.0.x → 1.0.20 |
---|
comment:2 by , 4 years ago
Milestone: | 1.0.20 → next-stable-1.4.x |
---|
Note:
See TracTickets
for help on using tickets.
Please move back to 1.0.20 if you wish to fix for release 1.0.20 (#13294).