Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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-01-12 12:33:30+04:00, gluh@stripped +7 -0
Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
MERGE: 1.1616.2873.40
mysql-test/r/delete.result@stripped, 2007-01-12 12:33:29+04:00, gluh@stripped +9 -26
manual merge
MERGE: 1.21.1.3
mysql-test/r/func_str.result@stripped, 2007-01-12 12:29:17+04:00, gluh@stripped +0 -13
MERGE: 1.70.1.34
mysql-test/t/delete.test@stripped, 2007-01-12 12:33:29+04:00, gluh@stripped +7 -34
manual merge
MERGE: 1.19.1.4
mysql-test/t/func_str.test@stripped, 2007-01-12 12:26:25+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.64.1.22
sql/item_strfunc.cc@stripped, 2007-01-12 12:26:25+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.196.6.20
sql/item_strfunc.h@stripped, 2007-01-12 12:26:25+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.73.2.20
sql/sql_delete.cc@stripped, 2007-01-12 12:26:25+04:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.99.2.44
# 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: gluh
# Host: eagle.(none)
# Root: /home/gluh/MySQL/Merge/5.0-opt/RESYNC
--- 1.292/sql/item_strfunc.cc 2006-12-31 12:39:17 +04:00
+++ 1.293/sql/item_strfunc.cc 2007-01-12 12:26:25 +04:00
@@ -1694,6 +1694,19 @@ String *Item_func_encode::val_str(String
return res;
}
+void Item_func_encode::print(String *str)
+{
+ str->append(func_name());
+ str->append('(');
+ args[0]->print(str);
+ str->append(',');
+ str->append('\'');
+ str->append(seed);
+ str->append('\'');
+ str->append(')');
+}
+
+
String *Item_func_decode::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
--- 1.119/sql/item_strfunc.h 2006-12-23 23:04:24 +04:00
+++ 1.120/sql/item_strfunc.h 2007-01-12 12:26:25 +04:00
@@ -358,19 +358,24 @@ class Item_func_encode :public Item_str_
{
protected:
SQL_CRYPT sql_crypt;
+ String seed;
public:
- Item_func_encode(Item *a, char *seed):
- Item_str_func(a),sql_crypt(seed) {}
+ Item_func_encode(Item *a, char *seed_arg):
+ Item_str_func(a), sql_crypt(seed_arg)
+ {
+ seed.copy(seed_arg, strlen(seed_arg), default_charset_info);
+ }
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "encode"; }
+ void print(String *str);
};
class Item_func_decode :public Item_func_encode
{
public:
- Item_func_decode(Item *a, char *seed): Item_func_encode(a,seed) {}
+ Item_func_decode(Item *a, char *seed_arg): Item_func_encode(a, seed_arg) {}
String *val_str(String *);
const char *func_name() const { return "decode"; }
};
--- 1.188/sql/sql_delete.cc 2006-12-23 23:04:27 +04:00
+++ 1.189/sql/sql_delete.cc 2007-01-12 12:26:25 +04:00
@@ -162,7 +162,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *
DBUG_RETURN(TRUE);
}
- if (!select && limit != HA_POS_ERROR)
+ if ((!select || table->quick_keys.is_clear_all()) && limit !=
HA_POS_ERROR)
usable_index= get_index_for_order(table, (ORDER*)(order->first), limit);
if (usable_index == MAX_KEY)
--- 1.24/mysql-test/t/delete.test 2006-10-31 08:53:21 +04:00
+++ 1.25/mysql-test/t/delete.test 2007-01-12 12:33:29 +04:00
@@ -163,32 +163,15 @@ delete `4.t1` from t1 as `4.t1` where `4
delete FROM `4.t1` USING t1 as `4.t1` where `4.t1`.a = 5;
drop table t1;
-# End of 4.1 tests
-
-#
-# Test of multi-delete where we are not scanning the first table
-#
-
-CREATE TABLE t1 (a int not null,b int not null);
-CREATE TABLE t2 (a int not null, b int not null, primary key (a,b));
-CREATE TABLE t3 (a int not null, b int not null, primary key (a,b));
-insert into t1 values (1,1),(2,1),(1,3);
-insert into t2 values (1,1),(2,2),(3,3);
-insert into t3 values (1,1),(2,1),(1,3);
-select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-explain select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-# This should be empty
-select * from t3;
-drop table t1,t2,t3;
#
# Bug #8143: deleting '0000-00-00' values using IS NULL
#
-create table t1(a date not null);
-insert into t1 values (0);
-select * from t1 where a is null;
-delete from t1 where a is null;
-select count(*) from t1;
-drop table t1;
+create table t1(a date not null);
+insert into t1 values (0);
+select * from t1 where a is null;
+delete from t1 where a is null;
+select count(*) from t1;
+drop table t1;
+
--- 1.98/mysql-test/t/func_str.test 2006-12-20 02:54:09 +04:00
+++ 1.99/mysql-test/t/func_str.test 2007-01-12 12:26:25 +04:00
@@ -730,6 +730,14 @@ EXPLAIN EXTENDED SELECT s FROM t1 WHERE
DROP TABLE t1;
+#
+# Bug#23409: ENCODE() and DECODE() functions aren't printed correctly
+#
+create table t1(f1 varchar(4));
+explain extended select encode(f1,'zxcv') as 'enc' from t1;
+explain extended select decode(f1,'zxcv') as 'enc' from t1;
+drop table t1;
+
--echo End of 4.1 tests
#
--- 1.26/mysql-test/r/delete.result 2006-10-31 08:52:32 +04:00
+++ 1.27/mysql-test/r/delete.result 2007-01-12 12:33:29 +04:00
@@ -176,26 +176,16 @@ create table t1 (a int);
delete `4.t1` from t1 as `4.t1` where `4.t1`.a = 5;
delete FROM `4.t1` USING t1 as `4.t1` where `4.t1`.a = 5;
drop table t1;
-CREATE TABLE t1 (a int not null,b int not null);
-CREATE TABLE t2 (a int not null, b int not null, primary key (a,b));
-CREATE TABLE t3 (a int not null, b int not null, primary key (a,b));
-insert into t1 values (1,1),(2,1),(1,3);
-insert into t2 values (1,1),(2,2),(3,3);
-insert into t3 values (1,1),(2,1),(1,3);
-select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-a b a b a b
-1 1 1 1 1 1
-2 1 2 2 2 1
-1 3 1 1 1 3
-explain select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b,test.t1.b 1 Using index
-delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b;
-select * from t3;
-a b
-drop table t1,t2,t3;
+create table t1(a date not null);
+insert into t1 values (0);
+select * from t1 where a is null;
+a
+0000-00-00
+delete from t1 where a is null;
+select count(*) from t1;
+count(*)
+0
+drop table t1;
create table t1(a date not null);
insert into t1 values (0);
select * from t1 where a is null;
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2378) | gluh | 12 Jan |