List:Commits« Previous MessageNext Message »
From:<gshchepa Date:April 18 2007 6:30pm
Subject:bk commit into 5.0 tree (gshchepa:1.2451) BUG#27704
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of uchum. When uchum 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@stripped, 2007-04-18 21:30:41+05:00, gshchepa@stripped +4 -0
  Bug#27704: row comparisation returns wrong results.
  Support for NULL cells was incomplete for row comparison.
  Fixed.

  mysql-test/r/row.result@stripped, 2007-04-18 21:24:33+05:00, gshchepa@stripped +201 -0
    Updated test case for Bug#27704: row comparisation returns 
    wrong results.

  mysql-test/t/row.test@stripped, 2007-04-18 21:22:33+05:00, gshchepa@stripped +111 -0
    Updated test case for Bug#27704: row comparisation returns 
    wrong results.

  sql/item_cmpfunc.cc@stripped, 2007-04-18 21:20:16+05:00, gshchepa@stripped +95 -4
    Bug#27704: row comparisation returns wrong results
    Particular Arg_comparator::compare_row_*() functions added.

  sql/item_cmpfunc.h@stripped, 2007-04-18 21:16:24+05:00, gshchepa@stripped +9 -0
    Bug#27704: row comparisation returns wrong results
    Particular Arg_comparator::compare_row_*() functions added.

# 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:	gshchepa
# Host:	gshchepa.loc
# Root:	/home/uchum/work/bk-trees/27704-1

--- 1.244/sql/item_cmpfunc.cc	2007-04-12 00:45:25 +05:00
+++ 1.245/sql/item_cmpfunc.cc	2007-04-18 21:20:16 +05:00
@@ -419,6 +419,31 @@ int Arg_comparator::set_compare_func(Ite
   switch (type) {
   case ROW_RESULT:
   {
+    /*
+      Row to row comparison algorithm depends on applied logical function:
+    */
+    switch (owner->functype()) {
+    case Item_func::EQ_FUNC:
+      func= &Arg_comparator::compare_row_eq;
+      break;
+    case Item_func::NE_FUNC:
+      func= &Arg_comparator::compare_row_ne;
+      break;
+    case Item_func::LT_FUNC:
+      func= &Arg_comparator::compare_row_lt;
+      break;
+    case Item_func::LE_FUNC:
+      func= &Arg_comparator::compare_row_le;
+      break;
+    case Item_func::GT_FUNC:
+      func= &Arg_comparator::compare_row_gt;
+      break;
+    case Item_func::GE_FUNC:
+      func= &Arg_comparator::compare_row_ge;
+      break;
+    default:
+      break;
+    }
     uint n= (*a)->cols();
     if (n != (*b)->cols())
     {
@@ -798,7 +823,18 @@ int Arg_comparator::compare_e_int_diff_s
   return (val1 >= 0) && test(val1 == val2);
 }
 
-int Arg_comparator::compare_row()
+/**
+  @brief Helper function for different row comparison functions.
+
+  @param neg_ret is a value to return in case of unsuccessful compare:
+         +1 for LT and LE, otherwise -1.
+  @param abort_on_null_local indicates, is it necessary to abort
+         comparison on NULL or not. Always false for NE,
+         true for LT, LE, GT and GE, otherwise is equal to
+         value of owner->abort_on_null.
+  @return value of last compared cells comparison result or neg_reg.
+*/
+int Arg_comparator::compare_row_hlp(int neg_ret, bool abort_on_null_local)
 {
   int res= 0;
   bool was_null= 0;
@@ -811,8 +847,8 @@ int Arg_comparator::compare_row()
     if (owner->null_value)
     {
       // NULL was compared
-      if (owner->abort_on_null)
-        return -1; // We do not need correct NULL returning
+      if (abort_on_null_local)
+        return neg_ret; // We do not need correct NULL returning
       was_null= 1;
       owner->null_value= 0;
       res= 0;  // continue comparison (maybe we will meet explicit difference)
@@ -827,11 +863,66 @@ int Arg_comparator::compare_row()
       explicit difference in other parts, so we have to return NULL
     */
     owner->null_value= 1;
-    return -1;
+    return neg_ret;
   }
   return 0;
 }
 
+/**
+ @brief Default function for ROW() to ROW() comparison.
+*/
+int Arg_comparator::compare_row()
+{
+  return compare_row_hlp(-1, owner->abort_on_null);
+}
+
+/**
+ @brief ROW() = ROW() comparison.
+*/
+int Arg_comparator::compare_row_eq()
+{
+  return compare_row();
+}
+
+/**
+ @brief ROW() <> ROW() comparison.
+*/
+int Arg_comparator::compare_row_ne()
+{
+  return compare_row_hlp(-1, false);
+}
+
+/**
+ @brief ROW() < ROW() comparison.
+*/
+int Arg_comparator::compare_row_lt()
+{
+  return compare_row_hlp(+1, true);
+}
+
+/**
+ @brief ROW() <= ROW() comparison.
+*/
+int Arg_comparator::compare_row_le()
+{
+  return compare_row_hlp(+1, true);
+}
+
+/**
+ @brief ROW() > ROW() comparison.
+*/
+int Arg_comparator::compare_row_gt()
+{
+  return compare_row_hlp(-1, true);
+}
+
+/**
+ @brief ROW() >= ROW() comparison.
+*/
+int Arg_comparator::compare_row_ge()
+{
+  return compare_row_hlp(-1, true);
+}
 
 int Arg_comparator::compare_e_row()
 {

--- 1.147/sql/item_cmpfunc.h	2007-04-04 04:11:25 +05:00
+++ 1.148/sql/item_cmpfunc.h	2007-04-18 21:16:24 +05:00
@@ -36,6 +36,9 @@ class Arg_comparator: public Sql_alloc
   Arg_comparator *comparators;   // used only for compare_row()
   double precision;
 
+protected:
+  int compare_row_hlp(int neg_ret, bool abort_on_null_local);
+
 public:
   DTCollation cmp_collation;
 
@@ -74,6 +77,12 @@ public:
   int compare_int_unsigned_signed();
   int compare_int_unsigned();
   int compare_row();             // compare args[0] & args[1]
+  int compare_row_eq();
+  int compare_row_ne();
+  int compare_row_lt();
+  int compare_row_le();
+  int compare_row_gt();
+  int compare_row_ge();
   int compare_e_string();	 // compare args[0] & args[1]
   int compare_e_binary_string(); // compare args[0] & args[1]
   int compare_e_real();          // compare args[0] & args[1]

--- 1.27/mysql-test/r/row.result	2007-04-12 00:45:25 +05:00
+++ 1.28/mysql-test/r/row.result	2007-04-18 21:24:33 +05:00
@@ -68,21 +68,102 @@ ROW(2,2,3)=ROW(1+1,2,3)
 SELECT ROW(1,2,3)=ROW(1+1,2,3);
 ROW(1,2,3)=ROW(1+1,2,3)
 0
+SELECT ROW(1,2,3)<ROW(1,2,3);
+ROW(1,2,3)<ROW(1,2,3)
+0
 SELECT ROW(1,2,3)<ROW(1+1,2,3);
 ROW(1,2,3)<ROW(1+1,2,3)
 1
+SELECT ROW(1,2,3)<ROW(1,2+1,3);
+ROW(1,2,3)<ROW(1,2+1,3)
+1
+SELECT ROW(1,2,3)<ROW(1,2,3+1);
+ROW(1,2,3)<ROW(1,2,3+1)
+1
+SELECT ROW(1+1,2,3)<ROW(1,2,3);
+ROW(1+1,2,3)<ROW(1,2,3)
+0
+SELECT ROW(1,2+1,3)<ROW(1,2,3);
+ROW(1,2+1,3)<ROW(1,2,3)
+0
+SELECT ROW(1,2,3+1)<ROW(1,2,3);
+ROW(1,2,3+1)<ROW(1,2,3)
+0
+SELECT ROW(1,2,3)>ROW(1,2,3);
+ROW(1,2,3)>ROW(1,2,3)
+0
 SELECT ROW(1,2,3)>ROW(1+1,2,3);
 ROW(1,2,3)>ROW(1+1,2,3)
 0
+SELECT ROW(1,2,3)>ROW(1,2+1,3);
+ROW(1,2,3)>ROW(1,2+1,3)
+0
+SELECT ROW(1,2,3)>ROW(1,2,3+1);
+ROW(1,2,3)>ROW(1,2,3+1)
+0
+SELECT ROW(1+1,2,3)>ROW(1,2,3);
+ROW(1+1,2,3)>ROW(1,2,3)
+1
+SELECT ROW(1,2+1,3)>ROW(1,2,3);
+ROW(1,2+1,3)>ROW(1,2,3)
+1
+SELECT ROW(1,2,3+1)>ROW(1,2,3);
+ROW(1,2,3+1)>ROW(1,2,3)
+1
+SELECT ROW(1,2,3)<=ROW(1,2,3);
+ROW(1,2,3)<=ROW(1,2,3)
+1
 SELECT ROW(1,2,3)<=ROW(1+1,2,3);
 ROW(1,2,3)<=ROW(1+1,2,3)
 1
+SELECT ROW(1,2,3)<=ROW(1,2+1,3);
+ROW(1,2,3)<=ROW(1,2+1,3)
+1
+SELECT ROW(1,2,3)<=ROW(1,2,3+1);
+ROW(1,2,3)<=ROW(1,2,3+1)
+1
+SELECT ROW(1+1,2,3)<=ROW(1,2,3);
+ROW(1+1,2,3)<=ROW(1,2,3)
+0
+SELECT ROW(1,2+1,3)<=ROW(1,2,3);
+ROW(1,2+1,3)<=ROW(1,2,3)
+0
+SELECT ROW(1,2,3+1)<=ROW(1,2,3);
+ROW(1,2,3+1)<=ROW(1,2,3)
+0
+SELECT ROW(1,2,3)>=ROW(1,2,3);
+ROW(1,2,3)>=ROW(1,2,3)
+1
 SELECT ROW(1,2,3)>=ROW(1+1,2,3);
 ROW(1,2,3)>=ROW(1+1,2,3)
 0
+SELECT ROW(1,2,3)>=ROW(1,2+1,3);
+ROW(1,2,3)>=ROW(1,2+1,3)
+0
+SELECT ROW(1,2,3)>=ROW(1,2,3+1);
+ROW(1,2,3)>=ROW(1,2,3+1)
+0
+SELECT ROW(1,2,3)<>ROW(1,2,3);
+ROW(1,2,3)<>ROW(1,2,3)
+0
 SELECT ROW(1,2,3)<>ROW(1+1,2,3);
 ROW(1,2,3)<>ROW(1+1,2,3)
 1
+SELECT ROW(1,2,3)<>ROW(1,2+1,3);
+ROW(1,2,3)<>ROW(1,2+1,3)
+1
+SELECT ROW(1,2,3)<>ROW(1,2,3+1);
+ROW(1,2,3)<>ROW(1,2,3+1)
+1
+SELECT ROW(1+1,2,3)<>ROW(1,2,3);
+ROW(1+1,2,3)<>ROW(1,2,3)
+1
+SELECT ROW(1,2+1,3)<>ROW(1,2,3);
+ROW(1,2+1,3)<>ROW(1,2,3)
+1
+SELECT ROW(1,2,3+1)<>ROW(1,2,3);
+ROW(1,2,3+1)<>ROW(1,2,3)
+1
 SELECT ROW(NULL,2,3)=ROW(NULL,2,3);
 ROW(NULL,2,3)=ROW(NULL,2,3)
 NULL
@@ -337,3 +418,123 @@ SELECT @x;
 @x
 99
 DROP TABLE t1;
+SELECT (1,3) <> (NULL,3+1) AS "1 expected:";
+1 expected:
+1
+SELECT 1 AS "1 expected:" FROM DUAL WHERE (1,3) <> (NULL,4);
+1 expected:
+1
+SELECT (1,3) < (NULL,3+1) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (NULL,3+1);
+empty set
+SELECT (1,3) < (1+1,NULL) AS "1 expected:";
+1 expected:
+1
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) < (1+1,NULL);
+1 expected
+1
+SELECT (1,3) < (1-1,NULL) AS "0 expected:";
+0 expected:
+0
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (1-1,NULL);
+empty set
+SELECT (1,3) < (NULL, 3+1) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (NULL, 3+1);
+empty set
+SELECT (1,3) <= (NULL,3) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL,3);
+empty set
+SELECT (1,3) <= (NULL,3+1) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL,3+1);
+empty set
+SELECT (1,3) <= (1,NULL) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (1,NULL);
+empty set
+SELECT (1,3) <= (1+1,NULL) AS "1 expected:";
+1 expected:
+1
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) <= (1+1,NULL);
+1 expected
+1
+SELECT (1,3) <= (1-1,NULL) AS "0 expected:";
+0 expected:
+0
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (1-1,NULL);
+empty set
+SELECT (1,3) <= (NULL, 3) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL, 3);
+empty set
+SELECT (1,3) <= (NULL, 3+1) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL, 3+1);
+empty set
+SELECT (1,3) > (NULL,3-1) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (NULL,3-1);
+empty set
+SELECT (1,3) > (1-1,NULL) AS "1 expected:";
+1 expected:
+1
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) > (1-1,NULL);
+1 expected
+1
+SELECT (1,3) > (1+1,NULL) AS "0 expected:";
+0 expected:
+0
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (1+1,NULL);
+empty set
+SELECT (1,3) > (NULL, 3-1) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (NULL, 3-1);
+empty set
+SELECT (1,3) >= (NULL,3) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL,3);
+empty set
+SELECT (1,3) >= (NULL,3-1) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL,3-1);
+empty set
+SELECT (1,3) >= (1,NULL) AS "NULL expected:";
+NULL expected:
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (1,NULL);
+empty set
+SELECT (1,3) >= (1-1,NULL) AS "1 expected:";
+1 expected:
+1
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) >= (1-1,NULL);
+1 expected
+1
+SELECT (1,3) >= (1+1,NULL) AS "0 expected:";
+0 expected:
+0
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (1+1,NULL);
+empty set
+SELECT (1,3) >= (NULL, 3) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL, 3);
+empty set
+SELECT (1,3) >= (NULL, 3-1) AS "NULL expected";
+NULL expected
+NULL
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL, 3-1);
+empty set

--- 1.23/mysql-test/t/row.test	2007-04-11 23:44:08 +05:00
+++ 1.24/mysql-test/t/row.test	2007-04-18 21:22:33 +05:00
@@ -30,11 +30,38 @@ SELECT (1,2,3)=(1,NULL,0);
 SELECT ROW(1,2,3)=ROW(1,2,3);
 SELECT ROW(2,2,3)=ROW(1+1,2,3);
 SELECT ROW(1,2,3)=ROW(1+1,2,3);
+SELECT ROW(1,2,3)<ROW(1,2,3);
 SELECT ROW(1,2,3)<ROW(1+1,2,3);
+SELECT ROW(1,2,3)<ROW(1,2+1,3);
+SELECT ROW(1,2,3)<ROW(1,2,3+1);
+SELECT ROW(1+1,2,3)<ROW(1,2,3);
+SELECT ROW(1,2+1,3)<ROW(1,2,3);
+SELECT ROW(1,2,3+1)<ROW(1,2,3);
+SELECT ROW(1,2,3)>ROW(1,2,3);
 SELECT ROW(1,2,3)>ROW(1+1,2,3);
+SELECT ROW(1,2,3)>ROW(1,2+1,3);
+SELECT ROW(1,2,3)>ROW(1,2,3+1);
+SELECT ROW(1+1,2,3)>ROW(1,2,3);
+SELECT ROW(1,2+1,3)>ROW(1,2,3);
+SELECT ROW(1,2,3+1)>ROW(1,2,3);
+SELECT ROW(1,2,3)<=ROW(1,2,3);
 SELECT ROW(1,2,3)<=ROW(1+1,2,3);
+SELECT ROW(1,2,3)<=ROW(1,2+1,3);
+SELECT ROW(1,2,3)<=ROW(1,2,3+1);
+SELECT ROW(1+1,2,3)<=ROW(1,2,3);
+SELECT ROW(1,2+1,3)<=ROW(1,2,3);
+SELECT ROW(1,2,3+1)<=ROW(1,2,3);
+SELECT ROW(1,2,3)>=ROW(1,2,3);
 SELECT ROW(1,2,3)>=ROW(1+1,2,3);
+SELECT ROW(1,2,3)>=ROW(1,2+1,3);
+SELECT ROW(1,2,3)>=ROW(1,2,3+1);
+SELECT ROW(1,2,3)<>ROW(1,2,3);
 SELECT ROW(1,2,3)<>ROW(1+1,2,3);
+SELECT ROW(1,2,3)<>ROW(1,2+1,3);
+SELECT ROW(1,2,3)<>ROW(1,2,3+1);
+SELECT ROW(1+1,2,3)<>ROW(1,2,3);
+SELECT ROW(1,2+1,3)<>ROW(1,2,3);
+SELECT ROW(1,2,3+1)<>ROW(1,2,3);
 SELECT ROW(NULL,2,3)=ROW(NULL,2,3);
 SELECT ROW(NULL,2,3)<=>ROW(NULL,2,3);
 SELECT ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5));
@@ -181,3 +208,87 @@ SET @x:= (SELECT h FROM t1 WHERE (a,b,c,
 SELECT @x;
 
 DROP TABLE t1;
+
+#
+# Bug#27704: row comparisation returns wrong results (row with NULLs)
+#
+
+# row <> row
+
+SELECT (1,3) <> (NULL,3+1) AS "1 expected:";
+SELECT 1 AS "1 expected:" FROM DUAL WHERE (1,3) <> (NULL,4);
+
+# row < row
+
+SELECT (1,3) < (NULL,3+1) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (NULL,3+1);
+
+SELECT (1,3) < (1+1,NULL) AS "1 expected:";
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) < (1+1,NULL);
+
+SELECT (1,3) < (1-1,NULL) AS "0 expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (1-1,NULL);
+
+SELECT (1,3) < (NULL, 3+1) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) < (NULL, 3+1);
+
+
+# row <= row
+
+SELECT (1,3) <= (NULL,3) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL,3);
+
+SELECT (1,3) <= (NULL,3+1) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL,3+1);
+
+SELECT (1,3) <= (1,NULL) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (1,NULL);
+
+SELECT (1,3) <= (1+1,NULL) AS "1 expected:";
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) <= (1+1,NULL);
+
+SELECT (1,3) <= (1-1,NULL) AS "0 expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (1-1,NULL);
+
+SELECT (1,3) <= (NULL, 3) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL, 3);
+
+SELECT (1,3) <= (NULL, 3+1) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) <= (NULL, 3+1);
+
+# row > row
+
+SELECT (1,3) > (NULL,3-1) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (NULL,3-1);
+
+SELECT (1,3) > (1-1,NULL) AS "1 expected:";
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) > (1-1,NULL);
+
+SELECT (1,3) > (1+1,NULL) AS "0 expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (1+1,NULL);
+
+SELECT (1,3) > (NULL, 3-1) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) > (NULL, 3-1);
+
+# row >= row
+
+SELECT (1,3) >= (NULL,3) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL,3);
+
+SELECT (1,3) >= (NULL,3-1) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL,3-1);
+
+SELECT (1,3) >= (1,NULL) AS "NULL expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (1,NULL);
+
+SELECT (1,3) >= (1-1,NULL) AS "1 expected:";
+SELECT 1 AS "1 expected" FROM DUAL WHERE (1,3) >= (1-1,NULL);
+
+SELECT (1,3) >= (1+1,NULL) AS "0 expected:";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (1+1,NULL);
+
+SELECT (1,3) >= (NULL, 3) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL, 3);
+
+SELECT (1,3) >= (NULL, 3-1) AS "NULL expected";
+SELECT "unreachable" AS "empty set" FROM DUAL WHERE (1,3) >= (NULL, 3-1);
Thread
bk commit into 5.0 tree (gshchepa:1.2451) BUG#27704gshchepa18 Apr