summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2004-10-20 01:28:42 +0300
committerunknown <monty@mishka.local>2004-10-20 01:28:42 +0300
commit4736d0fe9963742e2788960d60da7f0f2dd593e9 (patch)
tree1919e7f3a6a68e36dbbcf1dd8b6cd8729a975e36 /tests
parent46b10a307fcaf3449f2bcf3b989feb0e1c53e7b6 (diff)
downloadmariadb-git-4736d0fe9963742e2788960d60da7f0f2dd593e9.tar.gz
Review of all code pushed since last review
Simple optimzations and cleanups Removed compiler warnings and fixed portability issues Added client functions 'mysql_embedded()' to allow client to check if we are using embedded server Fixes for purify client/mysqlimport.c: Remove not used variable client/mysqltest.c: Remove usage of MAXPATHLEN (all MySQL code uses FN_REFLEN) Simplified code Remove usage of sprintf("%llu") as this is not portable include/mysql.h: Added mysql_embedded() to be able to easily check if we are using the embedded server innobase/srv/srv0start.c: Don't use memcmp() when using purify (to avoid false warnings) libmysql/libmysql.c: Added mysql_embedded() to be able to easily check if we are using the embedded server libmysql/libmysql.def: Added mysql_embedded() to be able to easily check if we are using the embedded server myisam/myisam_ftdump.c: Remove compiler warning myisam/myisamchk.c: Remove compiler warning myisam/rt_test.c: #ifdef not used code mysys/hash.c: Remove compiler warning (from last push) mysys/my_gethwaddr.c: Remove compiler warning ndb/src/ndbapi/ndberror.c: #ifdef not used code regex/regcomp.c: Remove not used code regex/regcomp.ih: Remove not used code (to remove compiler warnings) sql-common/client.c: Remove compiler warnings sql/field.cc: Simple optimization sql/ha_innodb.cc: Rename mysql_embedded -> mysqld_embedded sql/item.cc: Fix comments Move variables first on block Remove else after return Simple optimizations (no logic changes) sql/item_cmpfunc.cc: Added comment sql/mysql_priv.h: Rename mysql_embedded -> mysqld_embedded sql/mysqld.cc: Rename mysql_embedded -> mysqld_embedded sql/sql_acl.cc: Added comments simple optimization Fixed 'very unlikely' bug when doing REVOKE ALL PRIVILEGES sql/sql_select.cc: More comments Simple optimization sql/sql_show.cc: Simple changes to make similar code similar More comments sql/sql_string.cc: Trivial optimization and better code layout strings/Makefile.am: Change xml.c to use bcmp to avoid warnings from purify strings/xml.c: Change xml.c to use bcmp to avoid warnings from purify tests/client_test.c: Remove usage of MAXPATHLEN (all MySQL code uses FN_REFLEN)
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index 0b30cc3386d..eb97c0ce949 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -26,14 +26,6 @@
#include <mysql.h>
#include <my_getopt.h>
#include <m_string.h>
-#ifdef HAVE_SYS_PARAM_H
-/* Include to get MAXPATHLEN */
-#include <sys/param.h>
-#endif
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 256
-#endif
#define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */
@@ -6652,8 +6644,8 @@ static void test_frm_bug()
MYSQL_RES *result;
MYSQL_ROW row;
FILE *test_file;
- char data_dir[MAXPATHLEN];
- char test_frm[MAXPATHLEN];
+ char data_dir[FN_REFLEN];
+ char test_frm[FN_REFLEN];
int rc;
myheader("test_frm_bug");
@@ -6674,7 +6666,7 @@ static void test_frm_bug()
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= data_dir;
- bind[0].buffer_length= MAXPATHLEN;
+ bind[0].buffer_length= FN_REFLEN;
bind[0].is_null= 0;
bind[0].length= 0;
bind[1]= bind[0];