#4680: Fixes problem in initial_sql where "--" is in a string
-----------------------+----------------------------------------------------
Reporter:  Tim Chase   |       Owner:  adrian               
  Status:  new         |   Component:  Tools                
 Version:  SVN         |    Keywords:  initial-sql manage.py
   Stage:  Unreviewed  |   Has_patch:  1                    
-----------------------+----------------------------------------------------
 In the core/management.py get_custom_sql_for_model() function, if the
 initial SQL has a "--" in a string, it chokes.
 
 The attached diff should fix the problem.  Test cases:
 
 select '--' as foo; -> select '--' as foo;[[BR]]
 select '--' as foo; -- select stuff -> select '--' as foo; [[BR]]
 select '--' as foo; -- select stuff -- because I want to -> select '--' as
 foo; [[BR]]
 select * foo; -- select stuff -- because I want to -> select * foo; [[BR]]
 select * foo; -- select stuff -> select * foo;

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4680>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to