Update of /cvsroot/monetdb/sql/src/storage
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4764/src/storage

Modified Files:
        store.mx store_sequence.mx 
Log Message:
For avg we now always first change to doubles.
With this we can now rewrite all 'avg's into sum/cnt.

approved slight rounding changes

approved output after changes on the optimizers

approved tests which changed because of number of default functions changed



U store.mx
Index: store.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/store.mx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- store.mx    13 May 2009 18:04:17 -0000      1.29
+++ store.mx    4 Jun 2009 20:27:54 -0000       1.30
@@ -3574,11 +3574,12 @@
                void *p = val ? val : ATOMnilptr(TYPE_str);
                sql_schema *syss = find_sql_schema(tr, 
isGlobalTable(col->t)?"sys":"tmp"); 
                sql_table *syscolumn = find_sql_table(syss, "_columns");
-               ssize_t rid = table_funcs.column_find_row(tr, 
find_sql_column(syscolumn, "id"),
-                                         &col->base.id, NULL);
+               sql_column *col_ids = find_sql_column(syscolumn, "id");
+               sql_column *col_dfs = find_sql_column(syscolumn, "default");
+               ssize_t rid = table_funcs.column_find_row(tr, col_ids, 
&col->base.id, NULL);
 
                assert(rid != -1);
-               table_funcs.column_update_value(tr, find_sql_column(syscolumn, 
"default"), rid, p);
+               table_funcs.column_update_value(tr, col_dfs, rid, p);
                if (col->def)
                        _DELETE(col->def);
                col->def = NULL;

U store_sequence.mx
Index: store_sequence.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/store_sequence.mx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- store_sequence.mx   7 Jan 2009 14:19:29 -0000       1.5
+++ store_sequence.mx   4 Jun 2009 20:27:54 -0000       1.6
@@ -132,7 +132,7 @@
        {
                /* we're out of numbers */
                store_unlock();
-               return(0);
+               return 0;
        }
        sql_update_sequence_cache(seq, s->cached);
        store_unlock(); 
@@ -177,7 +177,7 @@
                        save = 1;
                } else { /* we're out of numbers */
                        store_unlock();
-                       return(0);
+                       return 0;
                }
        }
        s->called = 1;
@@ -217,6 +217,7 @@
                s = sql_create_sequence(seq);
                if (!s) {
                        _DELETE(sb);
+                       store_unlock();
                        return NULL;
                }
                list_append(sql_seqs, s);
@@ -229,7 +230,6 @@
 
 void seqbulk_destroy(seqbulk *sb)
 {
-
        if (sb->save) {
                sql_sequence *seq = sb->seq;
                store_sequence *s = sb->internal_seq;
@@ -258,7 +258,7 @@
                        s->cur = seq->minvalue;
                        sb->save = 1;
                } else { /* we're out of numbers */
-                       return(0);
+                       return 0;
                }
        }
        s->called = 1;
@@ -308,7 +308,7 @@
                        *val = seq->minvalue;
                } else { /* we're out of numbers */
                        store_unlock();
-                       return(0);
+                       return 0;
                }
        }
        store_unlock();


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to