On Wed, Apr 30, 2008 at 10:24:36AM +0200, Nadeem Iftikhar wrote:
Hi I tried the following link to report the bug, but it does not work
Please find the MonetDB bug tracker system via http://monetdb.cwi.nl/ -> "Bugs" at http://sourceforge.net/tracker/?atid=482468&group_id=56967&func=browse Stefan
Bug.....
I need to insert some null values into a table via a procedure.
I created the table and did insert two rows. One with (insert into) command and second with (insert into ..select) command. Both commands work well and I could see two rows added in result.
When I used the same (insert into.. select) command in a procedure. It behaves in a strange fashion. It shows that a row has been affected, but does not show the newly added row. If the rows are counted, it gives the correct count which is (3) in this case but still I could not see the last row which is added via a procedure.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
create sequence "ff" as integer start with 1; CREATE TABLE t1(timeid INT DEFAULT NEXT VALUE FOR "ff" PRIMARY KEY, a INT, b INT, c INT, d INT, e INT, f VARCHAR(20), g VARCHAR(20), h INT, i VARCHAR(10), j VARCHAR(10), k VARCHAR(10), l INT, m INT, n VARCHAR(10), o VARCHAR(10), p VARCHAR(10), q VARCHAR(15), r INT );
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' And then insert a row
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
insert into t1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) values(1, 1, 1, 1, 1, 'first row', 'first row',1, 'first row', 'first row', 'first row',1,1, 'first row', 'first row', 'first row', 'first row', 1); select * from
t1;sql>sql>sql>sql>more>more>more>more>more>more>more>more>more>more>more>more>more>more>more>more>more>more>more>sql>
sql>Rows affected 1 sql>
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+ | time |a |b |c |d |e |f |g |h |i |j |k |l |m |n |o |p |q |r | : id | | | | | | | | | | | | | | | | | | |
+======+==+==+==+==+==+=====+=====+==+=====+======+======+==+==+======+======+======+======+==+ | 1 |1 |1 |1 |1 |1 |firs |firs |1 |firs |first |first |1 |1 |first |first |first |first |1 | : | | | | | |t |t | |t |row |row | | |row |row |row |row | | : | | | | | |row |row | |row | | | | | | | | | |
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Every thing is fine so far ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sql>insert into t1(a, b, c, d, e, f, g, h) select a, b, c, d, e, f, g, h from t1 where timeid = 1; Rows affected 1
sql>select * from t1;
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+ | time |a |b |c |d |e |f |g |h |i |j |k |l |m |n |o |p |q |r | : id | | | | | | | | | | | | | | | | | | |
+======+==+==+==+==+==+=====+=====+==+=====+======+======+==+==+======+======+======+======+==+ | 1 |1 |1 |1 |1 |1 |firs |firs |1 |firs |first |first |1 |1 |first |first |first |first |1 | : | | | | | |t |t | |t |row |row | | |row |row |row |row | | : | | | | | |row |row | |row | | | | | | | | | | | 2 |1 |1 |1 |1 |1 |firs |firs |1 |null |null |null |n |n |null |null |null |null |n | : | | | | | |t |t | | | | |u |u | | | | |u | : | | | | | |row |row | | | | |l |l | | | | |l | : | | | | | | | | | | | |l |l | | | | |l |
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' inserted another row and it works fine
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sql>create procedure tt() begin insert into t1(a, b, c, d, e, f, g, h) select a, b, c, d, e, f, g, h from t1 where timeid = 1; end;
call tt();
select * from t1;
more>more>more>
sql>Rows affected 1
sql>+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+ | time |a |b |c |d |e |f |g |h |i |j |k |l |m |n |o |p |q |r | : id | | | | | | | | | | | | | | | | | | |
+======+==+==+==+==+==+=====+=====+==+=====+======+======+==+==+======+======+======+======+==+ | 1 |1 |1 |1 |1 |1 |firs |firs |1 |firs |first |first |1 |1 |first |first |first |first |1 | : | | | | | |t |t | |t |row |row | | |row |row |row |row | | : | | | | | |row |row | |row | | | | | | | | | | | 2 |1 |1 |1 |1 |1 |firs |firs |1 |null |null |null |n |n |null |null |null |null |n | : | | | | | |t |t | | | | |u |u | | | | |u | : | | | | | |row |row | | | | |l |l | | | | |l | : | | | | | | | | | | | |l |l | | | | |l |
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' The problem starts now: when I try to insert the row via a procedure it shows that row effected 1 but does not show the row.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sql>select count(*) from t1; +--------+ | count_ | +========+ | 3 | +--------+
sql>select timeid from t1; +--------+ | timeid | +========+ | 1 | | 2 | | 3 | +--------+ sql>select * from t1;
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+ | time |a |b |c |d |e |f |g |h |i |j |k |l |m |n |o |p |q |r | : id | | | | | | | | | | | | | | | | | | |
+======+==+==+==+==+==+=====+=====+==+=====+======+======+==+==+======+======+======+======+==+ | 1 |1 |1 |1 |1 |1 |firs |firs |1 |firs |first |first |1 |1 |first |first |first |first |1 | : | | | | | |t |t | |t |row |row | | |row |row |row |row | | : | | | | | |row |row | |row | | | | | | | | | | | 2 |1 |1 |1 |1 |1 |firs |firs |1 |null |null |null |n |n |null |null |null |null |n | : | | | | | |t |t | | | | |u |u | | | | |u | : | | | | | |row |row | | | | |l |l | | | | |l | : | | | | | | | | | | | |l |l | | | | |l |
+------+--+--+--+--+--+-----+-----+--+-----+------+------+--+--+------+------+------+------+--+ sql>
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' I could not see the 3rd row ***********************************
Regards,
Nadeem Iftikhar, Ph.D. Fellow Department of Computer Science, Aalborg University Selma Lagerlöfs Vej 300, DK-9220 Aalborg Øst, Denmark Phone: (+45) 9940 9830, fax: (+45) 9940 9798 E-mail: nadeem@cs.aau.dk; nadeem@ieee.org Home Page: http://www.cs.aau.dk/~nadeem
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao... _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |