mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
merge
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union BUILD/FINISH.sh: Auto merged BUILD/SETUP.sh: Auto merged BUILD/compile-pentium-debug: Auto merged acconfig.h: Auto merged client/mysql.cc: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged heap/hp_rfirst.c: Auto merged heap/hp_rnext.c: Auto merged include/my_sys.h: Auto merged include/myisam.h: Auto merged libmysql/Makefile.shared: Auto merged myisam/mi_write.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/heap.result: Auto merged mysql-test/r/select_found.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/t/heap.test: Auto merged mysql-test/t/select_found.test: Auto merged mysql-test/t/union.test: Auto merged mysys/mf_iocache2.c: Auto merged mysys/my_vsnprintf.c: Auto merged sql/convert.cc: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/filesort.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/opt_sum.cc: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/structs.h: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged strings/Makefile.am: Auto merged
This commit is contained in:
commit
fdc446d0c6
174 changed files with 54888 additions and 1441 deletions
|
|
@ -205,7 +205,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
|||
|
||||
err:
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info))
|
||||
if (param.tmp_buffer)
|
||||
x_free(param.tmp_buffer);
|
||||
#endif
|
||||
x_free((gptr) sort_keys);
|
||||
|
|
@ -467,6 +467,8 @@ static void make_sortkey(register SORTPARAM *param,
|
|||
switch (sort_field->result_type) {
|
||||
case STRING_RESULT:
|
||||
{
|
||||
CHARSET_INFO *cs=item->str_value.charset();
|
||||
|
||||
if (item->maybe_null)
|
||||
*to++=1;
|
||||
/* All item->str() to use some extra byte for end null.. */
|
||||
|
|
@ -492,7 +494,7 @@ static void make_sortkey(register SORTPARAM *param,
|
|||
length=sort_field->length;
|
||||
}
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info))
|
||||
if(use_strcoll(cs))
|
||||
{
|
||||
if (item->binary)
|
||||
{
|
||||
|
|
@ -509,10 +511,8 @@ static void make_sortkey(register SORTPARAM *param,
|
|||
memcpy(param->tmp_buffer,from,length);
|
||||
from=param->tmp_buffer;
|
||||
}
|
||||
uint tmp_length=my_strnxfrm(default_charset_info,
|
||||
to,(unsigned char *) from,
|
||||
sort_field->length,
|
||||
length);
|
||||
uint tmp_length=my_strnxfrm(cs,to,sort_field->length,
|
||||
(unsigned char *) from, length);
|
||||
if (tmp_length < sort_field->length)
|
||||
bzero((char*) to+tmp_length,sort_field->length-tmp_length);
|
||||
}
|
||||
|
|
@ -524,7 +524,7 @@ static void make_sortkey(register SORTPARAM *param,
|
|||
memcpy(to,res->ptr(),length);
|
||||
bzero((char *)to+length,diff);
|
||||
if (!item->binary)
|
||||
case_sort((char*) to,length);
|
||||
case_sort(cs, (char*) to,length);
|
||||
#ifdef USE_STRCOLL
|
||||
}
|
||||
#endif
|
||||
|
|
@ -921,8 +921,13 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
|
|||
{
|
||||
sortorder->length=sortorder->field->pack_length();
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info) && !sortorder->field->binary())
|
||||
sortorder->length= sortorder->length*MY_STRXFRM_MULTIPLY;
|
||||
if (!sortorder->field->binary())
|
||||
{
|
||||
// BAR TODO: need checking that it is really Field_str based class
|
||||
CHARSET_INFO *cs=((Field_str*)(sortorder->field))->charset();
|
||||
if (use_strcoll(cs))
|
||||
sortorder->length= sortorder->length*cs->strxfrm_multiply;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (sortorder->field->maybe_null())
|
||||
|
|
@ -930,12 +935,19 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef USE_STRCOLL
|
||||
|
||||
#endif
|
||||
switch ((sortorder->result_type=sortorder->item->result_type())) {
|
||||
case STRING_RESULT:
|
||||
sortorder->length=sortorder->item->max_length;
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info) && !sortorder->item->binary)
|
||||
sortorder->length= sortorder->length*MY_STRXFRM_MULTIPLY;
|
||||
if (!sortorder->item->binary)
|
||||
{
|
||||
CHARSET_INFO *cs=sortorder->item->str_value.charset();
|
||||
if (use_strcoll(cs))
|
||||
sortorder->length= sortorder->length*cs->strxfrm_multiply;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case INT_RESULT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue