[Mailman-Developers] Re: Rest API not returning members in alphabetical order
Mark Sapiro writes: > On 4/2/20 1:05 PM, brian_carpen...@emwd.com wrote: > > https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/ > > is saying it is not a bug so I doubt SQLAlchemy will think it is. > > My take is a bit different. MariaDB is saying this is not a MariaDB bug. > They would say that it is a SQLAlchemy bug in that in this case, the > SQLAlchemy generated query should put the ORDER BY clause on the outer > SELECT and not on the sub-query. Yup, my take is the same. @mailman-developers I will do some research to find out if SQLAlchemy is aware of this already, or maybe has documented it as a limitation with appropriate ways to deal with it in user code. But it's definitely reportable against SQLAlchemy if MariaDB is right about the SQL standard (trust but verify on that one too :-). Steve ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: Rest API not returning members in alphabetical order
On 4/2/20 1:05 PM, brian_carpen...@emwd.com wrote: > https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/ is > saying it is not a bug so I doubt SQLAlchemy will think it is. My take is a bit different. MariaDB is saying this is not a MariaDB bug. They would say that it is a SQLAlchemy bug in that in this case, the SQLAlchemy generated query should put the ORDER BY clause on the outer SELECT and not on the sub-query. -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: Rest API not returning members in alphabetical order
https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/ is saying it is not a bug so I doubt SQLAlchemy will think it is. We just switched over to PostgreSQL with very little problem so it is no longer an issue. Stay healthy Steve! Brian ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: Rest API not returning members in alphabetical order
Brian Carpenter writes: > However is there anything you guys can do to mitigate that issue > with Mariadb? Bottom line up front: In the meantime I'd say if you want to use MariaDB you're going to have to sort the results yourself on the client side. Sorry about that. Goran's analysis is correct AFAICS, and implies that SQLAlchemy is not working correctly with Mariadb. It might be possible to change our code to avoid the problem, but really it's SQLAlchemy's job to do that (or to reject our code or warn that it may not have the expected effect) in my opinion. Will think more carefully, RTFM, and then check SQLAlchemy tracker and file a bug or enhancement request if it seems appropriate. Since it seems the SQL generated by SQLAlchemy is nonconformant to standard SQL, any of our backends might silently do this at any upgrade. I think *we* *should* do something about it, and I'll file a Mailman bug tomorrow (if somebody doesn't beat me to it, hint!) But I'm an Internet standards geek, not a database querymonger, and I don't know how soon I'll have time to book up on the subtleties of SQL and SQLAlchemy. Maybe Abhilash has the skills and can find the time, but I don't recall Mark being an SQL hacker. So, no promises of a quick fix. Steve P.S. I'm sorry to be such a downer on the likelihood of a quick fix, but I'm enjoying this. :-) Always good to be learning new stuff! ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: Rest API not returning members in alphabetical order
Goran Terzic writes: > Thank you everyone for looking into this. > > Looks like the problem is that SQLAlchemy is generating query with > 'order by' part inside nested subquery, which is not supported by > mariadb. Thank you for finding that, I never would have! > https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/ ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9