Commit 8d8cb24e authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.0

into serg.mylan:/usr/home/serg/Abk/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
Build-tools/Do-compile:
  Auto merged
parents 32ff7ade e7121bf9
...@@ -144,8 +144,8 @@ int vio_close_shared_memory(Vio * vio); ...@@ -144,8 +144,8 @@ int vio_close_shared_memory(Vio * vio);
#if !defined(DONT_MAP_VIO) #if !defined(DONT_MAP_VIO)
#define vio_delete(vio) (vio)->viodelete(vio) #define vio_delete(vio) (vio)->viodelete(vio)
#define vio_errno(vio) (vio)->vioerrno(vio) #define vio_errno(vio) (vio)->vioerrno(vio)
#define vio_read(vio, buf, size) (vio)->read(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_write(vio, buf, size) ((vio)->write)(vio, buf, size)
#define vio_blocking(vio, set_blocking_mode, old_mode)\ #define vio_blocking(vio, set_blocking_mode, old_mode)\
(vio)->vioblocking(vio, set_blocking_mode, old_mode) (vio)->vioblocking(vio, set_blocking_mode, old_mode)
#define vio_is_blocking(vio) (vio)->is_blocking(vio) #define vio_is_blocking(vio) (vio)->is_blocking(vio)
......
...@@ -4579,6 +4579,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -4579,6 +4579,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
{ {
#ifndef NO_EMBEDDED_ACCESS_CHECKS #ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong db_access; ulong db_access;
bool db_is_pattern= test(want_access & GRANT_ACL);
#endif #endif
ulong dummy; ulong dummy;
DBUG_ENTER("check_access"); DBUG_ENTER("check_access");
...@@ -4610,9 +4611,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -4610,9 +4611,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
*/ */
db_access= thd->db_access; db_access= thd->db_access;
if (!(thd->master_access & SELECT_ACL) && if (!(thd->master_access & SELECT_ACL) &&
(db && (!thd->db || strcmp(db,thd->db)))) (db && (!thd->db || db_is_pattern || strcmp(db,thd->db))))
db_access=acl_get(thd->host, thd->ip, db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern);
thd->priv_user, db, test(want_access & GRANT_ACL));
*save_priv=thd->master_access | db_access; *save_priv=thd->master_access | db_access;
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
...@@ -4633,9 +4633,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -4633,9 +4633,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if (db == any_db) if (db == any_db)
DBUG_RETURN(FALSE); // Allow select on anything DBUG_RETURN(FALSE); // Allow select on anything
if (db && (!thd->db || strcmp(db,thd->db))) if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))
db_access=acl_get(thd->host, thd->ip, db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern);
thd->priv_user, db, test(want_access & GRANT_ACL));
else else
db_access=thd->db_access; db_access=thd->db_access;
DBUG_PRINT("info",("db_access: %lu", db_access)); DBUG_PRINT("info",("db_access: %lu", db_access));
......
...@@ -394,7 +394,7 @@ my_strtoll10: ...@@ -394,7 +394,7 @@ my_strtoll10:
popl %ebp popl %ebp
ret ret
my_strtoll10_end: .my_strtoll10_end:
.size my_strtoll10,.my_strtoll10_end-my_strtoll10 .size my_strtoll10,.my_strtoll10_end-my_strtoll10
.comm res,240,32 .comm res,240,32
.comm end_ptr,120,32 .comm end_ptr,120,32
......
...@@ -115,7 +115,7 @@ main(int argc, char** argv) ...@@ -115,7 +115,7 @@ main(int argc, char** argv)
{ {
/* child, therefore, client */ /* child, therefore, client */
char xbuf[100]; 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) { if (r<=0) {
my_free((gptr)ssl_acceptor,MYF(0)); my_free((gptr)ssl_acceptor,MYF(0));
my_free((gptr)ssl_connector,MYF(0)); my_free((gptr)ssl_connector,MYF(0));
...@@ -130,7 +130,7 @@ main(int argc, char** argv) ...@@ -130,7 +130,7 @@ main(int argc, char** argv)
else else
{ {
const char* s = "Huhuhuh"; 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) { if (r<=0) {
my_free((gptr)ssl_acceptor,MYF(0)); my_free((gptr)ssl_acceptor,MYF(0));
my_free((gptr)ssl_connector,MYF(0)); my_free((gptr)ssl_connector,MYF(0));
......
...@@ -77,13 +77,13 @@ main( int argc __attribute__((unused)), ...@@ -77,13 +77,13 @@ main( int argc __attribute__((unused)),
sa.sin_port = htons (1111); /* Server Port number */ sa.sin_port = htons (1111); /* Server Port number */
err = connect(client_vio->sd, (struct sockaddr*) &sa, err = connect(client_vio->sd, (struct sockaddr*) &sa,
sizeof(sa)); sizeof(sa));
/* ----------------------------------------------- */ /* ----------------------------------------------- */
/* Now we have TCP conncetion. Start SSL negotiation. */ /* Now we have TCP conncetion. Start SSL negotiation. */
read(client_vio->sd,xbuf, sizeof(xbuf)); read(client_vio->sd,xbuf, sizeof(xbuf));
sslconnect(ssl_connector,client_vio,60L); 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) { if (err<=0) {
my_free((gptr)ssl_connector,MYF(0)); my_free((gptr)ssl_connector,MYF(0));
fatal_error("client:SSL_read"); fatal_error("client:SSL_read");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment