[Monetdb-developers] [Monetdb-sql-checkins] sql/src/server sql_parser.mx, , 1.291, 1.292 sql_updates.mx, , 1.145, 1.146

Romulo Goncalves R.A.Goncalves at cwi.nl
Tue Sep 16 18:57:29 CEST 2008


Stefan Manegold wrote:
> On Tue, Sep 16, 2008 at 02:55:45PM +0000, Romulo Goncalves wrote:
>> Update of /cvsroot/monetdb/sql/src/server
>> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12591
>>
>> Modified Files:
>> 	sql_parser.mx sql_updates.mx 
>> Log Message:
>> The number of records should be type lng 
>> to allow the load of billions of records in a single copy command.
> 
> [...]
> 
>> U sql_updates.mx
>> Index: sql_updates.mx
>> ===================================================================
>> RCS file: /cvsroot/monetdb/sql/src/server/sql_updates.mx,v
>> retrieving revision 1.145
>> retrieving revision 1.146
>> diff -u -d -r1.145 -r1.146
>> --- sql_updates.mx	7 Sep 2008 14:28:00 -0000	1.145
>> +++ sql_updates.mx	16 Sep 2008 14:55:42 -0000	1.146
>> @@ -1411,11 +1411,11 @@
>>  	char *ssep = (seps->h->next->next)?seps->h->next->next->data.sval:"\"";
>>  	char *ns = (null_string)?null_string:"null";
>>  	list *slist;
>> -	int nr = (nr_offset)?nr_offset->h->data.i_val:-1;
>> -	int offset = (nr_offset)?nr_offset->h->next->data.i_val:0;
>> +	lng nr = (nr_offset)?nr_offset->h->data.i_val:-1;
> 	^^^                                     ^
>> +	lng offset = (nr_offset)?nr_offset->h->next->data.i_val:0;
> 	^^^                                               ^
> shouldn't these be "l_val", now?
Yes the cleaning is coming...

For the moment I will use type lng (l_val) in all the places. However, 
we should use wrd and do the check if the long fits or not (32bits or 64 
bits) to have a perfect job.

I need to know where is the best place. In my opinion it should be in 
the parser, but I do not know yet how to do the check there. Niels never 
did it there. I need to talk with him to see where is the best place for 
the check....

Thanks for the check ;)

Romulo
>                     ^
> 
>>  
>> -	assert(!nr_offset || nr_offset->h->type == type_int);
>> -	assert(!nr_offset || nr_offset->h->next->type == type_int);
>> +	assert(!nr_offset || nr_offset->h->type == type_lng);
> 	                                                ^^^
>> +	assert(!nr_offset || nr_offset->h->next->type == type_lng);
> 	                                                      ^^^
>>  	if (sname && !(s=mvc_bind_schema(sql, sname))) {
>>  		(void) sql_error(sql, 02, "COPY INTO: no such schema '%s'", sname);
>>  		return NULL;
> 





More information about the developers-list mailing list