diff options
author | unknown <igor@rurik.mysql.com> | 2006-04-21 09:46:47 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-04-21 09:46:47 -0700 |
commit | 42f715818a5834cce8778fccaef60b4ae7223270 (patch) | |
tree | db7a8044abda8b411c5f9c34fa335f95e52fa938 | |
parent | b93dd4327b159caf6a684a1d1463373f7e57b661 (diff) | |
parent | e9bf1b9a898f140cad5617cc1d6f888cf9284f62 (diff) | |
download | mariadb-git-42f715818a5834cce8778fccaef60b4ae7223270.tar.gz |
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 3 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 6 | ||||
-rw-r--r-- | mysql-test/ndb/ndbcluster.sh | 6 | ||||
-rw-r--r-- | ndb/include/util/ndb_opts.h | 6 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbScanOperation.cpp | 5 |
5 files changed, 21 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a045441e046..ea0e11a69d9 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1457,7 +1457,8 @@ sub ndbcluster_start ($) { # FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster", ["--port=$opt_ndbcluster_port", - "--data-dir=$opt_vardir"], + "--data-dir=$opt_vardir", + "--character-sets-dir=$path_charsetsdir"], "", "/dev/null", "", "") ) { mtr_error("Error ndbcluster_start"); diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index d7e976f9d49..c41344548f5 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -631,7 +631,9 @@ fi [ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp [ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run [ -d $MYSQL_TEST_DIR/var/log ] || mkdir $MYSQL_TEST_DIR/var/log -if ! test -L $MYSQL_TEST_DIR/var/std_data_ln ; then + +# Use 'test', not '[' as the shell builtin might not have '-L +if test ! -L "$MYSQL_TEST_DIR/var/std_data_ln" ; then ln -s $MYSQL_TEST_DIR/std_data/ $MYSQL_TEST_DIR/var/std_data_ln fi @@ -1241,7 +1243,7 @@ start_ndbcluster() else NDBCLUSTER_EXTRA_OPTS="--small" fi - ./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0 + ./ndb/ndbcluster $NDBCLUSTER_OPTS --character-sets-dir=$CHARSETSDIR $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0 if [ x$NDB_STATUS_OK != x1 ] ; then if [ x$FORCE != x1 ] ; then exit 1 diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh index c09c013552e..ad01f6574cf 100644 --- a/mysql-test/ndb/ndbcluster.sh +++ b/mysql-test/ndb/ndbcluster.sh @@ -60,6 +60,7 @@ ndb_imem=24M NDB_MGM_EXTRA_OPTS= NDB_MGMD_EXTRA_OPTS= NDBD_EXTRA_OPTS= +CHARSETSDIR= while test $# -gt 0; do case "$1" in @@ -106,6 +107,9 @@ while test $# -gt 0; do --ndbd-extra-opts=*) NDBD_EXTRA_OPTS=`echo "$1" | sed -e "s;--ndbd-extra-opts=;;"` ;; + --character-sets-dir=*) + CHARSETSDIR=`echo "$1" | sed -e "s;--character-sets-dir=;;"` + ;; -- ) shift; break ;; --* ) $ECHO "Unrecognized option: $1"; exit 1 ;; * ) break ;; @@ -135,7 +139,7 @@ fi exec_mgmtclient="$exec_mgmtclient --no-defaults $NDB_MGM_EXTRA_OPTS" exec_mgmtsrvr="$exec_mgmtsrvr --no-defaults $NDB_MGMD_EXTRA_OPTS" -exec_ndb="$exec_ndb --no-defaults $NDBD_EXTRA_OPTS" +exec_ndb="$exec_ndb --no-defaults $NDBD_EXTRA_OPTS --character-sets-dir=$CHARSETSDIR" exec_waiter="$exec_waiter --no-defaults" ndb_host="localhost" diff --git a/ndb/include/util/ndb_opts.h b/ndb/include/util/ndb_opts.h index 787c32f06fd..08ab4a2e9df 100644 --- a/ndb/include/util/ndb_opts.h +++ b/ndb/include/util/ndb_opts.h @@ -84,7 +84,10 @@ const char *opt_debug= 0; 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\ { "core-file", OPT_WANT_CORE, "Write core on errors.",\ (gptr*) &opt_core, (gptr*) &opt_core, 0,\ - GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0} + GET_BOOL, NO_ARG, OPT_WANT_CORE_DEFAULT, 0, 0, 0, 0, 0},\ + {"character-sets-dir", OPT_CHARSETS_DIR,\ + "Directory where character sets are.", (gptr*) &charsets_dir,\ + (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}\ #ifndef DBUG_OFF #define NDB_STD_OPTS(prog_name) \ @@ -111,6 +114,7 @@ enum ndb_std_options { OPT_WANT_CORE, OPT_NDB_MGMD, OPT_NDB_NODEID, + OPT_CHARSETS_DIR, NDB_STD_OPTIONS_LAST /* should always be last in this enum */ }; diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp index 9f8a2916d2f..869704c7bb3 100644 --- a/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/ndb/src/ndbapi/NdbScanOperation.cpp @@ -1086,6 +1086,11 @@ int NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo, int type, const void* aValue, Uint32 len) { + if (!tAttrInfo) + { + setErrorCodeAbort(4318); // Invalid attribute + return -1; + } if (theOperationType == OpenRangeScanRequest && (0 <= type && type <= 4) && len <= 8000) { |