Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

echoing to stdin for mysql truncates queries on Windows

#4410
C:\projects\rails\activerecord>rake mysql:build_databases
(in C:/projects/rails/activerecord)
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
ersion for the right syntax to use near '"create DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLAT' a
t line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
ersion for the right syntax to use near '"create DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLA' a
t line 1

This appears to be due to echo also outputting the quote characters on Windows.

The fix, however, is simple and completely cross-platform. Patch attached.

Reported by Greg Hazel · April 16th, 2010 @ 01:33 AM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Ryan Bigg
    Ryan Bigg
    • State changed from new to open

    +1 Patch is sane and applies cleanly.

    April 16th, 2010 @ 01:37 AM

  2. David Trasbo
    David Trasbo
    • Importance changed from to Low

    +1 Perfectly sane, as Ryan puts it.

    The patch no longer applies cleanly, though. Could you update it, Greg? I think if you assign it to José Valim afterwards, he'll include it.

    August 8th, 2010 @ 04:30 PM

  3. Greg Hazel
    Greg Hazel
    • Assigned user set to José Valim

    The patch still applies cleanly for me...

    Here's another, against http://github.com/rails/rails/blob/master/activerecord/Rakefile right this moment.

    August 8th, 2010 @ 04:50 PM

  4. David Trasbo
    David Trasbo

    Surely you remembered to do a git pull before trying to apply the patch, right?

    August 8th, 2010 @ 04:54 PM

  5. Greg Hazel
    Greg Hazel

    It was a fresh checkout..

    August 9th, 2010 @ 01:08 AM

  6. José Valim
    José Valim

    Greg, could you please supply a patch according to the conventions outline here: http://rails.lighthouseapp.com/projects/8994/sending-patches ?

    Thanks.

    September 1st, 2010 @ 08:40 AM

  7. Greg Hazel
    Greg Hazel

    30 minutes of screwing around with git later...

    September 1st, 2010 @ 09:12 AM

  8. Repository