This project is archived and is in readonly mode.

#4410 ✓resolved
Greg Hazel

echoing to stdin for mysql truncates queries on Windows

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

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages