Commit graph

7077 commits

Author SHA1 Message Date
unknown
03dbf8ccbb Fix for BUG#1686
"If 2 master threads with same-name temp table, slave makes bad binlog"
and (two birds with one stone) for
BUG#1240 "slave of slave breaks when STOP SLAVE was issud on parent slave
and temp tables".

Here is the design change:
in a slave running with --log-slave-updates, events are now logged with the
thread id they had on the master. So no more id conflicts between master threads,
but introduces id conflicts between one master thread and one normal 
client thread connected to the slave. This is solved by storing the server id
in the temp table's name.

New test which requires mysql-test-run to be run with --manager,
otherwise it will be skipped.

Undoing a Monty's change (hum, a chill runs down my spine ;) which was
"Cleanup temporary tables when slave ends" in ChangeSet 1.1572.1.1.


mysql-test/mysql-test-run.sh:
  One new test which needs more than one slave so must be hardcoded in mysql-test-run.sh.
sql/log_event.cc:
  The event needs to carry a slave_proxy_id (which is set at event's creation
  and used at event's logging).
  This is used for events created by ::exec_event() in the slave SQL thread:
  now we want to log these events with the thread id they had on the master.
  This is so that several same-name temp tables simultaneously created on
  the master end up with not the same thread id in the slave's binlog.
sql/log_event.h:
  Query and Load need to carry a slave_proxy_id, like they carried a thread_id
  (to replicate temp tables well).
sql/slave.cc:
  Do not free temp tables in the slave SQL thread. Or they will be lost when
  one does STOP SLAVE / START SLAVE.
  We even save them in rli->save_temporary_tables and set thd->temporary_tables=0
  to prevent them to be freed.
sql/sql_base.cc:
  Put the server id in the table cache key name for temp tables
  (we already put the slave_proxy_id, but we also need the server id
  in case normal clients (not slave threads) are using temp tables
  on the slave).
sql/unireg.h:
  4 more bytes, to store the server id.
2003-10-29 14:23:35 +01:00
unknown
e0fd80f72a Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


mysql-test/r/rpl_trunc_binlog.result:
  Auto merged
2003-10-21 12:24:32 +02:00
unknown
3e937ef4e2 Fix for Bug #1595 "mysqlbinlog can't read a password from the console".
** I already fixed it in 3.23; I fix it in 4.0 separately because the
code is a bit different (so the changeset 1.1422 of 3.23 should not be
merged here) **
Make mysqlbinlog prompt for the password if
mysqlbinlog -p
instead of printing the usage().
This makes mysqlbinlog behave like other clients.
This new code was almost copied from mysqldump.
Note that before, one could use
  mysqlbinlog -p pass
and now one must use
  mysqlbinlog -ppass
(putting a space will ask for the password).


client/mysqlbinlog.cc:
  Make mysqlbinlog prompt for the password if
  mysqlbinlog -p
  instead of printing the usage().
  This makes mysqlbinlog behave like other clients.
  This new code was almost copied from mysqldump.
  Note that before, one could use
    mysqlbinlog -p pass
  and now one must use
    mysqlbinlog -ppass
  (putting a space will ask for the password).
2003-10-21 12:22:24 +02:00
unknown
a2611f9ec6 os0file.c:
Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced


innobase/os/os0file.c:
  Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced
2003-10-19 20:31:32 +03:00
unknown
931d4fccc0 os0file.c:
Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced


innobase/os/os0file.c:
  Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced
2003-10-19 20:28:03 +03:00
unknown
14affe7e2f thr0loc.c, srv0start.c, srv0srv.c, srv0srv.h, os0thread.h, ha_innodb.cc:
Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB


sql/ha_innodb.cc:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
innobase/include/os0thread.h:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
innobase/include/srv0srv.h:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
innobase/srv/srv0srv.c:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
innobase/srv/srv0start.c:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
innobase/thr/thr0loc.c:
  Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
2003-10-17 23:44:34 +03:00
unknown
629ced9d81 Merge oak.local:/home/kostja/mysql/mysql-4.0-root
into oak.local:/home/kostja/mysql/mysql-4.0-1274
2003-10-17 18:44:13 +04:00
unknown
35e7a5400d cancelling a previous change I made in rpl_trunc_binlog.test (which I did not push),
to enable SHOW SLAVE STATUS again.


mysql-test/r/rpl_trunc_binlog.result:
  enabling SHOW SLAVE STATUS again.
mysql-test/t/rpl_trunc_binlog.test:
  enabling SHOW SLAVE STATUS again
2003-10-17 09:26:38 +02:00
unknown
a2128b247f test update: what we want to detect in this test is if the slave stopped.
mysql-test/r/rpl_trunc_binlog.result:
  result update
mysql-test/t/rpl_trunc_binlog.test:
  what we want to detect in this test is if the slave stopped.
2003-10-17 09:15:30 +02:00
unknown
246d37076e - Updated rpl_trunc_binlog test result after last change 2003-10-17 02:32:09 +02:00
unknown
0b8743c1b2 A fix for a random test failure rpl_trunc_binlog: don't RESET MASTER
while the slave is connected.


mysql-test/t/rpl_trunc_binlog.test:
  don't RESET MASTER while the slave is connected; this could confuse the master or slave.
  (In replication you don't RESET MASTER while a slave is connected!)
sql/slave.cc:
  typo
2003-10-17 00:00:25 +02:00
unknown
1b6cffff79 Merge lgrimmer@build.mysql.com:/home/bk/mysql-4.0
into mysql.com:/space/my/mysql-4.0
2003-10-16 22:18:04 +02:00
unknown
de01431b18 - fixed small typo to resolve "test: argument expected" error on Solaris
and Tru64 when running "mysql_install_db"
2003-10-16 22:15:36 +02:00
unknown
f1fc5c54eb Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc_crash-4.0
2003-10-16 21:17:45 +03:00
unknown
4f936a69a7 Safety fix to detect multiple calls to my_thread_end()
Portability fix (For Mac OS X)


configure.in:
  Added detection of malloc / sys/malloc
include/my_pthread.h:
  Safety fix to detect multiple calls to my_thread_end()
libmysqld/lib_sql.cc:
  Remove duplicate call to my_thread_end()
mysys/charset.c:
  Cleanup indentation
  Remove some short variable names
mysys/my_thr_init.c:
  Safety fix to detect multiple calls to my_thread_end()
sql/sql_test.cc:
  Portability fix (For Mac OS X)
2003-10-16 20:55:15 +03:00
unknown
ca5383cfe5 fix for one of the bugs spotted by #1274
sql/sql_select.cc:
  back to the bug #1274:
  the following query
  EXPLAIN SELECT SQL_CALC_FOUND_ROWS race_name 
  FROM races WHERE race_name LIKE '%Madison%' ORDER BY race_date DESC LIMIT 0,100
  
  +-------+------+---------------+------+---------+------+--------+-----------------------------+
  | table | type | possible_keys | key  | key_len | ref  | rows   | Extra                       |
  +-------+------+---------------+------+---------+------+--------+-----------------------------+
  | races | ALL  | NULL          | NULL |    NULL | NULL | 505821 | Using where; Using filesort |
  +-------+------+---------------+------+---------+------+--------+-----------------------------+
  
  The query returns no rows.
  
  There are two problems with it: 
  - wrong access plan is chosed  (sequential index scan in reverse order,
  which is VERY SLOW in case of MyISAM table + packed keys)
  It's wrong, because it doesn't take into account that SQL_CALC_FOUND_ROWS 
  is present, in other words, is based on assumtion that LIMIT
  clause decrease number of rows to access significantly, which is
  not true as all rows are accessed.
  - the access plan is not shown in the EXPLAIN (bug #1560). I'm not
  fixing it here
2003-10-16 17:00:09 +04:00
unknown
8ddb4b7c55 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
2003-10-16 08:23:43 +03:00
unknown
0b45b5c632 Changing max_insert_delayed_threads now also changes the size of thread alarm buffer. 2003-10-16 07:44:18 +03:00
unknown
a49ef9a555 Created small scripts to manage in-tree diffs for
NetWare platform, so changes are visible in the tree 
but cannot affect other platforms.
2003-10-15 19:50:47 -04:00
unknown
0fc97bc9e5 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
2003-10-15 21:50:36 +03:00
unknown
b06eb4d81a Better fix for CREATE TABLE IF NOT EXISTS ... SELECT
Fixed chsize() problem on windows
Extend default timeout on windows clients to 1 year (to avoid timeout problems)


include/mysql.h:
  Added client timeouts (for TCP/IP)
libmysql/libmysql.c:
  Added client timeouts (for TCP/IP)
mysql-test/r/create.result:
  More tests for CREATE TABLE IF NOT EXISTS ... SELECT
mysql-test/t/create.test:
  More tests for CREATE TABLE IF NOT EXISTS ... SELECT
mysys/my_chsize.c:
  Fix for windows
sql/handler.h:
  Remove not used field 'if_not_exists'
  Ordered fields to be more optimized for new CPU's
  Added field 'table_existed'
sql/slave.cc:
  Cleanup temporary tables when slave ends
sql/sql_class.h:
  Remove not used 'do_not_drop' field
sql/sql_insert.cc:
  Better fix for CREATE TABLE IF NOT EXISTS ... SELECT
sql/sql_table.cc:
  Better fix for CREATE TABLE IF NOT EXISTS ... SELECT
2003-10-15 21:41:13 +03:00
unknown
e115c1f46d dummy resize_thr_alarm for Netware 2003-10-15 17:10:47 +02:00
unknown
48446c0f73 Updated comments
mysys/queues.c:
  Comments for new functions (no code change)
mysys/thr_alarm.c:
  Updated comment
2003-10-15 16:55:24 +03:00
unknown
60fb31ddec Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0


sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-10-15 16:23:01 +03:00
unknown
4f5887b22d Add more information about memory usage to debug log
sql/sql_test.cc:
  Add more information about memory usage
2003-10-15 15:21:50 +03:00
unknown
cad75f4a42 Identical mysql.ico and MYSQL.ICO
existed, causing problems on non-case-sensitive OSes.
Deleted conflicting file.


BitKeeper/deleted/.del-MYSQL.ICO~d93519b5f0d6ee1:
  Delete: VC++Files/mysqlshutdown/MYSQL.ICO
2003-10-14 10:45:03 -05:00
unknown
d1ed51db82 Fixed bug in SET enum_system_variable=NULL
BitKeeper/etc/ignore:
  added scripts/make_sharedlib_distribution
mysql-test/r/variables.result:
  Add test for enum_system_variable=NULL
mysql-test/t/variables.test:
  Add test for enum_system_variable=NULL
sql/set_var.cc:
  Fixed bug in SET enum_system_variable=NULL
  Moved some array elements to get result sorted
2003-10-14 16:30:42 +03:00
unknown
aa22ba81fc make LOCK TABLES to work when Lock_tables_priv is granted on the DB level and Select_priv is granted on the table level. 2003-10-14 13:10:41 +02:00
unknown
83f5a6a34f Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/slave.cc:
  Auto merged
2003-10-14 00:27:04 +02:00
unknown
74ea459412 Add new user variables for tuning memory usage:
query_alloc_block_size, query_prealloc_size, range_alloc_block_size,transaction_alloc_block_size and transaction_prealloc_size
Add more checks for "out of memory" detection in range optimization


configure.in:
  Added detection of mallinfo
mysql-test/r/variables.result:
  Test of new variables
mysql-test/t/variables.test:
  Test of new variables
sql/ha_berkeley.cc:
  Use init_sql_alloc instead of init_alloc_root for better OOM detection
sql/log_event.cc:
  Add new user variables for tuning memory usage
sql/mysql_priv.h:
  Add new user variables for tuning memory usage
sql/mysqld.cc:
  Add new user variables for tuning memory usage
sql/opt_ft.cc:
  Add new user variables for tuning memory usage
sql/opt_ft.h:
  Add new user variables for tuning memory usage
sql/opt_range.cc:
  Add new user variables for tuning memory usage
  Add more checks for out of memory conditions
sql/opt_range.h:
  Add new user variables for tuning memory usage
sql/set_var.cc:
  Add new user variables for tuning memory usage
sql/sql_acl.cc:
  Add new user variables for tuning memory usage
sql/sql_class.h:
  Add new user variables for tuning memory usage
sql/sql_delete.cc:
  Add new user variables for tuning memory usage
sql/sql_parse.cc:
  Add new user variables for tuning memory usage
sql/sql_select.cc:
  Add new user variables for tuning memory usage
sql/sql_test.cc:
  Add information about memory useage if system supports mallinfo()
sql/sql_udf.cc:
  Add new user variables for tuning memory usage
sql/sql_update.cc:
  Add new user variables for tuning memory usage
sql/table.cc:
  Add new user variables for tuning memory usage
2003-10-11 22:00:24 +03:00
unknown
13b4c6e05c Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/mysql.orig/test/mysql-4.0
2003-10-10 13:12:39 -04:00
unknown
952ea762b3 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-10-09 18:19:17 +02:00
unknown
7e1a1032e8 Make the slave die if master is 5.0. Indeed, 5.0 masters send
a Format_description_log_event (or maybe it will be named
Description_log_event) which is not recognized by 4.0, so
a 4.0 can't be a slave of 5.0. We detect it early to produce
a helpful message instead of "corrupted relay log" later.


sql/slave.cc:
  Make the slave die if master is 5.0.
2003-10-09 17:40:38 +02:00
unknown
6a90df8b0c fixed temp directory for mysqlbinlog (was wrong on solaris) 2003-10-08 17:15:59 -04:00
unknown
0323a5c49f Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
2003-10-08 22:12:32 +03:00
unknown
5533f59aea Merge
scripts/Makefile.am:
  SCCS merged
2003-10-08 12:49:42 +02:00
unknown
743bc7cf35 - added make_sharedlib_distribution.sh to the source distribution 2003-10-08 12:35:24 +02:00
unknown
26456b8838 Fixed test case that my last patch to mysqlbinlog broke.
Changed --remote to --read-from-remote-server (mysqlbinlog)


client/mysqlbinlog.cc:
  Changed --remote to --read-from-remote-server to make option more understandable
mysql-test/t/mysqlbinlog.test:
  Fixed test case that --remote broke
2003-10-08 10:23:54 +03:00
unknown
927909f5cd Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-10-08 01:30:31 +03:00
unknown
9214babea7 Fix for option 'R' (connect to remote server) in mysqlbinlog
client/mysqlbinlog.cc:
  Fix for option 'R' (connect to remote server)
2003-10-08 01:30:10 +03:00
unknown
08bb033b53 merged
mysql-test/r/create.result:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-10-07 20:41:07 +02:00
unknown
654d266c8b Fix for a test failure with the standard (no-BDB) binary:
as the test is meaningful only if the slave supports transactions,
we require this. As in 4.0 the slave runs with --skip-innodb, we
test for BDB.
2003-10-07 20:41:06 +02:00
unknown
19e954d2f8 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-10-07 21:41:05 +03:00
unknown
cd6dc42fdf Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1323/mysql-4.0
2003-10-07 14:41:04 -04:00
unknown
c7fd510a41 Simple cleanups
client/mysqlbinlog.cc:
  Add default handling to mysqlbinlog
mysql-test/mysql-test-run.sh:
  Cleanup of mysqldump/mysqlbinlog argument handling
scripts/Makefile.am:
  Remove duplicate
scripts/mysql_install_db.sh:
  Change -eq to =
2003-10-07 15:44:31 +03:00
unknown
bc4a57f01a After merge fixes
extra/resolveip.c:
  After merge fix
mysql-test/mysql-test-run.sh:
  Fixed comment
mysql-test/r/rpl_trunc_binlog.result:
  Updated results
sql/log_event.cc:
  Better (shorter) error message
2003-10-07 00:23:29 +03:00
unknown
dfacd7c5fa Merge with 3.23.58
BitKeeper/etc/logging_ok:
  auto-union
mytest-old.c:
  Merge rename: VC++Files/libmysqltest/mytest.c -> mytest-old.c
BitKeeper/deleted/.del-mysqlshutdown.c:
  Delete: VC++Files/mysqlshutdown/mysqlshutdown.c
BitKeeper/deleted/.del-mysqlshutdown.rc:
  Delete: VC++Files/mysqlshutdown/mysqlshutdown.rc
BitKeeper/deleted/.del-mysqlwatch.c:
  Delete: VC++Files/mysqlwatch/mysqlwatch.c
BitKeeper/deleted/.del-thr_test.c:
  Delete: VC++Files/thr_test/thr_test.c
BitKeeper/deleted/.del-make_win_src_distribution.sh:
  Delete: scripts/make_win_src_distribution.sh
BitKeeper/deleted/.del-.fgl~cac6624e1ac6ee1d:
  Auto merged
BitKeeper/deleted/.del-Build.tsb~f3be7d512e6d5b74:
  Auto merged
BitKeeper/deleted/.del-Clients and Tools.fgl~826a8e3f651af365:
  Auto merged
BitKeeper/deleted/.del-Default.cdf~1da6505528200d5e:
  Auto merged
BitKeeper/deleted/.del-Default.fdf~466762fdf65e1477:
  Auto merged
BitKeeper/deleted/.del-Default.fgl~45b9e847fa4da131:
  Auto merged
BitKeeper/deleted/.del-Default.fgl~a86ce70180b5aba4:
  Auto merged
BitKeeper/deleted/.del-Default.rge~2218627c2a901409:
  Auto merged
BitKeeper/deleted/.del-Default.shl~a02a9093c2b6b0d9:
  Auto merged
BitKeeper/deleted/.del-Default.shl~e18d3f10bef97a28:
  Auto merged
BitKeeper/deleted/.del-Development.fgl~ca1458874a3fef81:
  Auto merged
BitKeeper/deleted/.del-Grant Tables.fgl~31e527d126c42d90:
  Auto merged
BitKeeper/deleted/.del-MySQL 3.23.com.ipr~eb817edea43c6e6e:
  Auto merged
BitKeeper/deleted/.del-SETUP.BMP~77e20d86bceb4903:
  Auto merged
BitKeeper/deleted/.del-Servers.fgl~36147accb82f759:
  Auto merged
BitKeeper/deleted/.del-Setup.dbg~688e9d3ec362ec34:
  Auto merged
BitKeeper/deleted/.del-Setup.ino~85f07a856a69a722:
  Auto merged
BitKeeper/deleted/.del-Setup.ins~ab68efc133d8411e:
  Auto merged
BitKeeper/deleted/.del-Setup.obs~2f09140119879bc6:
  Auto merged
BitKeeper/deleted/.del-Setup.rul~14510a994d515f19:
  Auto merged
BitKeeper/deleted/.del-Setup.tsb~e74dbc7688d4019a:
  Auto merged
BitKeeper/deleted/.del-infolist.txt~58b203247936d266:
  Auto merged
BitKeeper/deleted/.del-infolist.txt~ee370f4771c83a97:
  Auto merged
BitKeeper/deleted/.del-value.shl~718b5b291d5ff04d:
  Auto merged
BitKeeper/deleted/.del-value.shl~98c2851db96b919e:
  Auto merged
BitKeeper/deleted/.del-Documentation.fgl~cf0ac866737a5c7d:
  Auto merged
configure.in:
  Merge with 3.23.58 (Keep old code)
sql/slave.cc:
  Merge with 3.23.58 (Keep old code)
sql/sql_parse.cc:
  Merge with 3.23.58 (Keep old code)
2003-10-06 21:21:04 +03:00
unknown
93e1bbf671 results updated 2003-10-06 20:11:39 +02:00
unknown
e86fc82cf2 bug #1434 (and related issues) 2003-10-06 20:02:27 +02:00
unknown
b1ef6fc39c Portability fix 2003-10-06 20:31:35 +03:00