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
^^^
shouldn't that be aligned with the BATcount, i.e., type BUN (if possible)
or at least type wrd?
Stefan
> to allow the load of billions of records in a single copy command.
>
>
>
> U sql_parser.mx
> Index: sql_parser.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
> retrieving revision 1.291
> retrieving revision 1.292
> diff -u -d -r1.291 -r1.292
> --- sql_parser.mx 9 Sep 2008 13:28:49 -0000 1.291
> +++ sql_parser.mx 16 Sep 2008 14:55:41 -0000 1.292
> @@ -583,6 +583,8 @@
>
> %type <l_val>
> opt_start
> + lngval
> + poslng
> opt_increment
> opt_min
> opt_max
> @@ -2462,8 +2464,8 @@
>
> opt_nr:
> /* empty */ { $$ = NULL; }
> - | posint RECORDS { $$ = append_int(append_int(L(), $1), 0); }
> - | posint OFFSET posint RECORDS { $$ = append_int(append_int(L(), $1),
> $3); }
> + | poslng RECORDS { $$ = append_lng(append_lng(L(), $1), 0); }
> + | poslng OFFSET poslng RECORDS { $$ = append_lng(append_lng(L(), $1),
> $3); }
> ;
>
> opt_null_string:
> @@ -4118,6 +4120,17 @@
> }
> ;
>
> +
> +poslng:
> + lngval { $$ = $1;
> + if ($$ < 0) {
> + $$ = -1;
> + yyerror("Positive value expected");
> + YYABORT;
> + }
> + }
> + ;
> +
> posint:
> intval { $$ = $1;
> if ($$ < 0) {
> @@ -4394,6 +4407,10 @@
> { $$ = append_string($1, $3); }
> ;
>
> +lngval:
> + sqlINT { $$ = strtoll($1,NULL,10); }
> +;
> +
> intval:
> sqlINT { $$ = strtol($1,NULL,10); }
> | IDENT { mvc *m = (mvc*)parm;
>
> 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;
>
> - 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;
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-sql-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins
>
--
| Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
| 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 |
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers