ibWebAdmin seems to have a bug with generator

Jacob Lee
2009-10-19
2013-04-08
  • Jacob Lee
    Jacob Lee
    2009-10-19

    ibWebAdmin seems to have a bug in dealing with generators.

    reproduce:

    1. create table
    create table guestbook (id integer primary key, name varchar(20));

    2. create generator
    create generator gen_guestbook_id;

    3. finally create trigger for autoincement
    create trigger trig_guestbook_id for guestbook
    active before insert position 0
    as
    begin
    if (new.id is null or new.id <= 0) then new.id = gen_id(gen_guestbook_id, 1);
    end

    this code has no problem with isql but when working with ibWebAdmin it gives error after creating generator. I cannot remember exact error message but it looks like:
    ibase_errmsg: identifier gen_guestbook_id … is too long.

    with this error message ibWebAdmin dies.

    version: 2.0 pre

     
  • Jacob Lee
    Jacob Lee
    2009-10-19

    oops: gen_ guestbook_ id

    I did put space after"_" because it makes italics and "_" disappear!

     
  • Jacob Lee
    Jacob Lee
    2009-10-19

    temporally fixed…

    I removed $quote from accessories.php made code like:
    $lsql = 'SELECT gen_id(' . fb_escape_string($row->GNAME) . ', 0) AS VAL FROM RDB$DATABASE';

    the line number is around 118