summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitKeeper/etc/logging_ok2
-rw-r--r--Docs/manual.texi27
-rw-r--r--client/mysql.cc2
-rwxr-xr-xmysql-test/t/rpl000017-slave.sh4
-rw-r--r--sql/slave.cc8
-rw-r--r--sql/sql_insert.cc11
-rw-r--r--strings/strmake.c3
7 files changed, 44 insertions, 13 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 16af71fd78d..981f46c3256 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -1,3 +1,4 @@
+Administrator@fred.
Miguel@light.local
Sinisa@sinisa.nasamreza.org
davida@isil.mysql.com
@@ -30,4 +31,3 @@ tonu@hundin.mysql.fi
tonu@volk.internalnet
tonu@x153.internalnet
tonu@x3.internalnet
-Administrator@fred.
diff --git a/Docs/manual.texi b/Docs/manual.texi
index a5343d6f402..17aab3c6764 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -28165,6 +28165,13 @@ column that only can take 2 values: A @code{CHAR(0)}, that is not defined
as @code{NOT NULL}, will only occupy one bit and can only take 2 values:
@code{NULL} or @code{""}. @xref{CHAR}.
+@tindex BOOL
+@tindex BIT
+@item BIT
+@itemx BOOL
+@itemx CHAR
+These three are synonyms for @code{CHAR(1)}.
+
@tindex CHARACTER VARYING
@tindex CHAR VARYING
@tindex VARCHAR
@@ -30980,7 +30987,8 @@ mysql> select ATAN(-2);
@end example
@findex ATAN2()
-@item ATAN2(Y,X)
+@item ATAN(Y,X)
+@itemx ATAN2(Y,X)
Returns the arc tangent of the two variables @code{X} and @code{Y}. It is
similar to calculating the arc tangent of @code{Y / X}, except that the
signs of both arguments are used to determine the quadrant of the
@@ -30988,7 +30996,7 @@ result:
@example
mysql> select ATAN(-2,2);
-> -0.785398
-mysql> select ATAN(PI(),0);
+mysql> select ATAN2(PI(),0);
-> 1.570796
@end example
@@ -32194,6 +32202,18 @@ MySQL will also, in this case, prefer sorting to doing a
temporary table with a key on the @code{GROUP BY} elements.
@item
+@code{SQL_BUFFER_RESULT} will force the result to be put into a temporary
+table. This will help MySQL free the table locks early and will help
+in cases where it takes a long time to send the result set to the client.
+
+@item
+@code{SQL_SMALL_RESULT}, a MySQL-specific option, can be used
+with @code{GROUP BY} or @code{DISTINCT} to tell the optimizer that the
+result set will be small. In this case, MySQL will use fast
+temporary tables to store the resulting table instead of using sorting. In
+MySQL Version 3.23 this shouldn't normally be needed.
+
+@item
@cindex @code{GROUP BY}, extensions to ANSI SQL
If you use @code{GROUP BY}, the output rows will be sorted according to the
@code{GROUP BY} as if you would have had an @code{ORDER BY} over all the fields
@@ -47547,6 +47567,9 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.43
@itemize @bullet
@item
+Fixed a bug in @code{INSERT DELAYED} and @code{FLUSH TABLES} introduced
+in 3.23.42.
+@item
Fixed unlikely bug, which returned not matching rows, in SELECT with
many tables and multi-column indexes and 'range' type.
@item
diff --git a/client/mysql.cc b/client/mysql.cc
index 91711752b09..d56f64289c4 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -968,7 +968,7 @@ static bool add_line(String &buffer,char *line,char *in_string)
{ // mSQL or postgreSQL style command ?
if (!(inchar = (uchar) *++pos))
break; // readline adds one '\'
- if (*in_string || inchar == 'N')
+ if (*in_string || inchar == 'N') // \N is short for NULL
{ // Don't allow commands in string
*out++='\\';
*out++= (char) inchar;
diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh
index 23117597ca5..c717500ae4a 100755
--- a/mysql-test/t/rpl000017-slave.sh
+++ b/mysql-test/t/rpl000017-slave.sh
@@ -3,8 +3,8 @@ master-bin.001
4
127.0.0.1
replicate
-aaaaaaaaaaaaaaab
-9306
+aaaaaaaaaaaaaaabthispartofthepasswordisnotused
+$MASTER_MYPORT
1
0
EOF
diff --git a/sql/slave.cc b/sql/slave.cc
index a1b5045efd4..01938a52153 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -307,7 +307,7 @@ static int init_strvar_from_file(char* var, int max_size, IO_CACHE* f,
}
else if (default_val)
{
- strmake(var, default_val, max_size);
+ strmake(var, default_val, max_size-1);
return 0;
}
return 1;
@@ -548,14 +548,14 @@ int init_master_info(MASTER_INFO* mi)
}
mi->log_file_name[length-1]= 0; // kill \n
- char buf[FN_REFLEN];
- if(!my_b_gets(&mi->file, buf, sizeof(buf)))
+ /* Reuse fname buffer */
+ if(!my_b_gets(&mi->file, fname, sizeof(fname)))
{
msg="Error reading log file position from master info file";
goto error;
}
+ mi->pos = strtoull(fname,(char**) 0, 10);
- mi->pos = strtoull(buf,(char**) 0, 10);
mi->fd = fd;
if(init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file,
master_host) ||
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 54c3e91bcc3..7a89a3d38dd 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -868,6 +868,7 @@ void kill_delayed_threads(void)
delayed_insert *tmp;
while ((tmp=it++))
{
+ /* Ensure that the thread doesn't kill itself while we are looking at it */
pthread_mutex_lock(&tmp->mutex);
tmp->thd.killed=1;
if (tmp->thd.mysys_var)
@@ -875,9 +876,15 @@ void kill_delayed_threads(void)
pthread_mutex_lock(&tmp->thd.mysys_var->mutex);
if (tmp->thd.mysys_var->current_cond)
{
- pthread_mutex_lock(tmp->thd.mysys_var->current_mutex);
+ /*
+ We need the following test because the main mutex may be locked
+ in handle_delayed_insert()
+ */
+ if (&tmp->mutex != tmp->thd.mysys_var->current_mutex)
+ pthread_mutex_lock(tmp->thd.mysys_var->current_mutex);
pthread_cond_broadcast(tmp->thd.mysys_var->current_cond);
- pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex);
+ if (&tmp->mutex != tmp->thd.mysys_var->current_mutex)
+ pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex);
}
pthread_mutex_unlock(&tmp->thd.mysys_var->mutex);
}
diff --git a/strings/strmake.c b/strings/strmake.c
index 6f02e4007c8..96f220c2984 100644
--- a/strings/strmake.c
+++ b/strings/strmake.c
@@ -22,7 +22,8 @@
strmake(dst,src,length) moves length characters, or until end, of src to
dst and appends a closing NUL to dst.
- strmake() returns pointer to closing null;
+ Note that is strlen(src) >= length then dst[length] will be set to \0
+ strmake() returns pointer to closing null
*/
#include <my_global.h>