summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2004-02-22 08:09:32 +0200
committerunknown <monty@mashka.mysql.fi>2004-02-22 08:09:32 +0200
commit984750e13ef4a559c5da05b5fbd6fa363d3650b2 (patch)
treec57bbd623e9c3f5a358df1f33c48f66c2d89f0e9
parent8b2b219fb5e1374abdd816d9d0911d37087c86a5 (diff)
downloadmariadb-git-984750e13ef4a559c5da05b5fbd6fa363d3650b2.tar.gz
After merge fixes
Fixed wrong test of database name (affected optimization of ORDER BY) VC++Files/client/mysqlclient.dsp: Add my_file.c VC++Files/mysys/mysys.dsp: Add my_file.c mysql-test/r/negation_elimination.result: Fix wrong test sql-common/client.c: After merge fix sql/sql_base.cc: Fixed testing of database name
-rw-r--r--VC++Files/client/mysqlclient.dsp4
-rw-r--r--VC++Files/mysys/mysys.dsp4
-rw-r--r--mysql-test/r/negation_elimination.result4
-rw-r--r--sql-common/client.c14
-rw-r--r--sql/sql_base.cc2
5 files changed, 17 insertions, 11 deletions
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index 2a1b52d54ee..58ec040a63d 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -358,6 +358,10 @@ SOURCE=..\mysys\my_open.c
# End Source File
# Begin Source File
+SOURCE=..\mysys\my_file.c
+# End Source File
+# Begin Source File
+
SOURCE=..\mysys\my_pread.c
# End Source File
# Begin Source File
diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp
index fe9dffde934..f81614b6295 100644
--- a/VC++Files/mysys/mysys.dsp
+++ b/VC++Files/mysys/mysys.dsp
@@ -390,6 +390,10 @@ SOURCE=.\my_open.c
# End Source File
# Begin Source File
+SOURCE=.\my_file.c
+# End Source File
+# Begin Source File
+
SOURCE=.\my_pread.c
# End Source File
# Begin Source File
diff --git a/mysql-test/r/negation_elimination.result b/mysql-test/r/negation_elimination.result
index 8ca8ae2f12e..a3a2bad7ec6 100644
--- a/mysql-test/r/negation_elimination.result
+++ b/mysql-test/r/negation_elimination.result
@@ -243,10 +243,6 @@ a
3
4
5
-6
-7
-8
-9
10
11
12
diff --git a/sql-common/client.c b/sql-common/client.c
index 36b2c6122dd..fc5004c4a82 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -286,7 +286,7 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
char **arg_unix_socket)
{
HANDLE hPipe=INVALID_HANDLE_VALUE;
- char szPipeName [ 257 ];
+ char pipe_name[1024];
DWORD dwMode;
int i;
my_bool testing_named_pipes=0;
@@ -297,13 +297,15 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
if (!host || !strcmp(host,LOCAL_HOST))
host=LOCAL_HOST_NAMEDPIPE;
- sprintf( szPipeName, "\\\\%s\\pipe\\%s", host, unix_socket);
- DBUG_PRINT("info",("Server name: '%s'. Named Pipe: %s",
- host, unix_socket));
+
+ pipe_name[sizeof(pipe_name)-1]= 0; /* Safety if too long string */
+ strxnmov(pipe_name, sizeof(pipe_name)-1, "\\\\", host, "\\pipe\\",
+ unix_socket, NullS);
+ DBUG_PRINT("info",("Server name: '%s'. Named Pipe: %s", host, unix_socket));
for (i=0 ; i < 100 ; i++) /* Don't retry forever */
{
- if ((hPipe = CreateFile(szPipeName,
+ if ((hPipe = CreateFile(pipe_name,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
@@ -320,7 +322,7 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
return INVALID_HANDLE_VALUE;
}
/* wait for for an other instance */
- if (! WaitNamedPipe(szPipeName, connect_timeout*1000) )
+ if (! WaitNamedPipe(pipe_name, connect_timeout*1000) )
{
net->last_errno=CR_NAMEDPIPEWAIT_ERROR;
strmov(net->sqlstate, unknown_sqlstate);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index b11c71b6ff7..08a1823edd2 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2038,7 +2038,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
{
if (!strcmp(item_field->table_name,table_name) &&
(!db_name || (db_name && item_field->db_name &&
- !strcmp(item_field->table_name,table_name))))
+ !strcmp(item_field->db_name, db_name))))
{
found= li.ref();
*counter= i;