Below is the list of changes that have just been committed into a local
4.1 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, 2006-10-05 16:38:21+05:00, gluh@stripped +5 -0
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1-kt
MERGE: 1.2522.1.38
include/m_ctype.h@stripped, 2006-10-05 16:38:16+05:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.107.1.2
mysql-test/r/ctype_utf8.result@stripped, 2006-10-05 16:38:16+05:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.72.1.5
mysql-test/t/ctype_utf8.test@stripped, 2006-10-05 16:38:16+05:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.74.1.4
sql/table.cc@stripped, 2006-10-05 16:38:16+05:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.137.1.2
sql/unireg.cc@stripped, 2006-10-05 16:38:16+05:00, gluh@stripped +0 -0
Auto merged
MERGE: 1.49.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: gluh
# Host: gluh.(none)
# Root: /home/gluh/MySQL/Merge/4.1-kt/RESYNC
--- 1.109/include/m_ctype.h 2006-10-05 16:38:27 +05:00
+++ 1.110/include/m_ctype.h 2006-10-05 16:38:27 +05:00
@@ -178,7 +178,7 @@
/* Charset dependant snprintf() */
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
- ...);
+ ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
long int val);
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
@@ -304,7 +304,8 @@
ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
- const char *fmt, ...);
+ const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 4, 5);
long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
char **e, int *err);
--- 1.138/sql/table.cc 2006-10-05 16:38:27 +05:00
+++ 1.139/sql/table.cc 2006-10-05 16:38:27 +05:00
@@ -77,6 +77,7 @@
my_string record;
const char **int_array;
bool use_hash, null_field_first;
+ bool error_reported= FALSE;
File file;
Field **field_ptr,*reg_field;
KEY *keyinfo;
@@ -805,6 +806,11 @@
error= 1;
my_errno= ENOENT;
}
+ else
+ {
+ outparam->file->print_error(err, MYF(0));
+ error_reported= TRUE;
+ }
goto err_not_open; /* purecov: inspected */
}
}
@@ -826,7 +832,8 @@
err_end: /* Here when no file */
delete crypted;
*root_ptr= old_root;
- frm_error(error, outparam, name, ME_ERROR + ME_WAITTANG, errarg);
+ if (!error_reported)
+ frm_error(error, outparam, name, ME_ERROR + ME_WAITTANG, errarg);
delete outparam->file;
outparam->file=0; // For easyer errorchecking
outparam->db_stat=0;
@@ -1427,7 +1434,7 @@
bool check_db_name(char *name)
{
- uint name_length= 0; // name length in symbols
+ char *start= name;
/* Used to catch empty names and names with end space */
bool last_char_is_space= TRUE;
@@ -1444,7 +1451,6 @@
name+system_charset_info->mbmaxlen);
if (len)
{
- name_length++;
name += len;
continue;
}
@@ -1452,13 +1458,12 @@
#else
last_char_is_space= *name==' ';
#endif
- name_length++;
if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
*name == FN_EXTCHAR)
return 1;
name++;
}
- return (last_char_is_space || name_length > NAME_LEN);
+ return last_char_is_space || (uint) (name - start) > NAME_LEN;
}
--- 1.50/sql/unireg.cc 2006-10-05 16:38:27 +05:00
+++ 1.51/sql/unireg.cc 2006-10-05 16:38:27 +05:00
@@ -190,13 +190,19 @@
goto err3;
{
- /* Unescape all UCS2 intervals: were escaped in pack_headers */
+ /*
+ Restore all UCS2 intervals.
+ HEX representation of them is not needed anymore.
+ */
List_iterator<create_field> it(create_fields);
create_field *field;
while ((field=it++))
{
- if (field->interval && field->charset->mbminlen > 1)
- unhex_type2(field->interval);
+ if (field->save_interval)
+ {
+ field->interval= field->save_interval;
+ field->save_interval= 0;
+ }
}
}
DBUG_RETURN(0);
@@ -452,18 +458,36 @@
reclength=(uint) (field->offset+ data_offset + length);
n_length+= (ulong) strlen(field->field_name)+1;
field->interval_id=0;
+ field->save_interval= 0;
if (field->interval)
{
uint old_int_count=int_count;
if (field->charset->mbminlen > 1)
{
- /* Escape UCS2 intervals using HEX notation */
+ /*
+ Escape UCS2 intervals using HEX notation to avoid
+ problems with delimiters between enum elements.
+ As the original representation is still needed in
+ the function make_empty_rec to create a record of
+ filled with default values it is saved in save_interval
+ The HEX representation is created from this copy.
+ */
+ field->save_interval= field->interval;
+ field->interval= (TYPELIB*) sql_alloc(sizeof(TYPELIB));
+ *field->interval= *field->save_interval;
+ field->interval->type_names=
+ (const char **) sql_alloc(sizeof(char*) *
+ (field->interval->count+1));
+ field->interval->type_names[field->interval->count]= 0;
+ field->interval->type_lengths=
+ (uint *) sql_alloc(sizeof(uint) * field->interval->count);
+
for (uint pos= 0; pos < field->interval->count; pos++)
{
char *dst;
- uint length= field->interval->type_lengths[pos], hex_length;
- const char *src= field->interval->type_names[pos];
+ uint length= field->save_interval->type_lengths[pos], hex_length;
+ const char *src= field->save_interval->type_names[pos];
const char *srcend= src + length;
hex_length= length * 2;
field->interval->type_lengths[pos]= hex_length;
@@ -730,7 +754,8 @@
field->charset,
field->geom_type,
field->unireg_check,
- field->interval,
+ field->save_interval ? field->save_interval :
+ field->interval,
field->field_name,
&table);
--- 1.73/mysql-test/r/ctype_utf8.result 2006-10-05 16:38:27 +05:00
+++ 1.74/mysql-test/r/ctype_utf8.result 2006-10-05 16:38:27 +05:00
@@ -1415,15 +1415,15 @@
a
e
drop table t1;
-set names utf8;
-grant select on test.* to юзер_юзер@localhost;
-user()
-юзер_юзер@localhost
-revoke all on test.* from юзер_юзер@localhost;
-drop user юзер_юзер@localhost;
-create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-database()
-имя_базы_в_кодировке_утф8_длиной_больше_чем_45
-drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table t1(a char(10)) default charset utf8;
+insert into t1 values ('123'), ('456');
+explain
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+substr(Z.a,-1) a
+3 123
+6 456
+drop table t1;
--- 1.75/mysql-test/t/ctype_utf8.test 2006-10-05 16:38:27 +05:00
+++ 1.76/mysql-test/t/ctype_utf8.test 2006-10-05 16:38:27 +05:00
@@ -1142,20 +1142,15 @@
select a from t1 group by a;
drop table t1;
+
#
-# Bug#20393: User name truncation in mysql client
-# Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte
+# Bug #20204: "order by" changes the results returned
#
-set names utf8;
-#create user юзер_юзер@localhost;
-grant select on test.* to юзер_юзер@localhost;
---exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
-revoke all on test.* from юзер_юзер@localhost;
-drop user юзер_юзер@localhost;
-
-create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table t1(a char(10)) default charset utf8;
+insert into t1 values ('123'), ('456');
+explain
+ select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+drop table t1;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (gluh:1.2527) | gluh | 5 Oct |