Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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-09-01 12:49:56+02:00, msvensson@neptunus.(none) +23 -0
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
MERGE: 1.1616.2144.209
BUILD/SETUP.sh@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.26.1.13
include/mysql_com.h@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.67.1.41
mysql-test/lib/mtr_cases.pl@stripped, 2006-09-01 12:38:33+02:00, msvensson@neptunus.(none) +0 -22
Null merge of backport
MERGE: 1.6.2.3
mysql-test/lib/mtr_match.pl@stripped, 2006-09-01 12:38:41+02:00, msvensson@neptunus.(none) +0 -17
Auto merged
MERGE: 1.1.1.1
mysql-test/lib/mtr_misc.pl@stripped, 2006-09-01 12:38:44+02:00, msvensson@neptunus.(none) +0 -16
Null merge of backport
MERGE: 1.5.1.2
mysql-test/mysql-test-run.pl@stripped, 2006-09-01 12:37:32+02:00, msvensson@neptunus.(none) +1 -30
Null merge of backport
MERGE: 1.8.9.11
mysql-test/r/ctype_ucs.result@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.11.1.22
mysql-test/r/ctype_utf8.result@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.45.1.27
mysql-test/r/myisam.result@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +8 -0
Merge 4.1 -> 5.0
MERGE: 1.45.1.18
mysql-test/t/ctype_ucs.test@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +7 -0
Merge 4.1 -> 5.0
MERGE: 1.15.1.18
mysql-test/t/ctype_utf8.test@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.57.1.17
mysql-test/t/myisam.test@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +14 -0
Merge 4.1 -> 5.0
MERGE: 1.33.1.16
sql-common/client.c@stripped, 2006-09-01 12:49:54+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.46.1.46
sql/item_func.h@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.68.1.63
sql/item_strfunc.cc@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.196.6.17
sql/item_strfunc.h@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.73.2.19
sql/slave.cc@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.188.1.93
sql/sql_acl.cc@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +6 -0
Merge 4.1 -> 5.0
MERGE: 1.74.1.105
sql/sql_parse.cc@stripped, 2006-09-01 12:49:53+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.271.1.215
sql/sql_select.cc@stripped, 2006-09-01 12:49:54+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.216.125.5
sql/table.cc@stripped, 2006-09-01 12:49:54+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.111.4.6
support-files/mysql.spec.sh@stripped, 2006-09-01 12:49:54+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.83.1.41
tests/mysql_client_test.c@stripped, 2006-09-01 12:49:54+02:00, msvensson@neptunus.(none) +0 -0
Merge 4.1 -> 5.0
MERGE: 1.51.1.119
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.0/RESYNC
--- 1.107/include/mysql_com.h 2006-09-01 12:50:03 +02:00
+++ 1.108/include/mysql_com.h 2006-09-01 12:50:03 +02:00
@@ -26,6 +26,9 @@
#define USERNAME_LENGTH 16
#define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5
+#define SYSTEM_CHARSET_MBMAXLEN 3
+#define NAME_BYTE_LEN NAME_LEN*SYSTEM_CHARSET_MBMAXLEN
+#define USERNAME_BYTE_LENGTH USERNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN
/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
--- 1.206/sql/sql_acl.cc 2006-09-01 12:50:03 +02:00
+++ 1.207/sql/sql_acl.cc 2006-09-01 12:50:03 +02:00
@@ -3232,6 +3232,17 @@ bool mysql_grant(THD *thd, const char *d
result= TRUE;
continue;
}
+ if (Str->host.length > HOSTNAME_LENGTH ||
+ system_charset_info->cset->charpos(system_charset_info,
+ Str->user.str,
+ Str->user.str +
+ Str->user.length,
+ USERNAME_LENGTH) < Str->user.length)
+ {
+ my_error(ER_GRANT_WRONG_HOST_OR_USER,MYF(0));
+ result= -1;
+ continue;
+ }
if (replace_user_table(thd, tables[0].table, *Str,
(!db ? rights : 0), revoke_grant, create_new_users,
test(thd->variables.sql_mode &
--- 1.569/sql/sql_parse.cc 2006-09-01 12:50:03 +02:00
+++ 1.570/sql/sql_parse.cc 2006-09-01 12:50:03 +02:00
@@ -1001,8 +1001,8 @@ static int check_connection(THD *thd)
char *passwd= strend(user)+1;
uint user_len= passwd - user - 1;
char *db= passwd;
- char db_buff[NAME_LEN+1]; // buffer to store db in utf8
- char user_buff[USERNAME_LENGTH+1]; // buffer to store user in utf8
+ char db_buff[NAME_BYTE_LEN + 1]; // buffer to store db in utf8
+ char user_buff[USERNAME_BYTE_LENGTH + 1]; // buffer to store user in utf8
uint dummy_errors;
/*
--- 1.231/sql/table.cc 2006-09-01 12:50:03 +02:00
+++ 1.232/sql/table.cc 2006-09-01 12:50:03 +02:00
@@ -1592,7 +1592,7 @@ char *get_field(MEM_ROOT *mem, Field *fi
bool check_db_name(char *name)
{
- char *start=name;
+ uint name_length= 0; // name length in symbols
/* Used to catch empty names and names with end space */
bool last_char_is_space= TRUE;
@@ -1609,6 +1609,7 @@ bool check_db_name(char *name)
name+system_charset_info->mbmaxlen);
if (len)
{
+ name_length++;
name += len;
continue;
}
@@ -1616,12 +1617,13 @@ bool check_db_name(char *name)
#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 || (uint) (name - start) > NAME_LEN;
+ return (last_char_is_space || name_length > NAME_LEN);
}
--- 1.95/mysql-test/r/ctype_utf8.result 2006-09-01 12:50:04 +02:00
+++ 1.96/mysql-test/r/ctype_utf8.result 2006-09-01 12:50:04 +02:00
@@ -1340,6 +1340,18 @@ select a from t1 group by a;
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(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
--- 1.88/mysql-test/t/ctype_utf8.test 2006-09-01 12:50:04 +02:00
+++ 1.89/mysql-test/t/ctype_utf8.test 2006-09-01 12:50:04 +02:00
@@ -1069,6 +1069,22 @@ explain select a from t1 group by a;
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
+#
+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;
+
# End of 4.1 tests
#
--- 1.99/sql-common/client.c 2006-09-01 12:50:04 +02:00
+++ 1.100/sql-common/client.c 2006-09-01 12:50:04 +02:00
@@ -1758,7 +1758,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
const char *passwd, const char *db,
uint port, const char *unix_socket,ulong client_flag)
{
- char buff[NAME_LEN+USERNAME_LENGTH+100];
+ char buff[NAME_BYTE_LEN+USERNAME_BYTE_LENGTH+100];
char *end,*host_info;
my_socket sock;
in_addr_t ip_addr;
@@ -2217,7 +2217,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
mysql->server_status, client_flag));
/* This needs to be changed as it's not useful with big packets */
if (user && user[0])
- strmake(end,user,USERNAME_LENGTH); /* Max user name */
+ strmake(end,user,USERNAME_BYTE_LENGTH); /* Max user name */
else
read_user_name((char*) end);
@@ -2247,7 +2247,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
/* Add database if needed */
if (db && (mysql->server_capabilities & CLIENT_CONNECT_WITH_DB))
{
- end= strmake(end, db, NAME_LEN) + 1;
+ end= strmake(end, db, NAME_BYTE_LEN) + 1;
mysql->db= my_strdup(db,MYF(MY_WME));
db= 0;
}
--- 1.79/mysql-test/r/myisam.result 2006-09-01 12:50:04 +02:00
+++ 1.80/mysql-test/r/myisam.result 2006-09-01 12:50:04 +02:00
@@ -768,6 +768,16 @@ a b
xxxxxxxxx bbbbbb
xxxxxxxxx bbbbbb
DROP TABLE t1;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/'
set storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---
--- 1.61/mysql-test/t/myisam.test 2006-09-01 12:50:04 +02:00
+++ 1.62/mysql-test/t/myisam.test 2006-09-01 12:50:04 +02:00
@@ -719,6 +719,28 @@ SELECT * FROM t1;
DROP TABLE t1;
#
+# Bug#8706 - temporary table with data directory option fails
+#
+connect (session1,localhost,root,,);
+connect (session2,localhost,root,,);
+
+connection session1;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+show create table t1;
+
+connection session2;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+show create table t1;
# Test varchar
#
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2271) | msvensson | 1 Sep |