Closed (fixed)
Project:
Signup
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Jan 2006 at 07:33 UTC
Updated:
17 Feb 2006 at 22:02 UTC
Jump to comment: Most recent file
As per title.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | signup_mysql5.0_fix.patch | 1017 bytes | dww |
Comments
Comment #1
hunmonk commentedi checked into this, and since the table isn't generated from a single query, you can't use drupal's tablesorting functionality to sort by anything not in the main query--which means we can't sort by number of signups. i don't like the idea of making it sortable by only two of the three parameters--i'm open to suggestions about how to make it work w/ the tablesort functionality, but i'm not seeing it right now.
Comment #2
boris mann commentedYou could just use links instead, that alter the actual query -- i.e. underneath Signups, have local tasks labelled "by date" (which is the default"), "by no. of signups", and "by title".
Sorting by number of signups is quite useful, especially when you could have a site with 100s of signups. I could probably come up with other features, like exporting to CSV, which is really necessary for things like arbitrary data fields and having print outs / desktop sorting etc.
Comment #3
hunmonk commentedheh. or maybe i could figure out another way to write the query, which i just did... :)
feature has been applied to 4.6 and HEAD.
Comment #4
(not verified) commentedComment #5
dwwsorry to be the bearer of bad news, but this change (revision 1.1.2.19) breaks the admin/signups page for sites where the MySQL server is 5.0.12 or higher. :( when i use revision 1.1.2.19 or later from the 4.6 branch, i get this at the top of the page, and no entries in the table:
if i revert to 1.1.2.18, everything's fine. http://drupal.org/node/40623 talks about the same problem. i honestly don't know enough about writing SQL queries to understand the root of the problem, but whatever you changed with revision 1.1.2.19 doesn't work with MySQL 5.0.12 or later...
let me know if i can provide any additional info to help resolve this.
Comment #6
hunmonk commentedthat error doesn't make sense to me. can you confirm this problem on more than just your mysql installation??
Comment #7
dwwi just did my homework: it's definitely not just my MySQL install. there are a number of issues lurking around in the drupal forums for other modules with the same problem. it all boils down to the this change from MySQL 5.0.12:
http://dev.mysql.com/doc/refman/5.0/en/join.html
if you search further down on that page, you get to this gem:
the problem with signup.module revision 1.1.2.19 is this:
here, you've violated the SQL-standard behavior of the ON clause quoted above, since you refer to "s.nid" before you "JOIN {signup} s"...
here's how i've re-written the query, and it works fine on my test site. i don't have a way to test on an older MySQL installation (i don't have as much control over my hosting site as i'd like, and i haven't gone through the trouble of setting up my own laptop as a test web server), but i think it should work:
i'm not an SQL expert at all, so i'm not 100% sure this is semantically equivalent to what you had, but it appears to work with limited testing.
once i apply this patch, my 1.1.2.22 version of signup.module works fine, including the admin/signup page, i can see all the events with open signups, re-sort the table, etc.
let me know if you need any other info.
-derek
Comment #8
hunmonk commentedapplied to 4.6 and HEAD. nice work!
Comment #9
__Tango commentedUnfortunately, i think this new sql query breaks on mysql 3. I'm running 3.23.58 and i using the new query:
I get the error:
As expected, the old query works fine.
Comment #10
hunmonk commentedunless we can find a query that will work on mysql 3.x 4.x and 5.x, i'm not going to change the query, as we will need 5.x compatibility going forward, and 3.x compatibility will go away at some point--iirc there's already been talk of us dropping support for 3.x
if you find a query that works on all three, please submit a patch. otherwise, i think i'm going to leave it as is.
Comment #11
__Tango commentedhunmonk, killes, and I worked a bit on this this morning. hunmonk came up with a new query that should be ansi sql compliant and thus should work in all versions of mysql.
The query is:
This query has been tested against mysql-3.23.58 and mysql4. We need someone with mysql5 (something later than 5.0.12) to test this. if you can please give it a shot and report back here if it works.
Thanks.
...alex...
Comment #12
dwwtested on MySQL 5.0.18. works fine. thanks for fixing my fix!
Comment #13
hunmonk commentedfixed in 4.6 and lastest CVS. nice work, guys!
Comment #14
(not verified) commented