List:Internals« Previous MessageNext Message »
From:sanja Date:June 28 2005 10:13pm
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/28 23:13:03 bell@stripped +4 -0
  fixed var_samp printing (BUG#10651)

  sql/item_sum.h
    1.89 05/06/28 23:12:57 bell@stripped +2 -1
    fixed var_samp printing

  mysql-test/t/view.test
    1.76 05/06/28 23:12:57 bell@stripped +10 -0
    Using var_samp with view (BUG#10651)

  mysql-test/r/view.result
    1.88 05/06/28 23:12:57 bell@stripped +7 -0
    Using var_samp with view (BUG#10651)

  mysql-test/r/select.result
    1.66 05/06/28 23:12:57 bell@stripped +1 -1
    function name was corrected

# 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	Tue Jun 28 23:12:57 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	Tue Jun 28 23:12:57 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	Tue Jun 28 23:12:57 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;
+

--- 1.65/mysql-test/r/select.result	Thu Jun 16 10:17:06 2005
+++ 1.66/mysql-test/r/select.result	Tue Jun 28 23:12:57 2005
@@ -1472,7 +1472,7 @@
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
 Warnings:
-Note	1003	select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS
`min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS
`sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS
`std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where
((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> _latin1''))
+Note	1003	select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS
`min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS
`sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS
`std(fld1)`,var_samp(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where
((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> _latin1''))
 select
companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from
t2 group by companynr limit 3;
 companynr	count(*)	min(fld4)	max(fld4)	sum(fld1)	avg(fld1)	std(fld1)	variance(fld1)
 00	82	Anthony	windmills	10355753	126289.6707	115550.9757	13352027981.7087
Thread
bk commit into 5.0 tree (bell:1.2011) BUG#10651sanja28 Jun