Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1622 closed task (fixed)

Stored procedures in database

Reported by: mahouni Owned by: planetcruiser
Priority: minor Milestone: 0.5.9 - bugfixing
Component: BW Database Keywords: installation, database, stored function, stored procedure, IdTrad
Cc: planetcruiser, jeanyves, mahouni


The reference database for local installations of BWRox is missing some stored functions/procedures. E.g. it is not possible to create new posts or reply to a forum post without the db function Next_Forum_trads_IdTrad().

Jean Yves has written to the bw-dev mailinglist how to create this stored function. I copy&paste his message here:

Hello, I just checked this stored function is really needed for the forum to work. Here is the code to run on mysql to create it:

CREATE FUNCTION `Next_Forum_trads_IdTrad`() RETURNS int(11)
     DECLARE res INT;
select max(IdTrad)+1 from translations into res ;
               RETURN res;

It should be added on the reference test database Greetings Jean Yves

Change History (3)

comment:1 Changed 7 years ago by mahouni

  • Owner changed from mahouni to planetcruiser
  • Status changed from new to assigned

comment:2 Changed 7 years ago by planetcruiser

  • Milestone changed from unassigned to 0.5.9 - bugfixing
  • Resolution set to fixed
  • Status changed from assigned to closed

added the following to the dump:

DROP FUNCTION IF EXISTS Next_Forum_trads_IdTrad//
CREATE FUNCTION Next_Forum_trads_IdTrad () RETURNS INT(11)
    DECLARE res INT;
    SELECT MAX(IdTrad)+1 FROM translations INTO res;
    RETURN res;

this is also what you need to run in order to make forum posting work in your local installation. make sure your bewelcome mysql user has *execute* privileges.

latest version of dump can be found in

comment:3 Changed 7 years ago by crumbking

seems to work. I just was running it on my local maschine.

Note: See TracTickets for help on using tickets.