Bugs item #2790020, was opened at 2009-05-11 11:08
Message generated for change (Comment added) made by nielsnes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2790020&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL "stable"
>Status: Closed
>Resolution: Fixed
Priority: 9
Private: Yes
Submitted By: z lh (zlh)
Assigned to: Niels Nes (nielsnes)
Summary: uBAT&logger_manger: can not update column

Initial Comment:
can not update column ,
update the same column several times, the column will always be the first 
'update' after restart the server !!!!
if the uBAT is created using the log.*  , it will replace the main BAT every 
time when the server starts . 

server : MonetDB-Feb2009-SuperBall-SP2

step :
0. create table t2( a int ) ;   
   insert into t2 values( 1 ) ;
                
1. update t2 set a = 2 ;

2. -- stop and restart server

3. update t2 set a = 3 ;
   -- update another talbe t1                           ( change rows > 1000    
)
   -- waite untill the log.* is empty ( less than 30s                           
)
 
   -- stop the server
   -- restart server
   
4. select a from t2 ;
   -- the result is 2, but it should be 3




case :

-------------------------------------------------
drop table t2 ;
create table t2( a int ) ; 
insert into t2 values( 1 ) ; 

update t2 set a = 2 ;

-- stop the server(I use Ctrl+C), now , the log.* is not empty
-- [...@localhost sql]$ pwd
-- /home/zlh/MonetDB_Feb2009/MonetDB/var/MonetDB5/sql_logs/testdb/sql

--------------------------------------------------
-- restart server, now , the log.* is empty

update t2 set a = 3 ;
select * from t2 ;

drop table t1;
create table t1( a int ) ; 
insert into t1 values( 1 ) ; 
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
insert into t1 select a from t1;
-- 2048 rows

-- waite untill the log.* is empty, !!!!!
-- then stop the server 

----------------------------------------------------
-- restart server
select * from t2;



detail :

[...@localhost var]$ /home/zlh/MonetDB_Feb2009/MonetDB/bin/mserver5 --dbinit 
'include sql; --dbname testdb
# MonetDB server v5.10.4, based on kernel v1.28.4
# Serving database 'testdb', using 2 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
#warning: please don't forget to set your vault key!
#(see /home/zlh/MonetDB_Feb2009/MonetDB/etc/monetdb5.conf)
# Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
# MonetDB/SQL module v2.28.4 loaded


[...@localhost ~]$ /home/zlh/MonetDB_Feb2009/MonetDB/bin/mclient -lsql -dtestdb 
sql>drop table t2 ;
0 tuples
sql>create table t2( a int ) ; 
0 tuples
sql>insert into t2 values( 1 ) ; 
Rows affected 1
sql>update t2 set a = 2 ;
Rows affected 1
sql>
[...@localhost ~]$ /home/zlh/MonetDB_Feb2009/MonetDB/bin/mclient -lsql -dtestdb 
sql>--restart server
0 tuples
sql>update t2 set a = 3 ;
Rows affected 1
sql>select * from t2 ;
+---+
| a |
+===+
| 3 |
+---+
1 tuple
sql>
0 tuples
sql>drop table t1;
0 tuples
sql>create table t1( a int ) ; 
0 tuples
sql>insert into t1 values( 1 ) ; 
Rows affected 1
sql>insert into t1 select a from t1;
Rows affected 1
sql>insert into t1 select a from t1;
Rows affected 2
sql>insert into t1 select a from t1;
Rows affected 4
sql>insert into t1 select a from t1;
Rows affected 8
sql>insert into t1 select a from t1;
Rows affected 16
sql>insert into t1 select a from t1;
Rows affected 32
sql>insert into t1 select a from t1;
Rows affected 64
sql>insert into t1 select a from t1;
Rows affected 128
sql>insert into t1 select a from t1;
Rows affected 256
sql>insert into t1 select a from t1;
Rows affected 512
sql>insert into t1 select a from t1;
Rows affected 1024
sql>-- 2048 rows
0 tuples
sql>
[...@localhost ~]$ /home/zlh/MonetDB_Feb2009/MonetDB/bin/mclient -lsql -dtestdb 
sql>select * from t2;
+---+
| a |
+===+
| 2 |
+---+
1 tuple
sql>



[...@localhost sql]$ pwd
/home/zlh/MonetDB_Feb2009/MonetDB/var/MonetDB5/sql_logs/testdb/sql
[...@localhost sql]$ ll
total 148
-rw-rw-r-- 1 zlh zlh     10 May 11 15:58 log
-rw-rw-r-- 1 zlh zlh 131128 May 11 15:58 log.8
[...@localhost sql]$ ll
total 148
-rw-rw-r-- 1 zlh zlh     10 May 11 15:58 log
-rw-rw-r-- 1 zlh zlh 131128 May 11 15:58 log.8
[...@localhost sql]$ ll
total 12
-rw-rw-r-- 1 zlh zlh 10 May 11 15:59 log
-rw-rw-r-- 1 zlh zlh  0 May 11 15:59 log.9



----------------------------------------------------------------------

>Comment By: Niels Nes (nielsnes)
Date: 2009-05-28 20:14

Message:
this bug is fixed. We now use the delta_log for updates. 

----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2009-05-20 13:51

Message:
I can reproduce the problem.
Test added: src/test/BugTracker-2009 lost_update.SF-2790020


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2790020&group_id=56967

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to