MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:eugene Date:August 12 2005 4:47pm
Subject:bk commit into 5.0 tree (evgen:1.1985) BUG#12298
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1985 05/08/12 20:47:32 evgen@stripped +3 -0
  Fix bug #12298 Typo in timestampdiff() function name results in erroneous 
  view being created.
  
  Item_func_timestamp_diff::func_name() were returning function name as
  "timestamp_diff" thus when view was executed function parameters wasn't 
  properly recognized and error was raised.

  sql/item_timefunc.h
    1.57 05/08/12 20:41:09 evgen@stripped +1 -1
    Fix bug #12298 Typo in timestampdiff() function name results in wrong view being created.

  mysql-test/r/view.result
    1.103 05/08/12 20:40:27 evgen@stripped +5 -0
    Test case for bug #12298 Typo in timestampdiff() function name results in erroneous view being created.

  mysql-test/t/view.test
    1.97 05/08/12 20:39:25 evgen@stripped +6 -1
    Test case for bug #12298 Typo in timestampdiff()  function name results in erroneous view being created.

# 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:	evgen
# Host:	moonbone.local
# Root:	/work/mysql-5.0-bug-12298

--- 1.56/sql/item_timefunc.h	2005-08-08 01:27:36 +04:00
+++ 1.57/sql/item_timefunc.h	2005-08-12 20:41:09 +04:00
@@ -860,7 +860,7 @@
 public:
   Item_func_timestamp_diff(Item *a,Item *b,interval_type type_arg)
     :Item_int_func(a,b), int_type(type_arg) {}
-  const char *func_name() const { return "timestamp_diff"; }
+  const char *func_name() const { return "timestampdiff"; }
   longlong val_int();
   void fix_length_and_dec()
   {

--- 1.102/mysql-test/r/view.result	2005-08-12 12:19:21 +04:00
+++ 1.103/mysql-test/r/view.result	2005-08-12 20:40:27 +04:00
@@ -2092,3 +2092,8 @@
 a
 DROP VIEW v1;
 DROP TABLE t1,t2,t3,t4,t5;
+create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00') as f1;
+select * from v1;
+f1
+1
+drop view v1;

--- 1.96/mysql-test/t/view.test	2005-08-12 12:18:48 +04:00
+++ 1.97/mysql-test/t/view.test	2005-08-12 20:39:25 +04:00
@@ -1936,4 +1936,9 @@
 DROP VIEW v1;
 DROP TABLE t1,t2,t3,t4,t5;
 
-
+#
+# Bug #12298 Typo in  function name results in erroneous view being created.
+#
+create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00') as f1;
+select * from v1;
+drop view v1;
Thread
bk commit into 5.0 tree (evgen:1.1985) BUG#12298eugene12 Aug