Hello,

 

As a complement here are the tables description (after migration)

mysql> desc xwikistatsdoc;

+---------------------+--------------+------+-----+---------+-------+

| Field               | Type         | Null | Key | Default | Extra |

+---------------------+--------------+------+-----+---------+-------+

| XWS_ID              | int(11)      |      | PRI | 0       |       |

| XWS_NUMBER          | int(11)      | YES  |     | NULL    |       |

| XWS_NAME            | varchar(255) |      |     |         |       |

| XWS_CLASSNAME       | varchar(255) |      |     |         |       |

| XWS_ACTION          | varchar(255) |      |     |         |       |

| XWS_PAGE_VIEWS      | int(11)      | YES  |     | NULL    |       |

| XWS_UNIQUE_VISITORS | int(11)      | YES  |     | NULL    |       |

| XWS_PERIOD          | int(11)      | YES  |     | NULL    |       |

| XWS_VISITS          | int(11)      | YES  |     | NULL    |       |

+---------------------+--------------+------+-----+---------+-------+ 

 

mysql> desc xwikistatsreferer;

+----------------+--------------+------+-----+---------+-------+

| Field          | Type         | Null | Key | Default | Extra |

+----------------+--------------+------+-----+---------+-------+

| XWR_ID         | int(11)      |      | PRI | 0       |       |

| XWR_NUMBER     | int(11)      | YES  |     | NULL    |       |

| XWR_NAME       | varchar(255) |      |     |         |       |

| XWR_CLASSNAME  | varchar(255) |      |     |         |       |

| XWR_REFERER    | varchar(255) |      |     |         |       |

| XWR_PAGE_VIEWS | int(11)      | YES  |     | NULL    |       |

| XWR_PERIOD     | int(11)      | YES  |     | NULL    |       |

+----------------+--------------+------+-----+---------+-------+

 

mysql> desc xwikistatsvisit;

+----------------+--------------+------+-----+---------+-------+

| Field          | Type         | Null | Key | Default | Extra |

+----------------+--------------+------+-----+---------+-------+

| XWV_ID         | int(11)      |      | PRI | 0       |       |

| XWV_NUMBER     | int(11)      | YES  |     | NULL    |       |

| XWV_NAME       | varchar(255) |      |     |         |       |

| XWV_CLASSNAME  | varchar(255) |      |     |         |       |

| XWV_IP         | varchar(32)  |      |     |         |       |

| XWV_USER_AGENT | varchar(255) |      |     |         |       |

| XWV_COOKIE     | varchar(255) |      |     |         |       |

| XWV_UNIQUE_ID  | varchar(255) |      |     |         |       |

| XWV_PAGE_VIEWS | int(11)      | YES  |     | NULL    |       |

| XWV_PAGE_SAVES | int(11)      | YES  |     | NULL    |       |

| XWV_DOWNLOADS  | int(11)      | YES  |     | NULL    |       |

| XWV_START_DATE | datetime     | YES  |     | NULL    |       |

| XWV_END_DATE   | datetime     | YES  |     | NULL    |       |

+----------------+--------------+------+-----+---------+-------+

 

(hope the tables will show correctly …)

 

Thanks,

Jeremie

 


From: users-bounces@xwiki.org [mailto:users-bounces@xwiki.org] On Behalf Of BOUSQUET Jeremie
Sent: lundi 18 février 2008 10:26
To: users@xwiki.org
Subject: [xwiki-users] MySQL Error "invalid use of group function" inStatistics application

 

Hello,

 

I just migrated from XWiki 1.1 to 1.2.2. Migration was ok and everything works fine, except the Statistics application.

 

It shows unrecorded stats but there are some. There seems to be an error in an SQL request (miss group by ?), either database was not correctly migrated, or MySQL version is not compatible ? Of course, stats are activated in xwiki.cfg.

 

Here’s the error  log when trying to display the most viewed pages :

 

 […/Stats/MostViewedPages] [http-80-Processor18] WARN  util.JDBCExceptionReporter      - SQL Error: 1111, SQLState: HY000

 […/Stats/MostViewedPages] [http-80-Processor18] ERROR util.JDBCExceptionReporter      - Invalid use of group function

(2 times)

 

I use :

mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i386) using readline 4.3

java version "1.5.0_11"

 

Thanks for help,

 

Jeremie