Below is the list of changes that have just been committed into a local
5.1 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
1.2363 06/04/26 12:12:45 msvensson@neptunus.(none) +10 -0
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.1
mysql-test/t/trigger.test
1.44 06/04/26 12:12:40 msvensson@neptunus.(none) +0 -1
Merge
mysql-test/r/trigger.result
1.40 06/04/26 12:12:40 msvensson@neptunus.(none) +0 -1
Merge
mysql-test/r/rpl_openssl.result
1.13 06/04/26 12:12:40 msvensson@neptunus.(none) +0 -1
Merge
sql/sql_parse.cc
1.541 06/04/26 12:07:44 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/t/sp-security.test
1.32 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/t/rpl_openssl.test
1.13 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/t/grant2.test
1.35 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/r/sp-security.result
1.31 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/r/grant2.result
1.29 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.110 06/04/26 12:07:43 msvensson@neptunus.(none) +0 -0
Auto merged
# 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.1/RESYNC
--- 1.540/sql/sql_parse.cc 2006-04-25 10:57:27 +02:00
+++ 1.541/sql/sql_parse.cc 2006-04-26 12:07:44 +02:00
@@ -1008,6 +1008,7 @@
char *user= end;
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
@@ -1033,10 +1034,18 @@
db= db_buff;
}
- user_buff[copy_and_convert(user_buff, sizeof(user_buff)-1,
- system_charset_info, user, strlen(user),
- thd->charset(), &dummy_errors)]= '\0';
+ user_buff[user_len= copy_and_convert(user_buff, sizeof(user_buff)-1,
+ system_charset_info, user, user_len,
+ thd->charset(), &dummy_errors)]= '\0';
user= user_buff;
+
+ /* If username starts and ends in "'", chop them off */
+ if (user_len > 1 && user[0] == '\'' && user[user_len - 1] == '\'')
+ {
+ user[user_len-1]= 0;
+ user++;
+ user_len-= 2;
+ }
if (thd->main_security_ctx.user)
x_free(thd->main_security_ctx.user);
--- 1.12/mysql-test/r/rpl_openssl.result 2005-12-22 05:10:56 +01:00
+++ 1.13/mysql-test/r/rpl_openssl.result 2006-04-26 12:12:40 +02:00
@@ -24,6 +24,7 @@
stop slave;
change master to master_user='root',master_password='', master_ssl=0;
start slave;
+drop user replssl@localhost;
drop table t1;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
--- 1.12/mysql-test/t/rpl_openssl.test 2005-12-22 05:10:57 +01:00
+++ 1.13/mysql-test/t/rpl_openssl.test 2006-04-26 12:07:43 +02:00
@@ -53,6 +53,7 @@
change master to master_user='root',master_password='', master_ssl=0;
start slave;
connection master;
+drop user replssl@localhost;
drop table t1;
save_master_pos;
connection slave;
--- 1.109/mysql-test/mysql-test-run.pl 2006-04-25 19:00:08 +02:00
+++ 1.110/mysql-test/mysql-test-run.pl 2006-04-26 12:07:43 +02:00
@@ -3491,8 +3491,7 @@
"break mysql_parse\n" .
"commands 1\n" .
"disable 1\n" .
- "end\n" .
- "run");
+ "end");
}
if ( $opt_manual_ddd )
--- 1.30/mysql-test/r/sp-security.result 2006-03-14 18:37:23 +01:00
+++ 1.31/mysql-test/r/sp-security.result 2006-04-26 12:07:43 +02:00
@@ -322,6 +322,7 @@
Warning 1541 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead.
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost;
DROP DATABASE db_bug7787;
+drop user user_bug7787@localhost;
use test;
---> connection: root
--- 1.31/mysql-test/t/sp-security.test 2006-03-09 18:37:52 +01:00
+++ 1.32/mysql-test/t/sp-security.test 2006-04-26 12:07:43 +02:00
@@ -545,6 +545,7 @@
# Cleanup.
DROP DATABASE db_bug7787;
+drop user user_bug7787@localhost;
use test;
--- 1.28/mysql-test/r/grant2.result 2006-03-03 15:13:05 +01:00
+++ 1.29/mysql-test/r/grant2.result 2006-04-26 12:07:43 +02:00
@@ -355,3 +355,17 @@
drop table t1, t2;
drop database TESTDB;
flush privileges;
+grant all privileges on test.* to `a@`@localhost;
+grant execute on * to `a@`@localhost;
+create table t2 (s1 int);
+insert into t2 values (1);
+drop function if exists f2;
+create function f2 () returns int begin declare v int; select s1 from t2
+into v; return v; end//
+select f2();
+f2()
+1
+drop function f2;
+drop table t2;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
+drop user `a@`@localhost;
--- 1.34/mysql-test/t/grant2.test 2006-03-03 15:13:05 +01:00
+++ 1.35/mysql-test/t/grant2.test 2006-04-26 12:07:43 +02:00
@@ -462,3 +462,29 @@
drop database TESTDB;
flush privileges;
+#
+# BUG#13310 incorrect user parsing by SP
+#
+
+grant all privileges on test.* to `a@`@localhost;
+grant execute on * to `a@`@localhost;
+connect (bug13310,localhost,'a@',,test);
+connection bug13310;
+create table t2 (s1 int);
+insert into t2 values (1);
+--disable_warnings
+drop function if exists f2;
+--enable_warnings
+delimiter //;
+create function f2 () returns int begin declare v int; select s1 from t2
+into v; return v; end//
+delimiter ;//
+select f2();
+
+drop function f2;
+drop table t2;
+disconnect bug13310;
+
+connection default;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
+drop user `a@`@localhost;
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2363) | msvensson | 26 Apr |