pt-online-schema-change crashes due to lack of default value for update-foreign-keys-method

Bug #904848 reported by Marcos Albe
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

pt-online-schema-change --alter "ENGINE InnoDB" --drop-old-table --ask-pass h=localhost,u=msandbox,S=/tmp/mysql_sandbox5514.sock,t=test.sample1
Use of uninitialized value in lc at /home/kolita/bin/pt-online-schema-change line 4146.

pt-online-schema-change version 1.0.1
Oracle's MySQL 5.5.14

[kolita@diogenes sandboxes]$ export MKDEBUG=1
[kolita@diogenes sandboxes]$ pt-online-schema-change --alter "ENGINE InnoDB" --drop-old-table --ask-pass h=localhost,u=msandbox,S=/tmp/mysql_sandbox5514.sock,t=test.sample1
# /usr/bin/perl 5.012004
# Linux diogenes 2.6.41.1-1.fc15.x86_64 #1 SMP Fri Nov 11 21:36:28 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
# Arguments: _[--alter]_ _[ENGINE InnoDB]_ _[--drop-old-table]_ _[--ask-pass]_ _[h=localhost,u=msandbox,S=/tmp/mysql_sandbox5514.sock,t=test.sample1]_
# OptionParser:190 25147 Option rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
# OptionParser:199 25147 =item --alter
# OptionParser:226 25147 Short help: Semicolon-separated list of ALTER TABLE statements to apply to the new table
# OptionParser:199 25147 =item --ask-pass
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Prompt for a password when connecting to MySQL
# OptionParser:199 25147 =item --bin-log
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Allow binary logging (SET SQL_LOG_BIN=1)
# OptionParser:199 25147 =item --charset
# OptionParser:226 25147 Short help: Default character set
# OptionParser:199 25147 =item --check-tables-and-exit
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Check that the table can be altered then exit; do not alter the table
# OptionParser:199 25147 =item --child-tables
# OptionParser:226 25147 Short help: Foreign key constraints in these (child) tables reference the table
# OptionParser:199 25147 =item --chunk-size
# OptionParser:226 25147 Short help: Number of rows or data size per chunk
# OptionParser:199 25147 =item --cleanup-and-exit
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Cleanup and exit; do not alter the table
# OptionParser:199 25147 =item --config
# OptionParser:226 25147 Short help: Read this comma-separated list of config files; if specified, this must be the first option on the command line
# OptionParser:199 25147 =item --[no]create-tmp-table
# OptionParser:226 25147 Short help: Create the --tmp-table with CREATE TABLE LIKE
# OptionParser:199 25147 =item --database
# OptionParser:226 25147 Short help: Database of the table
# OptionParser:199 25147 =item --defaults-file
# OptionParser:226 25147 Short help: Only read mysql options from the given file
# OptionParser:199 25147 =item --drop-old-table
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Drop the original table after it's swapped with the --tmp-table
# OptionParser:199 25147 =item --[no]foreign-key-checks
# OptionParser:226 25147 Short help: Enforce foreign key checks (FOREIGN_KEY_CHECKS=1)
# OptionParser:199 25147 =item --help
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Show help and exit
# OptionParser:199 25147 =item --host
# OptionParser:226 25147 Short help: Connect to host
# OptionParser:199 25147 =item --password
# OptionParser:226 25147 Short help: Password to use when connecting
# OptionParser:199 25147 =item --pid
# OptionParser:226 25147 Short help: Create the given PID file
# OptionParser:199 25147 =item --port
# OptionParser:226 25147 Short help: Port number to use for connection
# OptionParser:199 25147 =item --print
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Print SQL statements to STDOUT instead of executing them
# OptionParser:199 25147 =item --progress
# OptionParser:226 25147 Short help: Print progress reports to STDERR while copying rows
# OptionParser:199 25147 =item --quiet
# OptionParser:226 25147 Short help: Do not print messages to STDOUT
# OptionParser:199 25147 =item --[no]rename-tables
# OptionParser:226 25147 Short help: Rename/swap the original table and the --tmp-table
# OptionParser:199 25147 =item --set-vars
# OptionParser:226 25147 Short help: Set these MySQL variables
# OptionParser:199 25147 =item --sleep
# OptionParser:226 25147 Short help: How long to sleep between chunks while copying rows
# OptionParser:199 25147 =item --socket
# OptionParser:226 25147 Short help: Socket file to use for connection
# OptionParser:199 25147 =item --tmp-table
# OptionParser:226 25147 Short help: Temporary table if --no-create-tmp-table is specified
# OptionParser:199 25147 =item --update-foreign-keys-method
# OptionParser:226 25147 Short help: Method for updating foreign key constraints in --child-tables
# OptionParser:199 25147 =item --user
# OptionParser:226 25147 Short help: User for login if not current user
# OptionParser:199 25147 =item --version
# OptionParser:218 25147 Option has no attributes
# OptionParser:226 25147 Short help: Show version and exit
# OptionParser:265 25147 Parsing opt spec: group => default spec => alter=s desc => Semicolon-separated list of ALTER TABLE statements to apply to the new table
# OptionParser:303 25147 alter type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => ask-pass desc => Prompt for a password when connecting to MySQL
# OptionParser:303 25147 ask-pass type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => bin-log desc => Allow binary logging (SET SQL_LOG_BIN=1)
# OptionParser:303 25147 bin-log type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => charset|A=s desc => Default character set
# OptionParser:303 25147 charset type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => check-tables-and-exit desc => Check that the table can be altered then exit; do not alter the table
# OptionParser:303 25147 check-tables-and-exit type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => child-tables=s desc => Foreign key constraints in these (child) tables reference the table
# OptionParser:303 25147 child-tables type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => chunk-size=s desc => Number of rows or data size per chunk (default 1000)
# OptionParser:303 25147 chunk-size type: s
# OptionParser:310 25147 chunk-size default: 1000
# OptionParser:265 25147 Parsing opt spec: group => default spec => cleanup-and-exit desc => Cleanup and exit; do not alter the table
# OptionParser:303 25147 cleanup-and-exit type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => config=A desc => Read this comma-separated list of config files; if specified, this must be the first option on the command line
# OptionParser:303 25147 config type: A
# OptionParser:265 25147 Parsing opt spec: group => default spec => create-tmp-table! desc => Create the --tmp-table with CREATE TABLE LIKE (default yes)
# OptionParser:303 25147 create-tmp-table type: undef
# OptionParser:310 25147 create-tmp-table default: yes
# OptionParser:265 25147 Parsing opt spec: group => default spec => database|D=s desc => Database of the table
# OptionParser:303 25147 database type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => defaults-file|F=s desc => Only read mysql options from the given file
# OptionParser:303 25147 defaults-file type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => drop-old-table desc => Drop the original table after it's swapped with the --tmp-table
# OptionParser:303 25147 drop-old-table type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => foreign-key-checks! desc => Enforce foreign key checks (FOREIGN_KEY_CHECKS=1) (default yes)
# OptionParser:303 25147 foreign-key-checks type: undef
# OptionParser:310 25147 foreign-key-checks default: yes
# OptionParser:265 25147 Parsing opt spec: group => default spec => help desc => Show help and exit
# OptionParser:303 25147 help type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => host|h=s desc => Connect to host
# OptionParser:303 25147 host type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => password|p=s desc => Password to use when connecting
# OptionParser:303 25147 password type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => pid=s desc => Create the given PID file
# OptionParser:303 25147 pid type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => port|P=i desc => Port number to use for connection
# OptionParser:303 25147 port type: i
# OptionParser:265 25147 Parsing opt spec: group => default spec => print desc => Print SQL statements to STDOUT instead of executing them
# OptionParser:303 25147 print type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => progress=a desc => Print progress reports to STDERR while copying rows (default time,30)
# OptionParser:303 25147 progress type: a
# OptionParser:310 25147 progress default: time,30
# OptionParser:265 25147 Parsing opt spec: group => default spec => quiet|q desc => Do not print messages to STDOUT
# OptionParser:303 25147 quiet type: undef
# OptionParser:265 25147 Parsing opt spec: group => default spec => rename-tables! desc => Rename/swap the original table and the --tmp-table (default yes)
# OptionParser:303 25147 rename-tables type: undef
# OptionParser:310 25147 rename-tables default: yes
# OptionParser:265 25147 Parsing opt spec: group => default spec => set-vars=s desc => Set these MySQL variables (default wait_timeout=10000)
# OptionParser:303 25147 set-vars type: s
# OptionParser:310 25147 set-vars default: wait_timeout=10000
# OptionParser:265 25147 Parsing opt spec: group => default spec => sleep=f desc => How long to sleep between chunks while copying rows (default 0)
# OptionParser:303 25147 sleep type: f
# OptionParser:310 25147 sleep default: 0
# OptionParser:265 25147 Parsing opt spec: group => default spec => socket|S=s desc => Socket file to use for connection
# OptionParser:303 25147 socket type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => tmp-table=s desc => Temporary table if --no-create-tmp-table is specified
# OptionParser:303 25147 tmp-table type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => update-foreign-keys-method=s desc => Method for updating foreign key constraints in --child-tables
# OptionParser:303 25147 update-foreign-keys-method type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => user|u=s desc => User for login if not current user
# OptionParser:303 25147 user type: s
# OptionParser:265 25147 Parsing opt spec: group => default spec => version desc => Show version and exit
# OptionParser:303 25147 version type: undef
# OptionParser:325 25147 Parsing rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
# OptionParser:381 25147 Participants for This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. :
# OptionParser:357 25147 Strict mode disabled by rule
# OptionParser:109 25147 Parsing DSN OPTIONS
# OptionParser:199 25147 =item * A
# OptionParser:226 25147 Short help: Default character set
# OptionParser:199 25147 =item * D
# OptionParser:226 25147 Short help: Database for the old and new table
# OptionParser:199 25147 =item * F
# OptionParser:226 25147 Short help: Only read default options from the given file
# OptionParser:199 25147 =item * h
# OptionParser:226 25147 Short help: Connect to host
# OptionParser:199 25147 =item * p
# OptionParser:226 25147 Short help: Password to use when connecting
# OptionParser:199 25147 =item * P
# OptionParser:226 25147 Short help: Port number to use for connection
# OptionParser:199 25147 =item * S
# OptionParser:226 25147 Short help: Socket file to use for connection
# OptionParser:199 25147 =item * t
# OptionParser:226 25147 Short help: Table to alter
# OptionParser:199 25147 =item * u
# OptionParser:226 25147 Short help: User for login if not current user
# DSNParser:1158 25147 DSN option: copy=1, dsn=charset, desc=Default character set, key=A
# DSNParser:1158 25147 DSN option: copy=1, dsn=database, desc=Database for the old and new table, key=D
# DSNParser:1158 25147 DSN option: copy=1, dsn=mysql_read_default_file, desc=Only read default options from the given file, key=F
# DSNParser:1158 25147 DSN option: copy=1, dsn=host, desc=Connect to host, key=h
# DSNParser:1158 25147 DSN option: copy=1, dsn=password, desc=Password to use when connecting, key=p
# DSNParser:1158 25147 DSN option: copy=1, dsn=port, desc=Port number to use for connection, key=P
# DSNParser:1158 25147 DSN option: copy=1, dsn=mysql_socket, desc=Socket file to use for connection, key=S
# DSNParser:1158 25147 DSN option: copy=, dsn=table, desc=Table to alter, key=t
# DSNParser:1158 25147 DSN option: copy=1, dsn=user, desc=User for login if not current user, key=u
# OptionParser:153 25147 pt-online-schema-change 1.0.1
# OptionParser:465 25147 Cannot open /etc/percona-toolkit/percona-toolkit.conf: No such file or directory
#
# OptionParser:465 25147 Cannot open /etc/percona-toolkit/pt-online-schema-change.conf: No such file or directory
#
# OptionParser:465 25147 Cannot open /home/kolita/.percona-toolkit.conf: No such file or directory
#
# OptionParser:465 25147 Cannot open /home/kolita/.pt-online-schema-change.conf: No such file or directory
#
# OptionParser:433 25147 Got option alter = ENGINE InnoDB
# OptionParser:433 25147 Got option drop-old-table = 1
# OptionParser:433 25147 Got option ask-pass = 1
# OptionParser:653 25147 Nothing to validate for option chunk-size type s value 1000
# OptionParser:653 25147 Nothing to validate for option password type s value undef
# OptionParser:653 25147 Nothing to validate for option pid type s value undef
# OptionParser:653 25147 Nothing to validate for option tmp-table type s value undef
# OptionParser:653 25147 Nothing to validate for option user type s value undef
# OptionParser:653 25147 Nothing to validate for option alter type s value ENGINE InnoDB
# OptionParser:653 25147 Nothing to validate for option update-foreign-keys-method type s value undef
# OptionParser:653 25147 Nothing to validate for option charset type s value undef
# OptionParser:653 25147 Nothing to validate for option set-vars type s value wait_timeout=10000
# OptionParser:653 25147 Nothing to validate for option port type i value undef
# OptionParser:653 25147 Nothing to validate for option socket type s value undef
# OptionParser:653 25147 Nothing to validate for option defaults-file type s value undef
# OptionParser:653 25147 Nothing to validate for option host type s value undef
# OptionParser:653 25147 Nothing to validate for option database type s value undef
# OptionParser:653 25147 Nothing to validate for option child-tables type s value undef
# OptionParser:653 25147 Nothing to validate for option sleep type f value 0
# DSNParser:1174 25147 Setting set-vars property
# DSNParser:1245 25147 DSN string made from options:
# DSNParser:1183 25147 No DSN to parse
# DSNParser:1186 25147 Parsing h=localhost,u=msandbox,S=/tmp/mysql_sandbox5514.sock,t=test.sample1
# DSNParser:1204 25147 Finding value for S
# DSNParser:1204 25147 Finding value for F
# DSNParser:1214 25147 Copying value for F from defaults
# DSNParser:1204 25147 Finding value for A
# DSNParser:1214 25147 Copying value for A from defaults
# DSNParser:1204 25147 Finding value for P
# DSNParser:1214 25147 Copying value for P from defaults
# DSNParser:1204 25147 Finding value for p
# DSNParser:1214 25147 Copying value for p from defaults
# DSNParser:1204 25147 Finding value for u
# DSNParser:1204 25147 Finding value for h
# DSNParser:1204 25147 Finding value for D
# DSNParser:1214 25147 Copying value for D from defaults
# DSNParser:1204 25147 Finding value for t
Use of uninitialized value in lc at /home/kolita/bin/pt-online-schema-change line 4146.

summary: - Script crashes due to lack of default value for update-foreign-keys-
- method
+ pt-online-schema-change crashes due to lack of default value for update-
+ foreign-keys-method
tags: added: crash pt-online-schema-change
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.