summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-11-29 09:24:20 +0100
committerunknown <joreland@mysql.com>2004-11-29 09:24:20 +0100
commitecfe759e45343519712b636f534efabd16922a29 (patch)
tree585ff0b34e58a8a197b55d99439325cf0d811426
parent40a473d35c6014ad5e6d57826db60fdf149612d8 (diff)
parentada600e852498c1ce37566fb07a6c33e4fc29335 (diff)
downloadmariadb-git-ecfe759e45343519712b636f534efabd16922a29.tar.gz
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
-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/rpl_start_stop_slave.result4
-rw-r--r--mysql-test/r/select.result24
-rw-r--r--mysql-test/t/func_compress.test5
-rw-r--r--mysql-test/t/ndb_grant.later (renamed from mysql-test/t/ndb_grant.test)0
-rw-r--r--mysql-test/t/select.test16
-rw-r--r--ndb/src/ndbapi/ndberror.c3
-rw-r--r--scripts/mysql_fix_privilege_tables.sh2
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/slave.cc3
12 files changed, 59 insertions, 20 deletions
diff --git a/configure.in b/configure.in
index 1fcba6b8f5f..0d6e797f571 100644
--- a/configure.in
+++ b/configure.in
@@ -1931,9 +1931,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 b8d03cfab5f..84e3886162a 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -1677,11 +1677,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/rpl_start_stop_slave.result b/mysql-test/r/rpl_start_stop_slave.result
index 1b4d87124d1..1fcb586d1fb 100644
--- a/mysql-test/r/rpl_start_stop_slave.result
+++ b/mysql-test/r/rpl_start_stop_slave.result
@@ -1,9 +1,9 @@
-slave stop;
+stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-slave start;
+start slave;
stop slave;
create table t1(n int);
start slave;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 3417c7ecb85..a05b379ed88 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2353,6 +2353,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 '',
@@ -2365,7 +2386,4 @@ 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;
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/ndb_grant.test b/mysql-test/t/ndb_grant.later
index d3899d9972f..d3899d9972f 100644
--- a/mysql-test/t/ndb_grant.test
+++ b/mysql-test/t/ndb_grant.later
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 3b36ba6bfb2..9bbd26a9c1c 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1899,6 +1899,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)
#
@@ -1915,6 +1929,4 @@ 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/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c
index bc49358cc63..6744f4c1640 100644
--- a/ndb/src/ndbapi/ndberror.c
+++ b/ndb/src/ndbapi/ndberror.c
@@ -241,11 +241,12 @@ ErrorBundle ErrorCodes[] = {
{ 877, AE, "877" },
{ 878, AE, "878" },
{ 879, AE, "879" },
+ { 880, AE, "Tried to read too much - too many getValue calls" },
{ 884, AE, "Stack overflow in interpreter" },
{ 885, AE, "Stack underflow in interpreter" },
{ 886, AE, "More than 65535 instructions executed in interpreter" },
+ { 897, AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" },
{ 4256, AE, "Must call Ndb::init() before this function" },
- { 880, AE, "Tried to read too much - too many getValue calls" },
{ 4257, AE, "Tried to read too much - too many getValue calls" },
/**
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index c9e8e0c4dfd..b84e512b69a 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -115,7 +115,7 @@ then
password=$old_style_password
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 4970517de87..ac43b36600d 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -735,7 +735,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 6d5c997bade..b5caf2627a6 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1820,7 +1820,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);