
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Windows XP, FlameRobin
|
|
Issue Links:
|
Relate
|
|
This issue relate to:
|
|
CORE-2584
Wrong results for CASE used together with GROUP BY
|
|
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
I think this runs wrong:
CREATE GENERATOR LOGID;
set generator LOGID to 0;
CREATE TABLE LOGBOOK
( ID integer not null,
TS timestamp,
ENTRY varchar(64),
PRIMARY KEY (ID));
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 1');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 2');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 3');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 4');
select * from logbook;
/* ID in table LOGBOOK is not incremented by 1, but by 3.
Workaround is possible with stored procedure: */
set term ^ ;
create procedure logrow(txt varchar(64)) as
declare variable lid integer;
begin
lid = gen_id(LOGID, 1);
update or insert into logbook (id, ts, entry)
values (:lid, 'now',:txt);
end^
set term ; ^
execute procedure logrow('Test 1');
execute procedure logrow('Test 2');
execute procedure logrow('Test 3');
execute procedure logrow('Test 4');
select * from logbook;
|
|
Description
|
I think this runs wrong:
CREATE GENERATOR LOGID;
set generator LOGID to 0;
CREATE TABLE LOGBOOK
( ID integer not null,
TS timestamp,
ENTRY varchar(64),
PRIMARY KEY (ID));
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 1');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 2');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 3');
update or insert into logbook (id, ts, entry) values (gen_id(LOGID, 1), 'now','Testing 4');
select * from logbook;
/* ID in table LOGBOOK is not incremented by 1, but by 3.
Workaround is possible with stored procedure: */
set term ^ ;
create procedure logrow(txt varchar(64)) as
declare variable lid integer;
begin
lid = gen_id(LOGID, 1);
update or insert into logbook (id, ts, entry)
values (:lid, 'now',:txt);
end^
set term ; ^
execute procedure logrow('Test 1');
execute procedure logrow('Test 2');
execute procedure logrow('Test 3');
execute procedure logrow('Test 4');
select * from logbook; |
Show » |
|