[ php-blog-Bugs-1462845 ] statistics plugin table creation error
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.serendipity.trackers |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1462845, was opened at 2006-04-01 23:58 Message generated for change (Comment added) made by hurrikane You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1462845&group_id=75065 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Plugins Group: None Status: Open Resolution: None Priority: 5 Submitted By: MoMaT (momat) Assigned to: Nobody/Anonymous (nobody) Summary: statistics plugin table creation error Initial Comment: Since the upgrade to 1.1-alpha1, I see the error messages (see the attachment), complaining about existence of some tables. I tried to drop the tables to let the new version of the plugin recreate them properly. However, they are replaced by the old wrong ones by the next page hit. I believe this is a bug in the plugin code. ---------------------------------------------------------------------- Comment By: Mark Kubacki (hurrikane) Date: 2006-04-03 10:32 Message: Logged In: YES user_id=432893 Please compare this query... SELECT counter_id FROM serendipity_visitors_count LIMIT 1 With this one: CREATE TABLE serendipity_visitors_count ( year int(4) not null, month int(2) not null, day int(2) not null, visits int(12) not null, hits int(12) not null ) ... and you will notice (even without having SQLite at hand), that there is simply something wrong - the tablenames are mixed. counter_id is to be found in table serendipity_visitors. Etc. ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2006-04-03 10:01 Message: Logged In: YES user_id=473563 The SQL query looks sane to me. I currently have no means to use SQLite tools, so can't you check it? The setupDB() method of the plugin creates that SQL and is called on the install() hook. I can't spot any errors in the code logic... ---------------------------------------------------------------------- Comment By: Mark Kubacki (hurrikane) Date: 2006-04-03 09:29 Message: Logged In: YES user_id=432893 No, unfortunately these parts aren't patched. Could you please check the SQL-queries which are meant to create that tables? ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2006-04-03 06:44 Message: Logged In: YES user_id=473563 Hi! Uhm, this is quite strange. The code to drop a table only gets executed when you uninstall a plugin! Can it be you patched some files of your s9y instll? It seems then that the plugin API is malfunctioning, and uninstall() is called even though it shouldn't be... ---------------------------------------------------------------------- Comment By: Mark Kubacki (hurrikane) Date: 2006-04-02 11:30 Message: Logged In: YES user_id=432893 Dropping that table leads to creation of the wrong one. And, if the tables is dropped and created by hand from what is showing up as error message, in the next run it gets dropped again and replaced by a wrong table... ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2006-04-02 00:26 Message: Logged In: YES user_id=473563 Hm, this might be a SQLite problem. When you drop the tables, and they are created by the plugin again, is the "counter_id" column missing? Because in the plugin file I see no CREATE TABLE statement that is omitting a "counter_id", so I wouldn't know why a table without that item should be created? Maybe you can try to manually create the table that is listed in your error message and see if that yields an error, or if it correctly then creates the "counter_id" column? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1462845&group_id=75065 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642