Hello, I''ve noticed that Rails was not properly escaping the name of a table when dropping an index which caused it to generate invalid SQL when the table was named "values". I''ve reported and then made a patch for it: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4809 The patch is in the issue and you can also see my change in here: http://github.com/pupeno/rails/commit/13f9869896f5b39dd3558a2938ffedb2f0eb9e9d I wrote a test for it but I''m not sure if that''s the proper style of testing; actually, I''m quite sure it isn''t, but since I need to create a separate table for this test I wasn''t sure what was the best approach. Anyone cares to tell me so I can improve this patch? Thanks. -- J. Pablo Fernández <pupeno@pupeno.com> (http://pupeno.com) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
J. Pablo Fernández
2010-Jun-29 10:44 UTC
Re: [PATCH] Table name not escaped on dropping index
Hello, I''m really new to contributing to Rails, so I''m not sure how is the process like. I''ve wrote this patch some time ago, do I need to get people to +1 it to get it applied? Is there anything else expected from me? Thanks. 2010/6/12 J. Pablo Fernández <pupeno@pupeno.com>:> Hello, > I''ve noticed that Rails was not properly escaping the name of a table when > dropping an index which caused it to generate invalid SQL when the table was > named "values". I''ve reported and then made a patch for > it: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4809 > The patch is in the issue and you can also see my change in > here: http://github.com/pupeno/rails/commit/13f9869896f5b39dd3558a2938ffedb2f0eb9e9d > I wrote a test for it but I''m not sure if that''s the proper style of > testing; actually, I''m quite sure it isn''t, but since I need to create a > separate table for this test I wasn''t sure what was the best approach. > Anyone cares to tell me so I can improve this patch? > > Thanks. > -- > J. Pablo Fernández <pupeno@pupeno.com> (http://pupeno.com) >-- J. Pablo Fernández <pupeno@pupeno.com> (http://pupeno.com) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Norman Clarke
2010-Jun-29 12:25 UTC
Re: Re: [PATCH] Table name not escaped on dropping index
Hi, I just applied this patch in my copy of rails master; it applies cleanly and all of the tests which pass in master pass with the patch applied on SQLite3, MySQL and Postgres. So I just gave it a +1 on LH. Regards, Norman 2010/6/29 J. Pablo Fernández <pupeno@pupeno.com>:> Hello, > > I''m really new to contributing to Rails, so I''m not sure how is the > process like. I''ve wrote this patch some time ago, do I need to get > people to +1 it to get it applied? Is there anything else expected > from me? > > Thanks. > > 2010/6/12 J. Pablo Fernández <pupeno@pupeno.com>: >> Hello, >> I''ve noticed that Rails was not properly escaping the name of a table when >> dropping an index which caused it to generate invalid SQL when the table was >> named "values". I''ve reported and then made a patch for >> it: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4809 >> The patch is in the issue and you can also see my change in >> here: http://github.com/pupeno/rails/commit/13f9869896f5b39dd3558a2938ffedb2f0eb9e9d >> I wrote a test for it but I''m not sure if that''s the proper style of >> testing; actually, I''m quite sure it isn''t, but since I need to create a >> separate table for this test I wasn''t sure what was the best approach. >> Anyone cares to tell me so I can improve this patch? >> >> Thanks. >> -- >> J. Pablo Fernández <pupeno@pupeno.com> (http://pupeno.com) >> > > > > -- > J. Pablo Fernández <pupeno@pupeno.com> (http://pupeno.com) > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.