Commit 81a4e101 authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi
Browse files

Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql

parents 635ef42a 8fca84c6
Loading
Loading
Loading
Loading
+61 −60
Original line number Diff line number Diff line
*.a
*.bb
*.bbg
*.core
*.da
*.gcov
*.la
*.lo
*.o
@@ -10,13 +14,18 @@
.gdb_history
.libs
.o
db-*.*.*
.out
.snprj/*
BitKeeper/etc/config
BitKeeper/etc/csets
BitKeeper/etc/csets-in
BitKeeper/etc/csets-out
BitKeeper/etc/gone
BitKeeper/etc/level
BitKeeper/etc/pushed
BitKeeper/tmp/*
BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/gone
COPYING
COPYING.LIB
Docs/INSTALL-BINARY
@@ -39,6 +48,7 @@ Docs/manual.vr
Docs/manual_a4.ps
Docs/manual_letter.ps
Docs/manual_toc.html
Docs/my_sys.doc
Docs/mysql.info
INSTALL-SOURCE
MIRRORS
@@ -48,6 +58,39 @@ Makefile.in'
PENDING/*
TAGS
aclocal.m4
bdb/README
bdb/build_unix/*
bdb/build_vxworks/db.h
bdb/build_win32/db.h
bdb/dist/configure
bdb/dist/tags
bdb/dist/template/rec_btree
bdb/dist/template/rec_crdel
bdb/dist/template/rec_db
bdb/dist/template/rec_hash
bdb/dist/template/rec_log
bdb/dist/template/rec_qam
bdb/dist/template/rec_txn
bdb/examples_java
bdb/hash/hash_auto.c
bdb/include/btree_auto.h
bdb/include/crdel_auto.h
bdb/include/db_auto.h
bdb/include/db_server.h
bdb/include/hash_auto.h
bdb/include/log_auto.h
bdb/include/qam_auto.h
bdb/include/txn_auto.h
bdb/java/src/com/sleepycat/db/DbConstants.java
bdb/log/log_auto.c
bdb/qam/qam_auto.c
bdb/rpc_client/db_server_clnt.c
bdb/rpc_client/gen_client.c
bdb/rpc_server/db_server_svc.c
bdb/rpc_server/db_server_xdr.c
bdb/rpc_server/gen_db_server.c
bdb/test/include.tcl
bdb/txn/txn_auto.c
client/insert_test
client/mysql
client/mysqladmin
@@ -65,12 +108,15 @@ config.log
config.status
configure
core
db-*.*.*
dbug/user.t
extra/comp_err
extra/my_print_defaults
extra/perror
extra/replace
extra/resolve_stack_dump
extra/resolveip
gmon.out
heap/hp_test1
heap/hp_test2
include/my_config.h
@@ -88,6 +134,7 @@ libmysql/my_static.h
libmysql/mysys_priv.h
libmysql_r/*.c
libmysql_r/acconfig.h
libmysql_r/conf_to_src
libmysql_r/my_static.h
libmysql_r/mysys_priv.h
libtool
@@ -106,10 +153,16 @@ myisam/mi_test_all
myisam/myisamchk
myisam/myisamlog
myisam/myisampack
mysql-test/gmon.out
mysql-test/install_test_db
mysql-test/mysql-test-run
mysql-test/r/*.reject
mysql-test/share/mysql
mysql-test/var/*
mysqld.S
mysqld.sym
mysys/test_charset
mysys/test_dir
mysys/test_thr_alarm
mysys/test_thr_lock
mysys/testhash
@@ -134,10 +187,12 @@ scripts/mysqld_multi
scripts/mysqldumpslow
scripts/mysqlhotcopy
scripts/safe_mysqld
sql-bench/Results-linux/ATIS-mysql_bdb-Linux_2.2.14_my_SMP_i686
sql-bench/bench-init.pl
sql-bench/compare-results
sql-bench/copy-db
sql-bench/crash-me
sql-bench/output/*
sql-bench/run-all-tests
sql-bench/server-cfg
sql-bench/test-ATIS
@@ -148,11 +203,16 @@ sql-bench/test-create
sql-bench/test-insert
sql-bench/test-select
sql-bench/test-wisconsin
sql/.gdbinit
sql/gen_lex_hash
sql/gmon.out
sql/lex_hash.h
sql/mini_client_errors.c
sql/mysqlbinlog
sql/mysqld
sql/share/*.sys
sql/share/charsets/gmon.out
sql/share/gmon.out
sql/share/norwegian-ny/errmsg.sys
sql/share/norwegian/errmsg.sys
sql/sql_yacc.cc
@@ -175,63 +235,4 @@ support-files/mysql-log-rotate
support-files/mysql.server
support-files/mysql.spec
tags
libmysql_r/conf_to_src
mysql-test/install_test_db
mysql-test/mysql-test-run
BitKeeper/tmp/gone
mysqld.S
mysqld.sym
.snprj/*
sql-bench/output/*
sql-bench/Results-linux/ATIS-mysql_bdb-Linux_2.2.14_my_SMP_i686
Docs/my_sys.doc
tmp/*
extra/resolve_stack_dump
sql/share/*.sys
BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/*
bdb/examples_java
bdb/README
bdb/build_vxworks/db.h
bdb/build_win32/db.h
bdb/dist/configure
bdb/dist/tags
bdb/build_unix/*
sql/.gdbinit
BitKeeper/etc/level
*.gcov
*.bb
*.bbg
*.da
.out
bdb/dist/template/rec_btree
bdb/dist/template/rec_crdel
bdb/dist/template/rec_db
bdb/dist/template/rec_hash
bdb/dist/template/rec_log
bdb/dist/template/rec_qam
bdb/dist/template/rec_txn
bdb/hash/hash_auto.c
bdb/include/btree_auto.h
bdb/include/crdel_auto.h
bdb/include/db_auto.h
bdb/include/db_server.h
bdb/include/hash_auto.h
bdb/include/log_auto.h
bdb/include/qam_auto.h
bdb/include/txn_auto.h
bdb/java/src/com/sleepycat/db/DbConstants.java
bdb/log/log_auto.c
bdb/qam/qam_auto.c
bdb/rpc_client/db_server_clnt.c
bdb/rpc_client/gen_client.c
bdb/rpc_server/db_server_svc.c
bdb/rpc_server/db_server_xdr.c
bdb/rpc_server/gen_db_server.c
bdb/test/include.tcl
bdb/txn/txn_auto.c
gmon.out
mysql-test/gmon.out
sql/gmon.out
sql/share/charsets/gmon.out
sql/share/gmon.out
+1 −0
Original line number Diff line number Diff line
sasha@mysql.sashanet.com
monty@donna.mysql.fi
+24 −5
Original line number Diff line number Diff line
@@ -27391,8 +27391,22 @@ master-slave relationship with @code{log-slave-updates} enabled.
Note, however, that many queries will not work right in this kind of
setup unless your client code is written to take care of the potential
problems that can happen from updates that occur in different sequence
on different servers. Note that the log format has changed in Version 3.23.26
so that pre-3.23.26 slaves will not be able to read it.
on different servers.
This means that you can do a setup like the following:
@example
A -> B -> C -> A
@end example
This setup will only works if you only do non conflicting updates
between the tables.  In other words, if you insert data in A and C, you
should never insert a row in A that may have a conflicting key with a
row insert in C.  You should also not update the sam rows on two servers
if the order in which the updates are applied matters.
Note that the log format has changed in Version 3.23.26 so that
pre-3.23.26 slaves will not be able to read it.
@item
If the query on the slave gets an error, the slave thread will
terminate, and a message will appear in the @code{.err} file. You should
@@ -28847,9 +28861,11 @@ explicitely lock the table with @code{LOCK TABLES} or execute a command that
will modify every row in the table, like @code{ALTER TABLE}.
In @strong{MySQL} Version 3.23.7 and above, you can insert rows into
@code{MyISAM} tables at the same time other threads are reading from
the table.  Note that currently this only works if there are no holes after
deleted rows in the table at the time the insert is made.
@code{MyISAM} tables at the same time other threads are reading from the
table.  Note that currently this only works if there are no holes after
deleted rows in the table at the time the insert is made. When all holes
has been filled with new data, concurrent inserts will automaticly be
enabled again.
Table locking enables many threads to read from a table at the same
time, but if a thread wants to write to a table, it must first get
@@ -42743,6 +42759,9 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.37
@itemize @bullet
@item
@code{UPDATE} and @code{DELETE} with @code{WHERE unique_key_part IS NULL}
didn't update/delete all rows.
@item
Disabled @code{INSERT DELAYED} for tables that supports transactions.
@item
Fixed bug when using date functions on @code{TEXT}/@code{BLOB} column
+28 −0
Original line number Diff line number Diff line
@@ -92,3 +92,31 @@ NULL 9 0
NULL	9	0
a	b	c
6	6	0
table	type	possible_keys	key	key_len	ref	rows	Extra
t1	ref	idx1	idx1	5	const	1	where used
table	type	possible_keys	key	key_len	ref	rows	Extra
t1	const	idx1	idx1	5	const	1	
id
101
102
105
106
109
110
id
101
102
105
106
109
110
id	uniq_id
3	1
4	2
7	3
8	4
id	uniq_id
3	1
4	2
7	3
8	4
+46 −0
Original line number Diff line number Diff line
@@ -45,3 +45,49 @@ select * from t1 where (a is null or a = 7) and b=7 and c=0;
select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
select * from t1 where b like "6%";
drop table t1;


#
# The following failed for Matt Loschert
#

DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (
  id int(10) unsigned NOT NULL auto_increment,
  uniq_id int(10) unsigned default NULL,
  PRIMARY KEY  (id),
  UNIQUE KEY idx1 (uniq_id)
) TYPE=MyISAM;

CREATE TABLE t2 (
  id int(10) unsigned NOT NULL auto_increment,
  uniq_id int(10) unsigned default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);

#
# Check IS NULL optimization
#
explain select id from t1 where uniq_id is null;
explain select id from t1 where uniq_id =1;
#
# Check updates
#
UPDATE t1 SET id=id+100 where uniq_id is null;
UPDATE t2 SET id=id+100 where uniq_id is null;
select id from t1 where uniq_id is null;
select id from t2 where uniq_id is null;
#
# Delete all records from each table where the uniq_id field is null
#
DELETE FROM t1 WHERE uniq_id IS NULL;
DELETE FROM t2 WHERE uniq_id IS NULL;
#
# Select what is left -- notice the difference
#
SELECT * FROM t1 ORDER BY uniq_id, id;
SELECT * FROM t2 ORDER BY uniq_id, id;
DROP table t1,t2;
Loading