Changes between Initial Version and Version 2 of Ticket #350


Ignore:
Timestamp:
Aug 19, 2005, 4:27:41 PM (19 years ago)
Author:
Adrian Holovaty
Comment:

(Fixed formatting in description.)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #350

    • Property Status newassigned
  • Ticket #350 – Description

    initial v2  
    1 When you use the Dhango API to query your data using the get_items(offset=X) style call, the SQL that is actually generated seems to be in a Postgres style that is only recently supported in MySQL (4.x and later, as far as I can tell.)  To be clear, the SQL generated is something like the following:
     1When you use the Django API to query your data using the {{{get_items(offset=X)}}} style call, the SQL that is generated seems to be in Postgres style that is only recently supported in MySQL (4.x and later, as far as I can tell.) The SQL generated is something like the following:
    22
     3{{{
    34SELECT ... ORDER BY ... DESC LIMIT 5 OFFSET 4
     5}}}
    46
    57On MySQL 3.x this gives the following error:
    68
     9{{{
    710"You have an error in your SQL syntax near 'OFFSET 4 '"
     11}}}
    812
    913It works fine on my 4.1.
     
    1115As far as I can tell from the MySQL manual, there is an alternate form of query that should work on all versions of MySQL. Here's the relevant snippet from the SELECT format:
    1216
     17{{{
    1318 [LIMIT {[offset,] row_count | row_count OFFSET offset}]
     19}}}
    1420
    1521Since 3.23 is the default MySQL version for Fedora Core etc, this could affect quite a few people.
    16 
Back to Top