summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysql.cc14
-rw-r--r--innobase/include/rem0rec.h4
-rw-r--r--innobase/include/rem0rec.ic2
-rw-r--r--libmysql/Makefile.shared5
-rw-r--r--libmysqld/examples/Makefile.am2
-rw-r--r--mysql-test/mysql-test-run.sh24
-rw-r--r--mysql-test/r/rpl_rotate_logs.result2
-rw-r--r--mysql-test/t/federated.disabled1
-rw-r--r--mysql-test/t/rpl_rotate_logs.test2
9 files changed, 46 insertions, 10 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index bbba5be1cdf..046cba536be 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -44,7 +44,7 @@
#include <locale.h>
#endif
-const char *VER= "14.7";
+const char *VER= "14.8";
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
@@ -144,6 +144,7 @@ static char *current_host,*current_db,*current_user=0,*opt_password=0,
*current_prompt=0, *delimiter_str= 0,
*default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
static char *histfile;
+static char *histfile_tmp;
static String glob_buffer,old_buffer;
static String processed_prompt;
static char *full_username=0,*part_username=0,*default_prompt=0;
@@ -442,6 +443,13 @@ int main(int argc,char *argv[])
if (verbose)
tee_fprintf(stdout, "Reading history-file %s\n",histfile);
read_history(histfile);
+ if (!(histfile_tmp= (char*) my_malloc((uint) strlen(histfile) + 5,
+ MYF(MY_WME))))
+ {
+ fprintf(stderr, "Couldn't allocate memory for temp histfile!\n");
+ exit(1);
+ }
+ sprintf(histfile_tmp, "%s.TMP", histfile);
}
}
#endif
@@ -470,7 +478,8 @@ sig_handler mysql_end(int sig)
/* write-history */
if (verbose)
tee_fprintf(stdout, "Writing history-file %s\n",histfile);
- write_history(histfile);
+ if (!write_history(histfile_tmp))
+ my_rename(histfile_tmp, histfile, MYF(MY_WME));
}
batch_readline_end(status.line_buff);
completion_hash_free(&ht);
@@ -485,6 +494,7 @@ sig_handler mysql_end(int sig)
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
my_free(opt_mysql_unix_port,MYF(MY_ALLOW_ZERO_PTR));
my_free(histfile,MYF(MY_ALLOW_ZERO_PTR));
+ my_free(histfile_tmp,MYF(MY_ALLOW_ZERO_PTR));
my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
my_free(current_host,MYF(MY_ALLOW_ZERO_PTR));
my_free(current_user,MYF(MY_ALLOW_ZERO_PTR));
diff --git a/innobase/include/rem0rec.h b/innobase/include/rem0rec.h
index 2cc87a34f27..c430def684a 100644
--- a/innobase/include/rem0rec.h
+++ b/innobase/include/rem0rec.h
@@ -139,7 +139,7 @@ bits of a record. (Only compact records have status bits.) */
UNIV_INLINE
ulint
rec_get_info_and_status_bits(
-/*==============*/
+/*=========================*/
/* out: info bits */
rec_t* rec, /* in: physical record */
ibool comp); /* in: TRUE=compact page format */
@@ -149,7 +149,7 @@ bits of a record. (Only compact records have status bits.) */
UNIV_INLINE
void
rec_set_info_and_status_bits(
-/*==============*/
+/*=========================*/
rec_t* rec, /* in: physical record */
ibool comp, /* in: TRUE=compact page format */
ulint bits); /* in: info bits */
diff --git a/innobase/include/rem0rec.ic b/innobase/include/rem0rec.ic
index f15e0fdffef..ca69b9ca871 100644
--- a/innobase/include/rem0rec.ic
+++ b/innobase/include/rem0rec.ic
@@ -564,7 +564,7 @@ rec_set_info_and_status_bits(
} else {
ut_ad(!(bits & ~(REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)));
}
- rec_set_info_bits(rec, bits & ~REC_NEW_STATUS_MASK, comp);
+ rec_set_info_bits(rec, comp, bits & ~REC_NEW_STATUS_MASK);
}
/**********************************************************
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index c5dc1de0c5a..50dedebe119 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -65,8 +65,9 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
my_compress.lo array.lo my_once.lo list.lo my_net.lo \
charset.lo charset-def.lo hash.lo mf_iocache.lo \
mf_iocache2.lo my_seek.lo my_sleep.lo \
- my_pread.lo mf_cache.lo md5.lo sha1.lo\
- my_getopt.lo my_gethostbyname.lo my_port.lo
+ my_pread.lo mf_cache.lo md5.lo sha1.lo \
+ my_getopt.lo my_gethostbyname.lo my_port.lo \
+ my_rename.lo
sqlobjects = net.lo
sql_cmn_objects = pack.lo client.lo my_time.lo
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index b94d2db2912..d70d7330e55 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -29,7 +29,7 @@ mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
mysql_client_test_embedded_LINK = $(CXXLINK)
-mysql_client_test_embedded_SOURCES = $(top_srcdir)/tests/mysql_client_test.c
+mysql_client_test_embedded_SOURCES = mysql_client_test.c
clean:
rm -f $(client_sources)
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 1e10ee97e40..1e3052de8e8 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -198,6 +198,13 @@ LD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$LD_LIBRARY_PATH"
DYLD_LIBRARY_PATH="$BASEDIR/lib:$BASEDIR/libmysql/.libs:$DYLD_LIBRARY_PATH"
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH
+#
+# Allow anyone in the group to see the generated database files
+#
+UMASK=0660
+UMASK_DIR=0770
+export UMASK UMASK_DIR
+
MASTER_RUNNING=0
MASTER1_RUNNING=0
MASTER_MYPORT=9306
@@ -765,6 +772,17 @@ skip_test() {
$ECHO "$RES$RES_SPACE [ skipped ]"
}
+
+disable_test() {
+ USERT=" ...."
+ SYST=" ...."
+ REALT=" ...."
+ pname=`$ECHO "$1 "|$CUT -c 1-24`
+ RES="$pname"
+ skip_inc
+ $ECHO "$RES$RES_SPACE [ disabled ] $2"
+}
+
report_stats () {
if [ $TOT_FAIL = 0 ]; then
$ECHO "All $TOT_TEST tests were successful."
@@ -1411,6 +1429,12 @@ run_testcase ()
if [ -n "$RESULT_EXT" -a \( x$RECORD = x1 -o -f "$result_file$RESULT_EXT" \) ] ; then
result_file="$result_file$RESULT_EXT"
fi
+ if [ -e "$TESTDIR/$tname.disabled" ]
+ then
+ comment=`$CAT $TESTDIR/$tname.disabled`;
+ disable_test $tname "$comment"
+ return
+ fi
if [ "$USE_MANAGER" = 1 ] ; then
many_slaves=`$EXPR \( \( $tname : rpl_failsafe \) != 0 \) \| \( \( $tname : rpl_chain_temp_table \) != 0 \)`
fi
diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result
index cfd296fd44b..b1847636790 100644
--- a/mysql-test/r/rpl_rotate_logs.result
+++ b/mysql-test/r/rpl_rotate_logs.result
@@ -1,7 +1,7 @@
drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4;
start slave;
-ERROR HY000: File 'TESTDIR/var/slave-data/master.info' not found (Errcode: 13)
+Got one of the listed errors
start slave;
ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
diff --git a/mysql-test/t/federated.disabled b/mysql-test/t/federated.disabled
new file mode 100644
index 00000000000..5ad728b6f10
--- /dev/null
+++ b/mysql-test/t/federated.disabled
@@ -0,0 +1 @@
+Patrick Galbraith should fix this
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 63ddf495347..2b5c72d16d2 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -24,7 +24,7 @@ drop table if exists t1, t2, t3, t4;
# START SLAVE will fail because it can't read the file (mode 000)
# (system error 13)
--replace_result $MYSQL_TEST_DIR TESTDIR
---error 1105
+--error 1105,1105
start slave;
system chmod 600 var/slave-data/master.info;
# It will fail again because the file is empty so the slave cannot get valuable