diff options
author | unknown <serg@serg.mylan> | 2005-03-30 10:59:27 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-30 10:59:27 +0200 |
commit | 039519721c89975d943741e4a8b924e29fc2c9a3 (patch) | |
tree | 6400921c3f45d9dd591583493f9a309a1b95a8f1 | |
parent | dad034597ed0dc2f34fbd41489cb23fc25ec7341 (diff) | |
parent | fc7b19d480633a16228e1afea9018c38d26b40bc (diff) | |
download | mariadb-git-039519721c89975d943741e4a8b924e29fc2c9a3.tar.gz |
Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
-rw-r--r-- | include/violite.h | 4 | ||||
-rw-r--r-- | sql/sql_parse.cc | 11 | ||||
-rw-r--r-- | strings/my_strtoll10-x86.s | 2 | ||||
-rw-r--r-- | vio/test-ssl.c | 4 | ||||
-rw-r--r-- | vio/test-sslclient.c | 4 |
5 files changed, 12 insertions, 13 deletions
diff --git a/include/violite.h b/include/violite.h index 855d8a3d490..b89b01f95f4 100644 --- a/include/violite.h +++ b/include/violite.h @@ -138,8 +138,8 @@ int vio_close_shared_memory(Vio * vio); #if defined(HAVE_VIO) && !defined(DONT_MAP_VIO) #define vio_delete(vio) (vio)->viodelete(vio) #define vio_errno(vio) (vio)->vioerrno(vio) -#define vio_read(vio, buf, size) (vio)->read(vio,buf,size) -#define vio_write(vio, buf, size) (vio)->write(vio, buf, size) +#define vio_read(vio, buf, size) ((vio)->read)(vio,buf,size) +#define vio_write(vio, buf, size) ((vio)->write)(vio, buf, size) #define vio_blocking(vio, set_blocking_mode, old_mode)\ (vio)->vioblocking(vio, set_blocking_mode, old_mode) #define vio_is_blocking(vio) (vio)->is_blocking(vio) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b699577d5e4..51ad2db3527 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3731,6 +3731,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, db ? db : "", want_access, thd->master_access)); #ifndef NO_EMBEDDED_ACCESS_CHECKS ulong db_access; + bool db_is_pattern= test(want_access & GRANT_ACL); #endif ulong dummy; if (save_priv) @@ -3757,9 +3758,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, */ db_access= thd->db_access; if (!(thd->master_access & SELECT_ACL) && - (db && (!thd->db || strcmp(db,thd->db)))) - db_access=acl_get(thd->host, thd->ip, - thd->priv_user, db, test(want_access & GRANT_ACL)); + (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))) + db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern); *save_priv=thd->master_access | db_access; DBUG_RETURN(FALSE); } @@ -3777,9 +3777,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (db == any_db) DBUG_RETURN(FALSE); // Allow select on anything - if (db && (!thd->db || strcmp(db,thd->db))) - db_access=acl_get(thd->host, thd->ip, - thd->priv_user, db, test(want_access & GRANT_ACL)); + if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db))) + db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern); else db_access=thd->db_access; DBUG_PRINT("info",("db_access: %lu", db_access)); diff --git a/strings/my_strtoll10-x86.s b/strings/my_strtoll10-x86.s index e89e7ff5989..c04384667a7 100644 --- a/strings/my_strtoll10-x86.s +++ b/strings/my_strtoll10-x86.s @@ -394,7 +394,7 @@ my_strtoll10: popl %ebp ret -my_strtoll10_end: +.my_strtoll10_end: .size my_strtoll10,.my_strtoll10_end-my_strtoll10 .comm res,240,32 .comm end_ptr,120,32 diff --git a/vio/test-ssl.c b/vio/test-ssl.c index 88df6936a1f..a94eb1a21ff 100644 --- a/vio/test-ssl.c +++ b/vio/test-ssl.c @@ -115,7 +115,7 @@ main(int argc, char** argv) { /* child, therefore, client */ char xbuf[100]; - int r = client_vio->read(client_vio,xbuf, sizeof(xbuf)); + int r = vio_read(client_vio,xbuf, sizeof(xbuf)); if (r<=0) { my_free((gptr)ssl_acceptor,MYF(0)); my_free((gptr)ssl_connector,MYF(0)); @@ -130,7 +130,7 @@ main(int argc, char** argv) else { const char* s = "Huhuhuh"; - int r = server_vio->write(server_vio,(gptr)s, strlen(s)); + int r = vio_write(server_vio,(gptr)s, strlen(s)); if (r<=0) { my_free((gptr)ssl_acceptor,MYF(0)); my_free((gptr)ssl_connector,MYF(0)); diff --git a/vio/test-sslclient.c b/vio/test-sslclient.c index 231ce056d8c..3811ba0fb6a 100644 --- a/vio/test-sslclient.c +++ b/vio/test-sslclient.c @@ -77,13 +77,13 @@ main( int argc __attribute__((unused)), sa.sin_port = htons (1111); /* Server Port number */ err = connect(client_vio->sd, (struct sockaddr*) &sa, - sizeof(sa)); + sizeof(sa)); /* ----------------------------------------------- */ /* Now we have TCP conncetion. Start SSL negotiation. */ read(client_vio->sd,xbuf, sizeof(xbuf)); sslconnect(ssl_connector,client_vio,60L); - err = client_vio->read(client_vio,xbuf, sizeof(xbuf)); + err = vio_read(client_vio,xbuf, sizeof(xbuf)); if (err<=0) { my_free((gptr)ssl_connector,MYF(0)); fatal_error("client:SSL_read"); |