Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-4541 now.

SQL-error while deleting multiple pages (fix completed in vcs)

While I was deleting my trash-forum, trought moderator's control panel. I was able delete few pages before I got this message:

Yleinen virhe
SQL ERROR [ postgres ]

ERROR: new row for relation "olympus_users" violates check constraint
"olympus_users_user_posts" []

SQL

UPDATE olympus_users SET user_posts = user_posts - 221 WHERE user_id = 1

BACKTRACE

FILE: includes/db/postgres.php
LINE: 177
CALL: dbal_postgres->sql_error()

FILE: includes/functions_admin.php
LINE: 664
CALL: dbal_postgres->sql_query()

FILE: includes/functions_admin.php
LINE: 523
CALL: delete_posts()

FILE: includes/mcp/mcp_main.php
LINE: 774
CALL: delete_topics()

FILE: includes/mcp/mcp_main.php
LINE: 111
CALL: mcp_delete_topic()

FILE: includes/functions_module.php
LINE: 460
CALL: mcp_main->main()

FILE: mcp.php
LINE: 231
CALL: p_master->load_active()

Ole hyvja ilmoita ttkeskustelufoorumin ylitle, tai webmasterille:

Comments / History

Posted by Acyd Burn (Server Manager) on May 23rd 2007, 09:58

Is this a fresh RC1 installation? Or a conversion?

Hmm, maybe conversion and related to the recent change of not resetting user_posts. Now, the function is trying to remove more posts from the user_posts variable than actually exist, resulting in user_posts being negative (which is forbidden within the schema).

Posted by |Rocky on May 23rd 2007, 12:14

It's a conversion from newest stable 2.x

Assigned ticket to user "Kellanved"

Action performed by Acyd Burn (Server Manager) on May 24th 2007, 15:17

Changed ticket status from "New" to "Fix in progress"

Action performed by Kellanved (Former Team Member) on May 25th 2007, 14:48

Linked ticket with changeset: r7677

Action performed by Kellanved (Former Team Member) on May 25th 2007, 16:03

Changed ticket status from "Fix in progress" to "Fix completed in CVS"

Action performed by Kellanved (Former Team Member) on May 25th 2007, 16:04

Ticket details

Related SVN changesets