summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-11-28 20:42:04 +0100
committerunknown <serg@serg.mylan>2004-11-28 20:42:04 +0100
commit8b244fc665efa74d4aa95fd1910680327dc779bf (patch)
tree73ac6d40766844cf3ca373cf0b7e4edf0a7a5be0
parent4c9c3f32de96fd9a35ee1a9337dab1da6f99fddb (diff)
parent1b898a22460a369b8ca21f573973a8a0518e85d4 (diff)
downloadmariadb-git-8b244fc665efa74d4aa95fd1910680327dc779bf.tar.gz
merged
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged innobase/srv/srv0srv.c: Auto merged mysql-test/r/rpl_start_stop_slave.result: Auto merged scripts/mysql_fix_privilege_tables.sh: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.h: Auto merged sql/slave.cc: Auto merged mysql-test/r/select.result: !bk-eb mysql-test/t/select.test: !bk-eb
-rw-r--r--configure.in4
-rw-r--r--innobase/srv/srv0srv.c12
-rw-r--r--mysql-test/r/func_compress.result4
-rw-r--r--mysql-test/r/select.result24
-rw-r--r--mysql-test/t/func_compress.test5
-rw-r--r--mysql-test/t/select.test16
-rw-r--r--scripts/mysql_fix_privilege_tables.sh2
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/slave.cc3
9 files changed, 55 insertions, 17 deletions
diff --git a/configure.in b/configure.in
index f6dd9c56b20..d3385fc425b 100644
--- a/configure.in
+++ b/configure.in
@@ -1933,9 +1933,11 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
#
#
case "$target" in
- *-*-aix4*)
+ *-*-aix4* | *-*-sco*)
# (grr) aix 4.3 has a stub for clock_gettime, (returning ENOSYS)
# and using AC_TRY_RUN is hard when cross-compiling
+ # We also disable for SCO for the time being, the headers for the
+ # thread library we use conflicts with other headers.
;;
*) AC_CHECK_FUNCS(clock_gettime)
;;
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 80aea50be2e..ba102b6f4b9 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -1783,11 +1783,13 @@ loop:
srv_printf_innodb_monitor(stderr);
}
- mutex_enter(&srv_monitor_file_mutex);
- rewind(srv_monitor_file);
- srv_printf_innodb_monitor(srv_monitor_file);
- os_file_set_eof(srv_monitor_file);
- mutex_exit(&srv_monitor_file_mutex);
+ if (srv_innodb_status) {
+ mutex_enter(&srv_monitor_file_mutex);
+ rewind(srv_monitor_file);
+ srv_printf_innodb_monitor(srv_monitor_file);
+ os_file_set_eof(srv_monitor_file);
+ mutex_exit(&srv_monitor_file_mutex);
+ }
if (srv_print_innodb_tablespace_monitor
&& difftime(current_time, last_table_monitor_time) > 60) {
diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result
index 11dbcca9431..9bc8e417e19 100644
--- a/mysql-test/r/func_compress.result
+++ b/mysql-test/r/func_compress.result
@@ -69,6 +69,6 @@ Error 1259 ZLIB: Input data corrupted
Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
drop table t1;
set @@max_allowed_packet=1048576*100;
-select compress(repeat('aaaaaaaaaa', 10000000)) is null;
-compress(repeat('aaaaaaaaaa', 10000000)) is null
+select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null;
+compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null
0
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index ffc7c176a48..72b46374e66 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2321,6 +2321,27 @@ select * from t2,t3 where t2.s = t3.s;
s s
two two
drop table t1, t2, t3;
+create table t1 (a integer, b integer, index(a), index(b));
+create table t2 (c integer, d integer, index(c), index(d));
+insert into t1 values (1,2), (2,2), (3,2), (4,2);
+insert into t2 values (1,3), (2,3), (3,4), (4,4);
+explain select * from t1 left join t2 on a=c where d in (4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref c,d d 5 const 2 Using where
+1 SIMPLE t1 ALL a NULL NULL NULL 3 Using where
+select * from t1 left join t2 on a=c where d in (4);
+a b c d
+3 2 3 4
+4 2 4 4
+explain select * from t1 left join t2 on a=c where d = 4;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref c,d d 5 const 2 Using where
+1 SIMPLE t1 ALL a NULL NULL NULL 3 Using where
+select * from t1 left join t2 on a=c where d = 4;
+a b c d
+3 2 3 4
+4 2 4 4
+drop table t1, t2;
CREATE TABLE t1 (
i int(11) NOT NULL default '0',
c char(10) NOT NULL default '',
@@ -2333,9 +2354,6 @@ INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
-EXPLAIN SELECT i FROM t1 WHERE i=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
CREATE TABLE t1 (
K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '',
diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test
index 7b70289d2c0..f46589e9e0e 100644
--- a/mysql-test/t/func_compress.test
+++ b/mysql-test/t/func_compress.test
@@ -38,7 +38,10 @@ drop table t1;
#
# Bug #5497: a problem with large strings
+# note that when LOW_MEMORY is set the "test" below is meaningless
#
set @@max_allowed_packet=1048576*100;
-select compress(repeat('aaaaaaaaaa', 10000000)) is null;
+--replace_result "''" XXX "'1'" XXX
+eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null;
+
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 3a3c1243c7c..e548aba29fe 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1900,6 +1900,20 @@ select * from t2,t3 where t2.s = t3.s;
drop table t1, t2, t3;
#
+# Bug #3759
+# Both queries should produce identical plans and results.
+#
+create table t1 (a integer, b integer, index(a), index(b));
+create table t2 (c integer, d integer, index(c), index(d));
+insert into t1 values (1,2), (2,2), (3,2), (4,2);
+insert into t2 values (1,3), (2,3), (3,4), (4,4);
+explain select * from t1 left join t2 on a=c where d in (4);
+select * from t1 left join t2 on a=c where d in (4);
+explain select * from t1 left join t2 on a=c where d = 4;
+select * from t1 left join t2 on a=c where d = 4;
+drop table t1, t2;
+
+#
# Covering index is mentioned in EXPLAIN output for const tables (bug #5333)
#
@@ -1916,8 +1930,6 @@ INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
-EXPLAIN SELECT i FROM t1 WHERE i=1;
-
DROP TABLE t1;
#
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index 2d6434a0eb5..659c16ab493 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -105,7 +105,7 @@ then
done
fi
-cmd="$bindir/mysql -f --user=$user --host=$host"
+cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host"
if test ! -z "$password" ; then
cmd="$cmd --password=$password"
fi
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 23bd1b503f7..389a614e3d5 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -760,7 +760,7 @@ void Item_func_interval::fix_length_and_dec()
maybe_null= 0;
max_length= 2;
used_tables_cache|= row->used_tables();
- not_null_tables_cache&= row->not_null_tables();
+ not_null_tables_cache= row->not_null_tables();
with_sum_func= with_sum_func || row->with_sum_func;
const_item_cache&= row->const_item();
}
diff --git a/sql/slave.cc b/sql/slave.cc
index dbe58275b9c..e67def552bd 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2002,7 +2002,8 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
position is at the beginning of the file, and will read the
"signature" and then fast-forward to the last position read.
*/
- if (thread_mask & SLAVE_SQL) {
+ if (thread_mask & SLAVE_SQL)
+ {
my_b_seek(mi->rli.cur_log, (my_off_t) 0);
}
DBUG_RETURN(0);