Commit graph

407 commits

Author SHA1 Message Date
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
monty@narttu.mysql.fi
a2a1e97226 Portability fixes 2003-08-28 22:18:02 +03:00
pem@mysql.com
7f158dd12a Merge 4.1 into 5.0 2003-08-26 11:51:09 +02:00
monty@narttu.mysql.fi
f5a134ba56 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-08-25 17:20:51 +03:00
monty@narttu.mysql.fi
f83e876065 Update of VC++ project files (to remove link warnings)
Fix unlock error in myisamchk on windows when doing --sort-index
Use SetFilePointer instead of SetFilePointerEx
2003-08-25 14:27:32 +03:00
guilhem@mysql.com
10811aba88 * Fix for a potential bug:
when the SQL thread stops, set rli->inside_transaction to 0. This is needed if the user
later restarts replication from a completely different place where there are only autocommit
statements.
* Detect the case where the master died while flushing the binlog cache to the binlog
and stop with error. Cannot add a testcase for this in 4.0 (I tested it manually)
as the slave always runs with --skip-innodb.
2003-08-23 16:53:04 +02:00
guilhem@mysql.com
759a3c1e3c 2 minor edits, plus
fix for BUG#1113 "INSERT into non-trans table SELECT ; ROLLBACK" does not send warning"
and
fix for BUG#873 "In transaction, INSERT to non-trans table is written too early to binlog".
Now we don't always write the non-trans update immediately to the binlog;
if there is something in the binlog cache we write it to the binlog cache
(because the non-trans update could depend on a trans table which was modified
earlier in the transaction); then in case of ROLLBACK, we write the binlog
cache to the binlog, wrapped with BEGIN/ROLLBACK.
This guarantees that the slave does the same updates.
For ROLLBACK TO SAVEPOINT: when we execute a SAVEPOINT command we write it
to the binlog cache. At ROLLBACK TO SAVEPOINT, if some non-trans table was updated,
we write ROLLBACK TO SAVEPOINT to the binlog cache; when the transaction
terminates (COMMIT/ROLLBACK), the binlog cache will be flushed to the binlog
(because of the non-trans update) so we'll have SAVEPOINT and ROLLBACK TO
SAVEPOINT in the binlog.

Apart from this rare case of updates of mixed table types in transaction, the
usual way is still clear the binlog cache at ROLLBACK, or chop it at
ROLLBACK TO SAVEPOINT (meaning the SAVEPOINT command is also chopped, which
is fine).
Note that BUG#873 encompasses subbugs 1) and 2) of BUG#333 "3 binlogging bugs when doing INSERT with mixed InnoDB/MyISAM".
2003-08-22 15:39:24 +02:00
guilhem@mysql.com
f405287beb Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-08-20 23:25:58 +02:00
guilhem@mysql.com
1dd53ed073 First commit for fixing BUG#1100
"LOAD DATA INFILE is badly filtered by binlog-*-db rules".
There will probably be a second final one to merge Dmitri's changes
to rpl_log.result and mine.
2 new tests:
rpl_loaddata_rule_m : test of logging of LOAD DATA INFILE when the master has binlog-*-db rules,
rpl_loaddata_rule_s : test of logging of LOAD DATA INFILE when the slave has binlog-*-db rules and --log-slave-updates.
2003-08-20 23:24:45 +02:00
dlenev@mysql.com
bb96092202 Fix for BUG#1086. Now we don't preserve event's log_pos through
log-slave-updates since this causes unexpected values in 
Exec_master_log_pos in A->B->C replication setup, synchronization
 problems in master_pos_wait()... 
Still this brokes some functionality in sql/repl_failsafe.cc 
(but this file is not used now)
2003-08-20 03:38:31 +04:00
guilhem@mysql.com
6e32e19047 Use my_b_append instead of my_b_write on a SEQ_READ_APPEND cache, when we write
the first 4 bytes of the relay log. Indeed comments in mysys/mf_iocache.c 
say we must always use my_b_append for such a cache.
This *could* avoid a very rare assertion failure which is: 
030524 19:32:38  Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '/
users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000001' position: 4
030524 19:32:38  next log '/users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000002' is currently active
mysqld: mf_iocache.c:701: _my_b_seq_read: Assertion `pos_in_file == info->end_of_file' failed.
and which seemed to happen always when the SQL thread and/or the I/O thread
were at position 4 in a relay log.
2003-08-19 17:00:36 +02:00
guilhem@mysql.com
1a5c8be408 Fix for BUG#1096 which is:
"mysqlbinlog does not comment the original LOAD DATA INFILE if it has a "use xx""
2003-08-19 15:46:47 +02:00
monty@mashka.mysql.fi
eb6458cb18 After merge fixes + bugs from last merge 2003-08-19 16:00:12 +03:00
monty@mashka.mysql.fi
4f7512160b After merge fixes
Use server character set if --default-character-set is not used
Added convert_string() for more efficient alloc+character-set convert of strings
2003-08-19 00:08:08 +03:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
monty@mashka.mysql.fi
2fb441fdf7 Remove wrong bug fix when calling create_sort_index.
Fix possible replication bug with LOAD DATA ... IGNORE LINES #
2003-08-10 05:14:16 +03:00
monty@mashka.mysql.fi
8f08c511ee Review of changesets since last pull.
(Mostly code cleanups)
2003-08-07 20:16:37 +03:00
guilhem@mysql.com
df3b31f3c4 WL#1036 (print the db in slave error messages).
I extended the task to cleaning error messages, making them look nicer,
and making the output of SHOW SLAVE STATUS (column Last_error) be as complete
as what's printed on the .err file;
previously we would have, for a failure of a replicated LOAD DATA INFILE:
- in the .err, 2 lines:
"duplicate entry 2708 for key 1"
"failed loading SQL_LOAD-5-2-2.info"
- and in SHOW SLAVE STATUS, only:
"failed loading SQL_LOAD-5-2-2.info".
Now SHOW SLAVE STATUS will contain the concatenation of the 2 messages.
2003-07-24 22:25:36 +02:00
monty@mashka.mysql.fi
e1aa90a9bf Safety and speedup fixes:
Changed is_open() to work as before.
Added back inited argument to LOG
2003-07-14 10:12:05 +03:00
guilhem@mysql.com
fbebac9a48 Fix for BUG#791:
a safer way of initing the mutexes in MYSQL_LOG.
is_open() is now always thread-safe.
See each file for details.
2003-07-11 14:26:44 +02:00
pem@mysql.telia.com
9c3a7a6ba3 Merge 4.1 into 5.0 (first pass). 2003-07-08 17:50:23 +02:00
guilhem@mysql.com
46b0e778b8 Fix for
BUG#797 "If query ignored on slave (replicate-ignore-table) the slave still checks if
the returned error (0) is the same as the one on the master, whereas it shouldn't
test this.
Plus a new test for BUG#797.
2003-07-08 15:50:57 +02:00
vva@eagle.mysql.r18.ru
c96c87d51d fixed bug #670 2003-07-04 16:06:17 -04:00
monty@mashka.mysql.fi
ca2913a07e Merge with 3.23 tree to get latest bug fixes 2003-07-01 15:02:16 +03:00
bar@bar.mysql.r18.ru
7371150f2d New class DTCollation (SQL:2003 calls it "declared type collation")
It's a combination of collation and its derivation (precedence order)
2003-06-24 15:11:07 +05:00
monty@narttu.mysql.fi
28e96d95c5 Simple code cleanup 2003-06-23 20:05:54 +03:00
guilhem@mysql.com
9990ce576b Fixed cleanup_load_tmpdir() which deleted nothing. 2003-06-22 14:10:46 +02:00
guilhem@mysql.com
85b11035b7 Do not use 'created' for time anymore in Start_log_event, it's the same
as the already-stored timestamp. Now 'created' is used only to know if
this is a first binlog or not. And we may re-use the superfluous bytes
in 5.0 when we need room.
2003-06-16 23:38:33 +02:00
guilhem@mysql.com
cd36523784 See each file's changeset for details.
- Comments for future devs.
- Start_log_event::exec_event() : when we hit it, do a rollback.
- We don't need LOG_EVENT_FORCED_ROTATE_F.
- Stop_log_event::exec_event() : when we hit it, we needn't clean anything.
- Removed LOG_EVENT_TIME_F and LOG_EVENT_FORCED_ROTATE_F.
- We don't need Stop events in the relay log.
- Now filtering of server id is done in the I/O thread first.
2003-06-12 16:20:31 +02:00
guilhem@mysql.com
60fb005e5e Fix for bug 254 :
we now make a distinction between if the master is < 3.23.57, 3.23 && >=57, and 4.x
(before the 2 3.23 were one). This is because in 3.23.57 we have a way to distinguish between
a Start_log_event written at server startup and one written at FLUSH LOGS, so we
have a way to know if the slave must drop old temp tables or not.
Change: mi->old_format was bool, now it's enum (to handle 3 cases). However, functions
which had 'bool old_format' as an argument have their prototypes unchanged, because
the old old_format == 0 now corresponds to the enum value BINLOG_FORMAT_CURRENT which
is equal to 0, so boolean tests are left untouched. The only case were we use mi->old_format
as an enum instead of casting it implicitly to a bool, is in Start_log_event::exec_event,
where we want to distinguish between the 3 possible enum values.
2003-06-06 16:41:28 +02:00
guilhem@mysql.com
1dccfd055d In Start_log_event::print, don't print "created 1970 etc" if created == 0.
Otherwise, we'll get questions from users about this curious 1970.
2003-06-06 14:13:26 +02:00
monty@narttu.mysql.fi
7a54334443 Merge with 4.0.13 2003-06-05 17:33:38 +03:00
guilhem@mysql.com
3b974039f7 -- Waiting for Monty's approval before push --
Bug 571: play LOAD DATA INFILE the same way on the slave as it was on the master: 
if it was with IGNORE, do it with IGNORE,
if it was with REPLACE, do it with REPLACE,
and (the change) if it was with nothing, do it with nothing (not with IGNORE !!).
Bug 573: print a proper error message in case of duplicate entry in LOAD DATA INFILE
on the slave, i.e. a message where the keyname and key value appear :
'Duplicate entry '1' for key 1' and not 'Duplicate entry '%-.64s' for key %d'
2003-06-03 15:47:29 +02:00
monty@narttu.mysql.fi
17dfc88105 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-05-26 13:36:43 +03:00
monty@narttu.mysql.fi
102c477760 Added testing of LOAD DATA ... STARTING BY
Added read_only variable
2003-05-26 11:47:03 +03:00
monty@mashka.mysql.fi
cb7061ebe4 merge 2003-05-22 02:57:27 +03:00
vva@eagle.mysql.r18.ru
6b5c9851a4 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-3.23
into eagle.mysql.r18.ru:/home/vva/work/LOADDATA/mysql-3.23
2003-05-21 15:18:30 -04:00
vva@eagle.mysql.r18.ru
4ae8af4ae2 fixed "LINES STARTING" in load data replication 2003-05-21 15:16:56 -04:00
vva@eagle.mysql.r18.ru
d124cd5bd7 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/LOADDATA/mysql-4.0
2003-05-21 14:58:11 -04:00
vva@eagle.mysql.r18.ru
09348e271a fixed 'STARTING BY' in replication 2003-05-21 14:54:02 -04:00
monty@mashka.mysql.fi
6aa8929cf3 After merge fixes
Added initialization of all important global variables
2003-05-21 21:39:58 +03:00
vva@eagle.mysql.r18.ru
ec247fd6af changed processing of LOAD DATA in mysqlbinlog 2003-05-20 17:03:18 -04:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
pem@mysql.com
35c82164f6 Merged 4.1 to 5.0. 2003-04-29 12:06:04 +02:00
monty@mashka.mysql.fi
8b20a878cc Merge with 3.23:
Set innobase_flush_log_at_trx_commit to 1 by default
Fix problem with timestamp on 64 bit systems
Reserve alarms for up to 10 slave threads
2003-04-26 21:10:13 +03:00
guilhem@mysql.com
b03ec0d7db Replication: new code to not modify in-memory log positions until the COMMIT
is executed, even if the transaction spans on >=2 relay logs (bug #53).
New variable relay_log_purge =0|1
New test to verify bug #53
2003-04-24 15:29:25 +02:00
gluh@gluh.mysql.r18.ru
e6fe7d1bed Task 761:'mysqlbinlog should not die when reading
unknown event'
2003-04-23 18:00:07 +05:00
vva@eagle.mysql.r18.ru
56667e1eba Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/LOADDATA_BUG/mysql-4.0
2003-04-22 19:50:21 -04:00
vva@eagle.mysql.r18.ru
9588dc01e5 fix error message for for load data infile 2003-04-22 19:38:57 -04:00
monty@narttu.mysql.fi
1621dd9818 Fixed problem with timestamps in binary log on 64 bit machines
Backported fix from 4.1 for bug 212: SELECT query containing a NATURAL JOIN and parentheses in the WHERE clause
2003-04-23 00:13:37 +03:00
guilhem@mysql.com
c7891fe9bc fix for #254
(3.23 master, 4.0 slave. 
Slave loss temp tables everytime FLUSH LOGS on master). 
This fix is less bad than the bug, it will cause a problem only maybe
if the master dies the hard way (I say maybe because I could not
cause a problem, and I don't see how it could happen).
2003-04-09 15:16:12 +02:00
hf@deer.mysql.r18.ru
5d4e9f95f2 Merging 2003-04-08 19:43:24 +05:00
hf@deer.mysql.r18.ru
0428d08606 SCRUM
two KILL versions
code trimming with headquarter's suggestions
2003-04-08 19:18:33 +05:00
monty@narttu.mysql.fi
a7708c7904 Merge with 4.0 2003-04-03 21:19:12 +03:00
monty@narttu.mysql.fi
aa4bf1cd8d After merge fix 2003-04-03 21:19:11 +03:00
monty@narttu.mysql.fi
d56dc85205 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-04-03 19:55:37 +03:00
vva@eagle.mysql.r18.ru
f45be5e6cd added test for replication load data into temporary table with additional options 2003-04-03 12:54:08 -04:00
monty@narttu.mysql.fi
618857b6eb Merge with 3.23 to get fixes for:
mysqldump --delete-master-logs
Portability fix for hammer
Memory overrun for MyISAM
LOAD DATA LOCAL replication bug fix.
2003-04-03 12:33:13 +03:00
guilhem@mysql.com
1211b9a513 Small-and-safe fix for bug #218: "LOAD DATA INFILE IGNORE is well
logged, but read as LOAD DATA INFILE REPLACE"
This was just bad && instead of &, but nasty consequences.
This should be merged to 4.0 BUT it will not be automatic (some code
has moved from log_event.h to log_event.cc, and log_event.cc has changed);
please Merging Man, do 'bk grep REPLACE_FLAG' in 4.0/sql
to find all the new places.
2003-04-01 18:19:15 +02:00
hf@genie.(none)
0ee0589e93 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into genie.(none):/home/hf/work/mysql-5.0.kil
2003-03-31 13:42:37 +05:00
hf@genie.(none)
f8f0b70380 SCRUM
two KILL commands implementation (version 2)
2003-03-31 13:39:46 +05:00
vva@eagle.mysql.r18.ru
af61a4c7fa Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/LOADDATA_BUG/mysql-4.0
2003-03-25 19:58:40 -04:00
vva@eagle.mysql.r18.ru
e1173e70a5 fix bug with parameters of LOAD DATA INFILE in exec_event 2003-03-25 19:57:38 -04:00
guilhem@mysql.com
b90c91a710 Fix for bug #174 (charset 0 caused segfault) 2003-03-21 21:08:56 +01:00
monty@narttu.mysql.fi
9f200ede0d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into narttu.mysql.fi:/my/mysql-4.1
2003-03-20 02:06:08 +02:00
monty@narttu.mysql.fi
48a9c1239c Added support for ULONG division with DIV
Fixed non fatal memory leak in slave code.
2003-03-19 21:23:13 +02:00
bar@bar.mysql.r18.ru
8103c4c537 CONVERT class was removed 2003-03-18 17:01:32 +04:00
bar@bar.mysql.r18.ru
7549a76c7c Replication were broken because of automatic charset conversion.
As a fix, my_charset_bin is now used in master-slave packets instead
of system_charset_info.
2003-03-18 11:34:19 +04:00
monty@narttu.mysql.fi
5dd970c335 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into narttu.mysql.fi:/my/mysql-4.1
2003-03-17 15:06:06 +02:00
bar@bar.mysql.r18.ru
caf31a0790 Preparing to client<->server autoconvert 2003-03-17 13:14:04 +04:00
monty@narttu.mysql.fi
a434bca704 Merge with 4.0 2003-03-16 19:17:54 +02:00
monty@mashka.mysql.fi
9257a27c82 Fixed character set bug when replicating user variables 2003-03-05 16:10:40 +02:00
monty@narttu.mysql.fi
143c85057e Fix for reading variables from binary log. 2003-03-04 15:17:29 +02:00
bar@bar.mysql.r18.ru
4ffd74e5de Coercibility is now stored in user vars 2003-03-03 13:16:39 +04:00
guilhem@mysql.com
10735252ee When the SQL thread cannot read an event from the relay log
("Event too big" etc), stop this thread instead of going on
with the next event, which would certainly lead to slave's data
corruption.
2003-03-02 00:34:44 +01:00
monty@narttu.mysql.fi
e8aa21c8d3 LOAD DATA INFILE is not replicated if replicate_*_table is set
LOAD DATA LOCAL INFILE was not replicated correctly
2003-02-28 22:24:00 +02:00
monty@narttu.mysql.fi
050543bdfc Merge with 3.23 -> 4.0 2003-02-28 13:29:48 +02:00
monty@narttu.mysql.fi
a0d2a621ed Added detection if pthread_attr_getstacksize() exists
Fixed bug in RAND() usage in mysqlbinlog
2003-02-27 17:35:51 +02:00
gluh@gluh.mysql.r18.ru
ae911ef858 Bug fix: for SHOW STATUS (when ssl is used)
Added ROW_RESULT to switchs(for documentation purposes)
2003-02-17 18:06:51 +04:00
gluh@gluh.mysql.r18.ru
063668c08d Merge gluh@192.168.21.1:/usr/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.uvar
2003-02-17 15:07:01 +04:00
monty@mashka.mysql.fi
acf8993439 Fixed problem when connecting to user without a password.
Fixed problem with LIKE and BINARY
2003-02-14 11:47:41 +02:00
monty@mashka.mysql.fi
48558055ed Move tmp_table_used to THD
Optimize depending sub querys
Remove valgrind warnings
2003-02-10 17:59:16 +02:00
bell@sanja.is.com.ua
291f8a225a Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-select-4.1
2003-02-02 17:39:27 +02:00
gluh@gluh.mysql.r18.ru
7cfbabd807 Changed ROW_RESULT to default 2003-01-31 14:07:07 +04:00
bar@bar.mysql.r18.ru
37fdb93d7c Gluh asked me to do it 2003-01-31 11:41:39 +04:00
gluh@gluh.mysql.r18.ru
c7485119ab Fix for mysqlbinlog compilation 2003-01-31 10:28:13 +04:00
gluh@gluh.mysql.r18.ru
8d3c43880d conflicts resolving 2003-01-31 09:43:53 +04:00
bell@sanja.is.com.ua
e294751c41 fixed bug in determinating uncacheable queries
new fatal_error interface to assign is_fatal_error and ne.report_error
commant about Item_row
2003-01-30 22:15:44 +02:00
gluh@gluh.mysql.r18.ru
57a805de6c 'Replicate user variables' task 2003-01-30 21:39:54 +04:00
bar@bar.mysql.r18.ru
735399a850 Move latin1 into a separarte file 2003-01-29 17:31:20 +04:00
monty@mashka.mysql.fi
7436e9ec97 Merge 2003-01-21 21:28:51 +02:00
monty@mashka.mysql.fi
25c393a12e Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster.
2003-01-21 21:07:59 +02:00
hf@deer.mysql.r18.ru
389680e04e Conflicts resolving 2003-01-20 18:59:45 +04:00
monty@mashka.mysql.fi
12ab0651c6 merge with 4.0 to get bug fix for SHOW PROCESSLIST + connected slave 2003-01-19 02:28:07 +02:00
monty@mashka.mysql.fi
183df2da7f Fixes cases where thd->query was not protected.
This fixes a problem with SHOW PROCESSLIST
2003-01-19 02:00:26 +02:00
monty@mashka.mysql.fi
76f146a175 Merge with 4.0.9 2003-01-18 03:13:37 +02:00
vva@eagle.mysql.r18.ru
05aa563043 Merge vvagin@work.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BINLOG_LOADDATA/4.1.clear
2003-01-17 22:04:43 +04:00
vva@eagle.mysql.r18.ru
1b25ee3579 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/4.1
into eagle.mysql.r18.ru:/home/vva/work/BINLOG_LOADDATA/4.1.clear
2003-01-17 21:59:03 +04:00
vva@eagle.mysql.r18.ru
4b5a313c1a new option --local-load in mysqlbinlog 2003-01-17 21:52:56 +04:00
gluh@gluh.mysql.r18.ru
f2a193521e Merge sgluhov@work.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.upd
2003-01-17 16:40:54 +04:00
gluh@gluh.mysql.r18.ru
6ac602142a Replication: Optimize away string.append
Fixed problem with replication LOAD DATA INFILE when using  --old-rpl-compat
Fixed rpl_temporary test
2003-01-17 16:39:29 +04:00
hf@deer.mysql.r18.ru
96089e2b3a resolving conflicts 2003-01-15 13:15:35 +04:00
hf@deer.mysql.r18.ru
c59bff7c96 SCRUM
embedded library trimming
2003-01-15 12:11:44 +04:00
monty@mashka.mysql.fi
1bc3105da3 Fixed core dump bug in str LIKE "%other_str%" where strings contained characters >= 128.
Fixed problem with replication LOAD DATA INFILE when using  --old-rpl-compat.
When executing on master LOAD DATA and InnoDB failed with 'table full' error the binary log was corrupted.
2003-01-10 01:55:05 +02:00
monty@mashka.mysql.fi
f8e660d88c merge with 4.0.9
To get bug fixes for TCP/IP connections, FORCE INDEX and OPTIMIZE TABLE with NULL keys
2003-01-09 03:55:26 +02:00
monty@mashka.mysql.fi
89ef355b9e Fix for bug in LOAD DATA INFILE and replication
Fix for SHOW VARIABLES in embedded server
2003-01-08 11:24:39 +02:00
monty@mashka.mysql.fi
f9772317ee merge 2003-01-04 15:40:55 +02:00
monty@mashka.mysql.fi
07daf3169e Merge with 4.0.8 2003-01-03 00:04:33 +02:00
vva@eagle.mysql.r18.ru
6ab60981e8 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/4.1
into eagle.mysql.r18.ru:/home/vva/work/BINLOG_TEMPORARY/4.1
2002-12-30 01:59:08 +04:00
vva@eagle.mysql.r18.ru
1dcca480e8 processing thread specific queries 2002-12-30 01:46:48 +04:00
hf@deer.mysql.r18.ru
8a205e4ba3 Merge 2002-12-19 14:57:24 +04:00
bar@bar.mysql.r18.ru
1bba969b1e removed several cases of default_charset_info use
a bit more ucs2 compatibility
2002-12-19 09:38:29 +04:00
hf@deer.mysql.r18.ru
c1e69d2cca Merging 2002-12-16 18:58:55 +04:00
hf@deer.mysql.r18.ru
e3b3b68307 Big purge about embedded library (scrum) 2002-12-16 17:33:29 +04:00
monty@mashka.mysql.fi
5022e56cba Ensure that BEGIN / COMMIT is handled properly if slave dies
Added syntax support for
CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1;
2002-12-11 15:46:39 +02:00
monty@mashka.mysql.fi
d3eb993a27 rename of net_pkg.cc to protocol.cc
Class for sending data from server to client (Protocol)
This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.
2002-12-11 09:17:51 +02:00
monty@mashka.mysql.fi
35ff08c2af After merge fixes
Added THD to add_to_xxx_list() functions for faster parsing.
2002-12-06 21:11:27 +02:00
monty@mashka.mysql.fi
806294c573 Fixes after merge with 4.0 2002-11-21 22:25:53 +02:00
monty@mashka.mysql.fi
dac6498f9b Merge with 4.0 2002-11-21 15:56:48 +02:00
monty@mashka.mysql.fi
7a70332836 Portability fix when using -DBIG_TABLES 2002-11-14 12:21:36 +02:00
monty@butch.
890b39bb68 merge 2002-11-07 12:49:01 +02:00
monty@hundin.mysql.fi
65badfff1a Put temporary files in binlog cache when using BEGIN/COMMIT
Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
New variables @@rand_seed1 and @@rand_seed2 (used by replication)
DROP TEMPORARY TABLE
2002-11-07 04:02:37 +02:00
monty@butch.
a2bdf9265f Portability fixes for Fortre C++ 5.0 (on Sun) in 32 and 64 bit modes. 2002-11-07 03:54:00 +02:00
bell@sanja.is.com.ua
c94b39134f Fixed error handling bug 2002-11-04 00:56:25 +02:00
nick@mysql.com
6d88799e95 Reordered functions--grouped by class now.
Added comment blocks.
2002-10-29 23:50:07 -07:00
nick@mysql.com
b9007ca6a1 Added missing case for Rand_log_event to Log_event::get_type_str() 2002-10-24 20:20:37 -06:00
nick@mysql.com
6c22ca4454 Added Rand_log_event 2002-10-24 16:48:34 -06:00
nick@mysql.com
d749b832b2 Added Rand_log_event 2002-10-22 15:17:17 -06:00
monty@mashka.mysql.fi
62a26cf891 Update after last merge. Fixes some wrong test results. 2002-10-03 16:54:26 +03:00
monty@mashka.mysql.fi
0f39457613 Merge with 4.0.4 2002-10-02 17:55:12 +03:00
monty@mashka.mysql.fi
d69250a969 Fixes and code cleanups after merge with 4.0.3
Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()

Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
2002-10-02 13:33:08 +03:00
nick@mysql.com
96e9cd3ae1 fix (work-around) rpl_log test on FreeBSD. 2002-09-25 18:04:08 -06:00
monty@mashka.mysql.fi
cb8580a2cd Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name.
This should fix some issues where --lower-case-table-names doesn't work properly under windows.
2002-09-20 14:05:18 +03:00
monty@mashka.mysql.fi
ce4b584a85 Increased max possible max_allowed_packet to 1G
Small optimization to not do external locking of temporary MyISAM tables.
2002-09-19 17:49:41 +03:00
monty@mashka.mysql.fi
f3a186c905 Portability fixes.
Improve mysql-test to be more robust.
Fix that GRANT doesn't delete SSL options
Change innobase_flush_log_at_trx_commit to uint.
Don't rotate logs if we read a rotate log entry from the master.
2002-09-11 06:40:08 +03:00
monty@narttu.mysql.fi
7134ffec21 Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
2002-08-30 12:40:40 +03:00
monty@hundin.mysql.fi
03b0179af9 Use our version of RWLOCKS on UNIXWARE 7
More DBUG info for replication
Better error messages from replication
Fixed bug in replication code when connecting to 'localhost' (time was not released properly)
Block ALARM signal on Linux for signal handler thread (Fixes problem with running mysqld with --debug)
Removed warning when setting an AUTO_INCREMENT field to NULL
2002-08-21 22:04:22 +03:00
monty@mashka.mysql.fi
2c4fa340cc Lots of code fixes to the replication code (especially the binary logging and index log file handling)
Fixed bugs in my last changeset that made MySQL hard to compile.
Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables.
Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions
Extended my_chsize() to allow one to specify a filler character.
Extend vio_blocking to return the old state (This made some usage of this function much simpler)
Added testing for some functions that they caller have got the required mutexes before calling the function.
Use setrlimit() to ensure that we can write core file if one specifies --core-file.
Added --slave-compressed-protocol
Made 2 the minimum length for ft_min_word_len
Added variables foreign_key_checks & unique_checks.
Less logging from replication code (if not started with --log-warnings)
Changed that SHOW INNODB STATUS requre the SUPER privilege
More DBUG statements and a lot of new code comments
2002-08-08 03:12:02 +03:00
monty@mashka.mysql.fi
dddc20d9d1 New SET syntax & system variables.
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups
2002-07-23 18:31:22 +03:00
monty@hundin.mysql.fi
0573b66df3 Added support for rw_tryrdlock() and rw_trywrlock() 2002-06-29 20:26:33 +03:00
monty@mashka.mysql.fi
2aecdd1a91 Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked)
This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
2002-06-11 11:20:31 +03:00
monty@bitch.mysql.fi
9b6df03c14 Added a lot of DBUG_xxx statements to be able to find replication bug.
Fixed critical bug on 64 bit systems.
Cleanups
2002-06-08 21:02:01 +03:00
monty@hundin.mysql.fi
e4130b11c9 removed init_count from IO_CACHE.
Added missing mutex_unlock to slave replication code.
2002-06-05 23:04:38 +03:00
bar@gw.udmsearch.izhnet.ru
196aa19cf6 Now string values are created and filled with charset field
SELECT func(charset2) FROM t ORDER BY 1 works in correct charset
2002-05-17 16:29:52 +05:00
sasha@mysql.sashanet.com
babb78c869 replication fix 2002-03-30 13:42:01 -07:00
sasha@mysql.sashanet.com
2e6b48afd3 replication updates and bugfixes. Still not perfect - there is some strange
memory corruption I can only repeat on one system.
2002-03-15 18:44:44 -07:00
sasha@mysql.sashanet.com
6980a24e9d fixes for slave backward compat
fixed bug in LOAD DATA FROM MASTER
fixed rpl000001.result
Slave now replicates 3.23 master, with the exception of LOAD DATA INFILE, 
which is still buggy. Will push this one after the pull/merge
2002-02-07 15:29:46 -07:00
monty@hundin.mysql.fi
be46289855 New error messages
Test of unsigned BIGINT values
Fixes for queries-per-hour
Cleanup of replication code (comments and portability fixes)
Make most of the binary log code 4G clean
Changed syntax for GRANT ... QUERIES PER HOUR
2002-01-29 18:32:16 +02:00
sasha@mysql.sashanet.com
171948ba86 more predicatable slave behaviour with wait_for_slave_stop in mysqltest
fixed a couple of bugs with SEQ_READ_APPEND cache
rpl000016 still has non-deterministic result, but I am going to commit and
push since what I have is now better than what is in the main repository
2002-01-24 22:49:47 -07:00
sasha@mysql.sashanet.com
8e43ad12c3 post-merge fixes, including slave-skip-errors backport
fixed too quick timeout in mysql-test-run which caused a race with the
 new server getting started before the old one completely finished 
 shutdown. This should fix the pid warning we've been getting as well as
 inconsistent results when running tests with the manager
2002-01-22 15:05:11 -07:00
sasha@mysql.sashanet.com
56129ce634 Here comes a nasty patch, although I am not ready to push it yet. I will
first pull, merge,test, and get it to work.

The main change is the new replication code - now we have two slave threads
SQL thread and I/O thread. I have also re-written a lot of the code to 
prepare for multi-master implementation. 

I also documented IO_CACHE quite extensively and to some extend, THD class.
2002-01-19 19:16:52 -07:00
sasha@mysql.sashanet.com
586e812452 use env vars for socket/port in connect in mysqltest
--local-master option in mysql-test-run
do not log CREATE TABLE when doing table dump
fix replication to slave off 3.23 master
2001-11-17 17:23:46 -07:00
sasha@mysql.sashanet.com
beaf95b09d work to enable reading 3.23 logs - not yet finished
moved fail-safe replication routines from sql_repl.cc to repl_failsafe.cc
write start event only in the first log
2001-11-10 22:24:12 -07:00
monty@hundin.mysql.fi
3afb157ca2 Fixes up things after merge from 3.23.44
Portability fixes.
Don't delete temporary tables on FLUSH tables.
2001-11-05 01:04:08 +02:00
monty@hundin.mysql.fi
daa4229a3d Portability fixes. 2001-11-02 07:42:28 +02:00
sasha@mysql.sashanet.com
a71f818aa2 Merge 2001-10-04 15:46:04 -06:00
sasha@mysql.sashanet.com
20ece90471 fixed slave to clean up load data infile temp files
instrumented the server with DBUG_SYNC_POINT() macro
2001-10-03 13:55:31 -06:00
monty@hundin.mysql.fi
55a6911bb1 Portability fixes. 2001-10-03 17:02:14 +03:00
sasha@mysql.sashanet.com
6b37cce2ae mysqltest can now talk to manager and start/stop servers with
server_start/server_stop
changed rpl000018 to use the new server restart feature instead of a
hack
2001-10-01 16:13:55 -06:00
monty@hundin.mysql.fi
5a14bb2a7e Integrated table->ref_primary_key into table->part_of_key
Fixed bug in UNION
2001-09-21 03:38:35 +03:00
monty@hundin.mysql.fi
0d72e5440f Portability fixes 2001-09-15 16:22:34 +03:00
monty@hundin.mysql.fi
77ee990bca Cleanups 2001-09-15 05:03:16 +03:00
monty@work.mysql.com
18474d8419 Merge with 3.23.42 2001-09-13 09:52:35 +02:00
monty@work.mysql.com
9ad2cd8c45 Portability fixes 2001-09-06 01:23:01 +02:00
monty@work.mysql.com
81006dd227 Merge work.mysql.com:/home/bk/mysql
into work.mysql.com:/home/bk/mysql-4.0
2001-09-04 01:04:32 +02:00
monty@hundin.mysql.fi
0b2af6bdfd Ensure that libmysqlclient doesn't use raid
Fix problem with MyISAM and rows of length 65517-65520
2001-09-04 01:25:34 +03:00
monty@work.mysql.com
447c18954e merge with 3.23.42 2001-09-02 18:38:33 +02:00
monty@hundin.mysql.fi
91db5836e0 Portability fixes 2001-08-30 21:16:39 +03:00
monty@hundin.mysql.fi
733f865f54 Fixes for OS2.
Fix bug in isamlog
Add argument types to function declarations.
2001-08-22 01:45:07 +03:00
sasha@mysql.sashanet.com
845fc9e0c6 fixes in mysqltest and mysqlbinlog
trying to understand why --bootstrap option does not create tables
on disk, hope the problem will be fixed when I pull, if not will
debug, but need to commit in order to pull
2001-08-20 11:20:47 -06:00
sasha@mysql.sashanet.com
10cac63f82 make LOAD DATA INFILE replication work with multi-character
delimiters/starters/terminators

started work on server management daemon
2001-08-18 20:22:20 -06:00
monty@hundin.mysql.fi
59e7c97dab Remove warnings and portability fixes
New global read lock code
Fixed bug in DATETIME with WHERE optimization
Made UNION code more general.
2001-08-14 20:33:49 +03:00
sasha@mysql.sashanet.com
f6836bf81a merged 2001-08-09 19:16:15 -06:00
sasha@mysql.sashanet.com
681cdbbdf9 mysqlbinlog->client 2001-08-09 18:16:43 -06:00
sasha@mysql.sashanet.com
8029045bb7 new file_id generation method 2001-08-04 05:48:58 -06:00
sasha@mysql.sashanet.com
09eda84f2e LOAD DATA INFILE is now replicated properly, except for cleanup on
Stop event and bugs the test suite could not catch
Did some big restructuring of binlog event classes - most important
change is that now each event class has exec_event method and one does
not need to modify slave core code to add a new event. Slave code is
now much smaller and easier to read
2001-08-03 15:57:53 -06:00
sasha@mysql.sashanet.com
0dd620ceaf clean-up, more work on LOAD DATA INFILE 2001-07-23 14:35:25 -06:00
sasha@mysql.sashanet.com
008456c9b6 added pre/post read callbacks to IO_CACHE
#ifdefed out code not used in the server from log events
started on new LOAD DATA INFILE events
2001-07-20 16:22:54 -06:00
sasha@mysql.sashanet.com
51e3c5de88 --do-test option in mysql-test-run - will do only tests that match the pattern
updated rotate event to set new position along with the new log
2001-06-26 17:02:33 -06:00
sasha@mysql.sashanet.com
a91ac47cde show master forced rotate info in SHOW BINLOG EVENTS
mark a master-forced rotate with a special flag
2001-06-23 19:37:24 -06:00
sasha@mysql.sashanet.com
924dadef97 merged new 3.23 errors
fixed bugs in log seq - now starting to look good
fixes for SHOW BINLOG EVENTS
will push this one
2001-06-22 08:35:18 -06:00
sasha@mysql.sashanet.com
992f889878 added SHOW BINLOG EVENTS
fixed log sequence bugs
fixed bugs in handling Slave event
added test case with SHOW BINLOG EVENTS
have not fixed all the bugs - found some that are also in 3.23,
will fix them there first, then do pull and cleanup

will not push this changeset
2001-06-21 13:19:24 -06:00
sasha@mysql.sashanet.com
46de2a9fe4 Added event sequence number and flags to binlog
Documented/cleaned up log event code
Updated tests
2001-06-19 15:03:48 -06:00
sasha@mysql.sashanet.com
7ce33f90fb Added slave log event to record the master position in of slave thread
in slave binlog - needed for synchronization slave during recovery
2001-06-14 14:12:40 -06:00
monty@donna.mysql.fi
6371f9849d Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql 2001-04-29 16:07:58 +03:00
monty@donna.mysql.fi
e30fd503ec Cleanup 2001-04-29 16:07:40 +03:00
sasha@mysql.sashanet.com
bdb8077a55 fixed bug in mysqlbinlog 2001-04-25 15:20:59 -06:00
sasha@mysql.sashanet.com
be8f18e020 fixed redundant repetition of use db in mysqlbinlog
added support for virtual master ( replicating from a directory with binlogs)
test case for backup/restore with virtual master
2001-04-24 17:39:26 -06:00
sasha@mysql.sashanet.com
b7170cf9cc replication fixes 2001-02-19 23:08:24 -07:00
monty@donna.mysql.com
450d98e341 Changed --replace to --replace_result in mysqltest
Changed errmsg -> my_errmsg (portability issue)
Fixed that mysqlbinlog writes SET TIMESTAMP before all queries
Fixed comments in default my.cnf files
2001-02-15 03:43:14 +02:00
tim@cane.mysql.fi
f0505c0902 Don't use subtransactions on write_row() and delete_row() in
ha_berkeley.
A few smaller bug fixes.
2000-12-28 19:26:32 +02:00
sasha@mysql.sashanet.com
6b7098cb20 fixed bug in load data infile replication
updated test suite to always test if slave obeys stop/start commands
2000-12-08 07:11:22 -07:00
sasha@mysql.sashanet.com
46400961f7 mysql-test/mysql-test-run
cleanup - remove unneeded daeamon restarts
sql/log_event.cc
    fixed bug - do not confuse confused slaves even further if they try to 
    read less than LOG_EVENT_HEADER_LEN before the end of file
sql/mysqlbinlog.cc
    give error if constructor fails
sql/mysqld.cc
    --disconnect-slave-event-count for replication debugging
sql/slave.cc
    --disconnect-slave-event-count
    cleanup to remove unneeded sleeps when things go wrong - sleep only 
    when we have to
sql/slave.h
    --disconnect-slave-event-count

test cases for ALTER TABLE ORDER BY and replication offset off by 22 
confusion mystery bug (both pass)
2000-11-22 00:23:31 -07:00
sasha@mysql.sashanet.com
d528126359 fixed bugs in IO_CACHE and Load_event constructor. The code now passes
replication test suite
2000-11-16 22:59:50 -07:00
monty@narttu.mysql.fi
22415489f2 Fixes for bugs in the usage of IO_CACHE 2000-11-17 02:36:46 +02:00
sasha@mysql.sashanet.com
0decc269d4 BUILD/compile-pentium-debug
make -j 2
mysys/my_open.c
    my_umask is better than 0 - we do not want 0000 files when my_open() is called with O_CREAT
sql/log.cc
    fixed up IO_CACHE to make replication work, not fully yet
sql/log_event.cc
    fixed up IO_CACHE
2000-11-16 10:37:30 -07:00
monty@narttu.mysql.fi
b689a1a752 merge 2000-11-16 00:24:11 +02:00
monty@narttu.mysql.fi
e69becf133 changed to use IO_CACHE instead of FILE 2000-11-15 23:00:06 +02:00
sasha@laptop.slkc.uswest.net
dd3c64a4ef laptop commit - bk wants me commit again! 2000-11-11 15:04:00 -07:00
monty@donna.mysql.com
7ac13c89e6 Fix of LEFT JOIN optimizer bug, problem with key cache on Windows and
a lot of portability issues.
2000-10-14 03:16:35 +03:00
monty@tik.mysql.com
09dce662e2 Automatic repair of MyISAM tables + portability fixes 2000-10-11 00:06:37 +03:00
sasha@mysql.sashanet.com
f452ab6f90 sql/log.cc
Added magic number to binlog
sql/log_event.cc
    distinquish bogus data from truncated logs
sql/log_event.h
    added magic number
    added LOG_READ_TRUNC error
sql/mysqlbinlog.cc
    fixed to handle magic number
    added O_BINARY to my_fopen
sql/mysqld.cc
    added code for replicate-rewrite-db
sql/slave.cc
    replicate-rewrite-db
    O_BINARY
    handle magic
sql/sql_class.h
    added i_string_pair class
sql/sql_repl.cc
    added magic
    better error messages
support-files/magic
    added magic for binlog

Added test case for replication of queries with error
2000-10-05 17:58:16 -06:00
sasha@mysql.sashanet.com
204ae84732 fixed mutex bug ( or lack of it) when reading log entries on COM_BINLOG_DUMP
added error_code to query event, and checking to see if we get the
expected error on the slave
removed obsolete code from slave.cc
2000-10-03 19:53:13 -06:00
sasha@mysql.sashanet.com
62a6a0fdf1 bug fixes in server-id, moved replication functionality to
sql_repl.* will push this one, since the replication code now works
2000-09-29 17:20:26 -06:00
sasha@mysql.sashanet.com
ea0f48ffb2 This one will not be pushed, I am committing to be able to pull in Monty's changes
added server id, mostly working
added --skip-slave-start, working
added --replicate-rewrite-db - just in the cmd line parses, currently noop
2000-09-28 16:24:50 -06:00
sasha@mysql.sashanet.com
7da3818fdd Replication fixes 2000-08-23 13:27:33 -06:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00