summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-04-26 20:43:28 +0300
committermonty@mashka.mysql.fi <>2003-04-26 20:43:28 +0300
commitbf6cfd2948f4cbab120a76aaf16d7ca0739cf2f4 (patch)
treed337933bf02d06131497e3097c839528e9938a07 /sql/sql_parse.cc
parentba5b57c642fccfdbac0a4b82de919dbcc2bca058 (diff)
downloadmariadb-git-bf6cfd2948f4cbab120a76aaf16d7ca0739cf2f4.tar.gz
Fix for -fbranch-probabilites (bug 268)
Fix for LEFT/RIGHT/MID with multi-byte-character sets (bug 314) Fix for new bison 1.875 max_insert_delayed_threads and delayed_insert_timeout now works as documented (bug 211) Don't show port in SHOW PROCESSLIST for system threads Fix problem with ORDER BY being discarded for some DISTINCT queries (bug 275) Fixed bug with NATURAL LEFT JOIN, NATURAL RIGHT JOIN and RIGHT JOIN when using many joined tables (Bug 212)
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 0ffdb68a179..1a8ea7da8f4 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -210,9 +210,9 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
!(thd->client_capabilities &
CLIENT_LONG_PASSWORD),&ur);
DBUG_PRINT("info",
- ("Capabilities: %d packet_length: %ld Host: '%s' User: '%s' Using password: %s Access: %u db: '%s'",
+ ("Capabilities: %d packet_length: %ld Host: '%s' Login user: '%s' Priv_user: '%s' Using password: %s Access: %u db: '%s'",
thd->client_capabilities, thd->max_client_packet_length,
- thd->host_or_ip, thd->priv_user,
+ thd->host_or_ip, thd->user, thd->priv_user,
passwd[0] ? "yes": "no",
thd->master_access, thd->db ? thd->db : "*none*"));
if (thd->master_access & NO_ACCESS)
@@ -517,7 +517,6 @@ check_connections(THD *thd)
DBUG_PRINT("info",("Host: %s",thd->host));
thd->host_or_ip= thd->host;
thd->ip= 0;
- thd->peer_port= 0;
bzero((char*) &thd->remote,sizeof(struct sockaddr));
}
/* Ensure that wrong hostnames doesn't cause buffer overflows */
@@ -3419,6 +3418,24 @@ void add_join_on(TABLE_LIST *b,Item *expr)
}
+/*
+ Mark that we have a NATURAL JOIN between two tables
+
+ SYNOPSIS
+ add_join_natural()
+ a Table to do normal join with
+ b Do normal join with this table
+
+ IMPLEMENTATION
+ This function just marks that table b should be joined with a.
+ The function setup_cond() will create in b->on_expr a list
+ of equal condition between all fields of the same name.
+
+ SELECT * FROM t1 NATURAL LEFT JOIN t2
+ <=>
+ SELECT * FROM t1 LEFT JOIN t2 ON (t1.i=t2.i and t1.j=t2.j ... )
+*/
+
void add_join_natural(TABLE_LIST *a,TABLE_LIST *b)
{
b->natural_join=a;