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@stripped, 2006-07-13 18:03:43+04:00, evgen@stripped +2 -0
Merge epotemkin@stripped:/home/bk/mysql-5.0-opt
into moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
MERGE: 1.2201.1.7
sql/item.h@stripped, 2006-07-13 18:03:40+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.200.3.1
sql/item_strfunc.cc@stripped, 2006-07-13 18:03:41+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.271.1.1
# 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: /home/evgen/bk-trees/mysql-5.0-opt/RESYNC
--- 1.202/sql/item.h 2006-07-13 18:03:47 +04:00
+++ 1.203/sql/item.h 2006-07-13 18:03:47 +04:00
@@ -697,9 +697,16 @@
Any new item which can be NULL must implement this call.
*/
virtual bool is_null() { return 0; }
+
/*
- it is "top level" item of WHERE clause and we do not need correct NULL
- handling
+ Inform the item that there will be no distinction between its result
+ being FALSE or NULL.
+
+ NOTE
+ This function will be called for eg. Items that are top-level AND-parts
+ of the WHERE clause. Items implementing this function (currently
+ Item_cond_and and subquery-related item) enable special optimizations
+ when they are "top level".
*/
virtual void top_level_item() {}
/*
--- 1.272/sql/item_strfunc.cc 2006-07-13 18:03:47 +04:00
+++ 1.273/sql/item_strfunc.cc 2006-07-13 18:03:47 +04:00
@@ -752,44 +752,47 @@
{
DBUG_ASSERT(fixed == 1);
String *res = args[0]->val_str(str);
- char *ptr,*end;
+ char *ptr, *end, *tmp;
if ((null_value=args[0]->null_value))
return 0;
/* An empty string is a special case as the string pointer may be null */
if (!res->length())
return &my_empty_string;
- res=copy_if_not_alloced(str,res,res->length());
- ptr = (char *) res->ptr();
- end=ptr+res->length();
+ if (tmp_value.alloced_length() < res->length() &&
+ tmp_value.realloc(res->length()))
+ {
+ null_value= 1;
+ return 0;
+ }
+ tmp_value.length(res->length());
+ tmp_value.set_charset(res->charset());
+ ptr= (char *) res->ptr();
+ end= ptr + res->length();
+ tmp= (char *) tmp_value.ptr() + tmp_value.length();
#ifdef USE_MB
if (use_mb(res->charset()))
{
- String tmpstr;
- tmpstr.copy(*res);
- char *tmp = (char *) tmpstr.ptr() + tmpstr.length();
register uint32 l;
while (ptr < end)
{
- if ((l=my_ismbchar(res->charset(), ptr,end)))
- tmp-=l, memcpy(tmp,ptr,l), ptr+=l;
+ if ((l= my_ismbchar(res->charset(),ptr,end)))
+ {
+ tmp-= l;
+ memcpy(tmp,ptr,l);
+ ptr+= l;
+ }
else
- *--tmp=*ptr++;
+ *--tmp= *ptr++;
}
- memcpy((char *) res->ptr(),(char *) tmpstr.ptr(), res->length());
}
else
#endif /* USE_MB */
{
- char tmp;
while (ptr < end)
- {
- tmp=*ptr;
- *ptr++=*--end;
- *end=tmp;
- }
+ *--tmp= *ptr++;
}
- return res;
+ return &tmp_value;
}
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.2214) | eugene | 15 Jul |