Tools let --set-vars clobber the required SQL mode

Bug #1078887 reported by Raghavendra D Prabhu on 2012-11-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Brian Fraser

Bug Description

Currently providing SQL_MODE with --set-vars clobbers the one set by the script which is "NO_AUTO_VALUE_ON_ZERO". This needs to be fixed.

This was discussed under -- https://bugs.launchpad.net/percona-toolkit/+bug/1019479/comments/6

and http://sprunge.us/NOAJ?pl seems to fix that.

Related branches

Brian Fraser (fraserbn) wrote :

That's odd, I could've sworn I had made a bug after we talked on IRC, but I can't find it now. Thanks for the follow-up!

tags: added: all-tools sql-mode
Changed in percona-toolkit:
status: New → Triaged
Changed in percona-toolkit:
milestone: none → 2.1.8
importance: Undecided → Medium
Brian Fraser (fraserbn) on 2012-12-03
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
status: Triaged → In Progress
Brian Fraser (fraserbn) on 2012-12-11
Changed in percona-toolkit:
status: In Progress → Fix Committed
Daniel Nichter (daniel-nichter) wrote :

This bug and https://code.google.com/p/maatkit/issues/detail?id=799 conflict. From the customer issue referenced in the latter:

"The desired behavior is that the second query would be inserted and the 0 treated as 'NULL' or the next number via autoincrement."

That was solely because the customer was using pt-log-player and replaying INSERT statements. pt-log-player is gone in 2.2, so this isn't an issue in the future, but for 2.1.8 we need to keep the change/fix for this bug because I think it's a better overall approach, but then we need to document in pt-log-player 2.1.8 that if you need auto vals on zero you'll have to use pt-log-player 2.1.7. So yes this means we're breaking backwards compat for pt-log-player in 2.1.8 but it's either that or not doing this bug which would affect more important tools.

Changed in percona-toolkit:
status: Fix Committed → In Progress
Daniel Nichter (daniel-nichter) wrote :

Documented that new limitation directly in 2.1 branch r514.

Changed in percona-toolkit:
status: In Progress → Fix Committed
summary: - Don't clobber the sql_mode set by the script with set-vars
+ Tools let --set-vars clobber the required SQL mode
Changed in percona-toolkit:
status: Fix Committed → Fix Released

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-594

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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