Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw 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.2302 05/06/20 10:21:35 jimw@stripped +3 -0
Fix crash when an entry was added to the mysql.tables_priv
table with an empty hostname. (Bug #11330)
sql/sql_acl.cc
1.166 05/06/20 10:21:33 jimw@stripped +2 -1
Don't call strlen() on a NULL pointer.
mysql-test/t/grant.test
1.27 05/06/20 10:21:33 jimw@stripped +8 -0
Add new regression test
mysql-test/r/grant.result
1.36 05/06/20 10:21:32 jimw@stripped +4 -0
Update results
# 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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-11330
--- 1.165/sql/sql_acl.cc 2005-06-07 08:54:58 -07:00
+++ 1.166/sql/sql_acl.cc 2005-06-20 10:21:33 -07:00
@@ -1866,7 +1866,8 @@
if (cols)
{
int key_len;
- col_privs->field[0]->store(host.hostname,(uint) strlen(host.hostname),
+ col_privs->field[0]->store(host.hostname,
+ host.hostname ? (uint) strlen(host.hostname) : 0,
&my_charset_latin1);
col_privs->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
col_privs->field[2]->store(user,(uint) strlen(user), &my_charset_latin1);
--- 1.35/mysql-test/r/grant.result 2005-02-09 18:13:30 -08:00
+++ 1.36/mysql-test/r/grant.result 2005-06-20 10:21:32 -07:00
@@ -435,3 +435,7 @@
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest;
+use mysql;
+insert into tables_priv values
('','mysqltest_1','test_table','test_grantor','',CURRENT_TIMESTAMP,'Select','Select');
+flush privileges;
+delete from tables_priv where host = '' and user = 'mysqltest_1';
--- 1.26/mysql-test/t/grant.test 2005-03-29 15:48:55 -08:00
+++ 1.27/mysql-test/t/grant.test 2005-06-20 10:21:33 -07:00
@@ -392,3 +392,11 @@
delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest;
+#
+# Bug #11330: Entry in tables_priv with host = '' causes crash
+#
+connection default;
+use mysql;
+insert into tables_priv values
('','mysqltest_1','test_table','test_grantor','',CURRENT_TIMESTAMP,'Select','Select');
+flush privileges;
+delete from tables_priv where host = '' and user = 'mysqltest_1';
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2302) BUG#11330 | Jim Winstead | 20 Jun |