List:Internals« Previous MessageNext Message »
From:sanja Date:June 24 2005 9:02pm
Subject:bk commit into 5.0 tree (bell:1.2011) BUG#10651
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2011 05/06/24 22:02:19 bell@stripped +3 -0
  fixed var_samp printing (BUG#10651)

  sql/item_sum.h
    1.89 05/06/24 22:01:19 bell@stripped +2 -1
    fixed var_samp printing

  mysql-test/t/view.test
    1.76 05/06/24 22:01:19 bell@stripped +10 -0
    Using var_samp with view (BUG#10651)

  mysql-test/r/view.result
    1.88 05/06/24 22:01:19 bell@stripped +7 -0
    Using var_samp with view (BUG#10651)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bell
# Host:	sanja.is.com.ua
# Root:	/home/bell/mysql/bk/work-bug2-5.0

--- 1.88/sql/item_sum.h	Fri Jun 17 17:27:43 2005
+++ 1.89/sql/item_sum.h	Fri Jun 24 22:01:19 2005
@@ -479,7 +479,8 @@
   Item *result_item(Field *field)
   { return new Item_variance_field(this); }
   void no_rows_in_result() {}
-  const char *func_name() const { return "variance("; }
+  const char *func_name() const
+    { return sample ? "variance(" : "var_samp("; }
   Item *copy_or_same(THD* thd);
   Field *create_tmp_field(bool group, TABLE *table, uint convert_blob_length);
   enum Item_result result_type () const { return hybrid_type; }

--- 1.87/mysql-test/r/view.result	Fri Jun 24 20:47:16 2005
+++ 1.88/mysql-test/r/view.result	Fri Jun 24 22:01:19 2005
@@ -1850,3 +1850,10 @@
 SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1)
 dkjhgd
 drop view v1;
+create table t1 (s1 int);
+create view v1 as select var_samp(s1) from t1;
+show create view v1;
+View	Create View
+v1	CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select variance(`test`.`t1`.`s1`) AS
`var_samp(s1)` from `test`.`t1`
+drop view v1;
+drop table t1;

--- 1.75/mysql-test/t/view.test	Fri Jun 24 20:47:16 2005
+++ 1.76/mysql-test/t/view.test	Fri Jun 24 22:01:19 2005
@@ -1696,3 +1696,13 @@
 CREATE VIEW v1 AS SELECT SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1);
 SELECT * FROM v1;
 drop view v1;
+
+#
+# Using var_samp with view (BUG#10651)
+#
+create table t1 (s1 int);
+create view v1 as select var_samp(s1) from t1;
+show create view v1;
+drop view v1;
+drop table t1;
+
Thread
bk commit into 5.0 tree (bell:1.2011) BUG#10651sanja24 Jun