Edgewall Software
Modify

Opened 10 months ago

Last modified 6 weeks ago

#13104 new defect

TracAdmin hotcopy fails with InnoDB backend

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.0.20
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API 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):  
    240240        db_params = db_prop.setdefault('params', {})
    241241        db_name = os.path.basename(db_prop['path'])
    242242
    243         args = [self.mysqldump_path, '--no-defaults']
     243        defaults_opt = '--no-defaults'
     244        args = []
    244245        if 'host' in db_prop:
    245246            args.extend(['-h', db_prop['host']])
    246247        if 'port' in db_prop:
    class MySQLConnector(Component):  
    252253                args.append('--compress')
    253254            elif name == 'named_pipe' and as_int(value, 0):
    254255                args.append('--protocol=pipe')
    255             elif name == 'read_default_file':  # Must be first
    256                 args.insert(1, '--defaults-file=' + value)
     256            elif name == 'read_default_file':
     257                defaults_opt = '--defaults-file=' + value
    257258            elif name == 'unix_socket':
    258259                args.extend(['--protocol=socket', '--socket=' + value])
    259260            elif name not in ('init_command', 'read_default_group'):
    260261                self.log.warning("Invalid connection string parameter '%s'",
    261262                                 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]
    263265
    264266        environ = os.environ.copy()
    265267        if 'password' in db_prop:

Attachments (0)

Change History (1)

comment:1 by Ryan J Ollos, 6 weeks ago

Milestone: next-stable-1.0.x1.0.20

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.