Commit graph

547 commits

Author SHA1 Message Date
konstantin@mysql.com
2d4c54ba1b Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-09-23 00:46:59 +04:00
bell@sanja.is.com.ua
c1b185f5ff WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
2005-09-20 21:20:38 +03:00
kent@mysql.com
19bae53ddc log.cc:
Cast my_munmap() argument to be able to compile on Solaris
2005-09-16 12:02:19 +02:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
ndbdev@dl145b.mysql.com
46cc62e216 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-09-09 15:26:47 +02:00
sergefp@mysql.com
e5b4252481 Fix for BUG#12637: Make SPs+user variables replication work:
* Allocate thd->user_var_events elements on appropriate mem_root
* If several SP statements are binlogged as a single statement, collect all user var
  accesses they make (grep for StoredRoutinesBinlogging for details)
2005-09-07 19:39:47 +04:00
brian@zim.(none)
57403ddc9d Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1

Resolved to minor issues.
2005-08-30 14:40:02 -07:00
sergefp@mysql.com
ad9bfc251c Slightly amended Monty's SP replication code cleanup patch 2005-08-27 02:33:06 +04:00
sergefp@mysql.com
95c3afc5d9 Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
2005-08-25 17:34:34 +04:00
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
69acde961f Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-05 18:01:34 -04:00
monty@mishka.local
8437e9c1be Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
2005-07-31 12:49:55 +03:00
monty@mysql.com
b3cbd0048f Cleanups during review of new code
Ensure mysql_close() is called if mysql_set_character_set() fails
2005-07-28 16:10:14 +03:00
tulin@dl145b.mysql.com
a6c21a0791 merge 2005-07-19 21:56:10 +02:00
monty@mishka.local
2278e0319c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0
2005-07-18 19:03:01 +03:00
monty@mishka.local
78c65b5adc Cleanups during review
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (
2005-07-18 15:33:18 +03:00
tomas@poseidon.ndb.mysql.com
1affa6182a Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
2005-07-13 13:11:51 +02:00
lars@mysql.com
6db2602ad0 Merge mysql.com:/home/bkroot/mysql-4.1
into  mysql.com:/home/bk/mysql-5.0
2005-07-13 02:13:04 +02:00
lars@mysql.com
dc55af92ff BUG#6987: Added note when stat is failing on relay log, added mutex for log rotatation. 2005-07-12 06:01:26 +02:00
ndbdev@dl145b.mysql.com
723173c0f3 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-07 12:50:45 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
0d4c57f262 Moved tc_log_page_waits outside HAVE_MMAP,
because it's used also outside.
2005-06-07 11:45:28 +03:00
tomas@poseidon.ndb.mysql.com
5088b28d09 Merge 2005-05-31 14:37:47 +02:00
msvensson@neptunus.(none)
90f971ae2c Include fix to function open_binlog from 4.1
- Add O_SHARE when opening file.
2005-05-26 21:01:54 +02:00
lars@mysql.com
e76c641190 Merge mysql.com:/home/bk/mysql-5.0 into mysql.com:/home/bk/mysql-5.1 2005-05-09 11:45:59 +02:00
monty@mishka.local
a9f6aab4c9 Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema
2005-05-06 11:39:30 +03:00
tomas@poseidon.ndb.mysql.com
033988f014 Merge 2005-04-25 22:21:25 +02:00
gbichot@quadita2.mysql.com
b75789e3d8 Fixes for BUG#10039 "MEMORY engine is reported as HEAP",
BUG#9738 "SHOW VARIABLES still displays the deprecated 'log_update' in 5.0",
BUG#9542 "MySQL dies with signal 11 when it is using non-existent location of binary logs"
2005-04-23 00:05:05 +02:00
lars@mysql.com
1bd55e471e Merging 5.0->5.1 2005-04-19 11:09:54 +02:00
serg@serg.mylan
810b2c3d40 remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog
2005-04-05 13:17:49 +02:00
patg@patrick.local
8e0eb65f9a 5.0 to 5.1 merge 2005-04-01 12:32:17 -08:00
gbichot@production.mysql.com
56495a3691 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into production.mysql.com:/nfstmp1/guilhem/mysql-5.0-prod
2005-03-22 00:28:33 +01:00
gbichot@production.mysql.com
c766efdc5d Last part of WL#1062: better replication of timezones: no more use
of SET ONE_SHOT; storing tz info directly in event (if this info is needed),
it's now allowed to have different global tz on master and slave.
2005-03-22 00:26:12 +01:00
lars@mysql.com
efb077502d Merge 2005-03-21 23:05:55 +01:00
lars@mysql.com
c6d85289ab WL#2472:
Renamed Table_filter to Rpl_filter
Eliminated very annoying memory leak
2005-03-21 22:09:42 +01:00
jimw@mysql.com
ee2b4ec959 Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
2005-03-18 16:12:25 -08:00
serg@serg.mylan
3613f8c262 sql/log.cc
don't set LOG_EVENT_BINLOG_IN_USE_F for relay logs
sql/sql_repl.cc
    clear LOG_EVENT_BINLOG_IN_USE_F flag before sending an event to a slave
2005-03-14 17:53:24 +01:00
serg@serg.mylan
a6b3b8fa98 print more information 2005-03-14 09:27:34 +01:00
serg@serg.mylan
8986ffebde print xa recovery progress
add names to handlertons
trans_need_2pc() macro
2005-03-13 21:58:09 +01:00
lars@mysql.com
7ed7fc7f58 WL#2472: Addendum: Fixes after Mats review 2005-03-10 14:36:48 +01:00
serg@serg.mylan
c49928447d Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-03-09 13:02:51 +01:00
serg@serg.mylan
1e09c15a8b don't close binlog in the destructor - use explictit MYSQL_LOG::cleanup for this 2005-03-09 12:29:51 +01:00
lars@mysql.com
26787260b7 WL#2472: Refactoring of replication and binlog filtering.
Needed to be able to have multiple masters connected 
to same slave server with different filters.
2005-03-08 21:12:35 +01:00
gluh@gluh.mysql.r18.ru
66bd0447e4 Fix for bug#8740: Server crash at start on Solaris 9 (64 bit) 2005-03-03 17:38:58 +03:00
serg@serg.mylan
02d88c398f bug#8151 - truncate leaves a transaction open
deadlock in MYSQL_LOG::new_file()
style fixes
2005-03-02 10:38:25 +01:00
monty@mysql.com
7e5f74f8f2 Merge with global tree 2005-02-25 17:12:06 +02:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
mats@mysql.com
bfce3aee8d Bug#8412: merged from 4.1 2005-02-23 23:01:51 +01:00
mats@mysql.com
30ade5b57e Bug#8412: Setting error code to 0 on statements that cannot fail. 2005-02-23 20:59:00 +01:00
mats@mysql.com
6ad51ffb3c Bug#8412: Merge from 4.0 2005-02-23 19:58:54 +01:00
serg@serg.mylan
9c9d1fd406 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-02-23 19:20:17 +01:00
serg@serg.mylan
383c6e312a don't log BEGIN in auto-commit mode
correct end_log_pos for Xid_log_event
2005-02-23 18:26:49 +01:00
serg@serg.mylan
da13ab086d write "COMMIT" into binlog if there's no Xid at the end of transaction
new tests
2005-02-23 14:55:16 +01:00
jani@ua141d10.elisa.omakaista.fi
ebce51950a Fixed Bug#Server crash due to 'flush status' in various tests. 2005-02-23 14:19:48 +02:00
serg@serg.mylan
a4dbb3b061 compatibility fixes, crashing tests 2005-02-22 15:22:37 +01:00
serg@serg.mylan
82571d6b84 MYSQL_LOG::recover was trying to allocate 0 bytes - bug#8661 2005-02-22 00:43:37 +01:00
serg@serg.mylan
178be07aa3 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-02-22 00:17:56 +01:00
serg@serg.mylan
b43029f4eb bug#8646 - deadlock if long transaction causes binlog rotate 2005-02-22 00:15:31 +01:00
monty@mysql.com
3b1f0964c1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-21 14:48:44 +02:00
monty@mysql.com
cab35adf7e Review of new pushed code (XA & other)
Portability fixes and cleanups
Fixed setting of 'res' in mysql_execute_command()
2005-02-21 14:47:57 +02:00
serg@serg.mylan
b75d8ac0f3 xa assert fixes 2005-02-21 11:51:50 +01:00
serg@serg.mylan
1bc6ae8913 portability fixes 2005-02-20 20:08:33 +01:00
serg@serg.mylan
e29191e5c5 windows compilation fixes 2005-02-19 12:15:30 +01:00
serg@serg.mylan
5ddb6354a5 after merge fixes 2005-02-16 17:34:02 +01:00
serg@serg.mylan
fd828e5b4d manually merged 2005-02-14 21:50:09 +01:00
mats@mysql.com
30bf28202c Bug#8412: For replication to work correctly, the prologue and
epilogue to an SQL statement should not have an error code even
when the SQL statement itself has an error code.
2005-02-14 18:39:33 +01:00
ingo@mysql.com
601a4fdfa2 Merge 2005-02-11 11:59:35 +01:00
lars@mysql.com
bef05eda10 BUG#6749: If there is no current database, then nothing should be binlogged if
binlog-do-db or binlog-ignore-db are in effect.   (In the future 5.1? 5.0? I think 
each statement should be verified against the filtering criteria based on the database
it *uses* and not the *current* one.  But, right now the *current* database is what 
counts according to the semantics of the manual.)
2005-02-10 21:23:48 +01:00
serg@serg.mylan
db13afd89d auto-ROLLBACK if binlog was not closed properly
auto-commit on Xid_log_event
2005-02-09 20:04:28 +01:00
guilhem@mysql.com
ed1696f6b9 WL#1062 "log charset info into all Query_log_event":
we store 7 bytes (1 + 2*3) in every Query_log_event.
In the future if users want binlog optimized for small size and less safe,
we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info
is something by design optional (even if for now we don't offer possibility to disable it):
it's not a binlog format change.
We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum
by caching the charset read from the previous event (which will often be equal to the one of the current event).
We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later).
No more errors if one changes the global value of charset vars on master or slave
(as we log charset info in all Query_log_event).
Not fixing Load_log_event as it will be rewritten soon by Dmitri.
Testing how mysqlbinlog behaves in rpl_charset.test.
mysqlbinlog needs to know where charset file is (to be able to convert a charset number found
in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass
the correct value for this option to mysqlbinlog.
Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS).
Roughly the same job is to be done for timezones :)
2005-02-03 16:22:16 +01:00
serg@serg.mylan
fb78bfebe4 open binlog index file *before* tc_log->open() and binlog itself *after* 2005-02-01 15:36:48 +01:00
serg@serg.mylan
3c5060981f query_id and my_xid -> ulonglong
fix for binlog+autocommit+tclog
comments, style fixes
2005-01-27 22:38:56 +01:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
83ef8c58a7 make the code to look safe, not only be safe 2005-01-17 22:35:53 +01:00
serg@serg.mylan
1034677f94 XA (not completely polished out yet) 2005-01-16 13:16:23 +01:00
serg@sergbook.mysql.com
a609bc45f2 merge 2005-01-07 15:02:25 +02:00
guilhem@mysql.com
60f5a69160 2 small fixes for binlog (sorry for grouping them - I won't do it again):
WL#2335 (wait if binlog or binlog index file hits disk full or quota exceeded),
fix for BUG#7236 ("--expire_logs_days does not apply if all statements
happen in transactions"), and a behaviour change: abort if mysqld can't start
binlog at startup (if running with --log-bin of course).
2005-01-06 23:53:58 +01:00
serg@sergbook.mysql.com
a04fc26c54 manually merged 2004-12-31 15:26:24 +01:00
serg@serg.mylan
9f94a42fcc BitKeeper/triggers/pre-delta
don't checkin for Administrator or mysqldev
sql/log.cc@1.157
    restored a bugfix that was lost in a merge
2004-12-22 22:59:19 +01:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
dlenev@mysql.com
62a6d9749b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
2004-12-09 13:33:12 +03:00
dlenev@brandersnatch.localdomain
4b0882e0a6 Fix for bug #6765 "Implicit access to time zone description
tables requires privileges for them if some table or column level grants
present" (with after-review fixes).

We should set SELECT_ACL for implicitly opened tables in 
my_tz_check_n_skip_implicit_tables() to be able to bypass privilege
checking in check_grant(). Also we should exclude those tables from
privilege checking in multi-update.
2004-12-09 13:31:46 +03:00
serg@serg.mylan
f41779fa79 two fixes for potential security bugs 2004-12-07 12:08:20 +01:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
mats@mysql.com
2bbdf2403d Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the
  database created when checking conditions for replication.
  CREATE/DROP/ALTER DATABASE statements are now replicated based on
  the manipulated database.
2004-12-03 12:13:51 +01:00
bell@sanja.is.com.ua
d76db8b999 marge 2004-11-13 19:45:36 +02:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
monty@mysql.com
addd1a0da8 Merge with 4.1 2004-11-12 19:58:24 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
monty@mysql.com
9252656d49 merge with 4.0 2004-11-12 11:17:53 +02:00
brian@avenger.(none)
3e4ca194f8 Mainly resolving Guilhem's 4.1 patch to 5.0 2004-11-11 19:01:46 -08:00
monty@mysql.com
c7e85ef9b9 More debugging
Print position in normal log for Binlog dump
2004-11-10 18:07:39 +02:00
guilhem@mysql.com
0c4363b6d0 Fix for BUG#6522 "Replication fails due to a rolled back transaction in the binlog"
When we are writing a transaction to the binlog, we log BEGIN/COMMIT with zero error code.
Example: all statements of trans succeeded, connection lost and so implicit rollback:
we don't want ER_NET* errors to be logged in the BEGIN/ROLLBACK events, while statement
events have 0. If there was really a serious error code, it's already in the statement events.
2004-11-10 15:07:55 +01:00
guilhem@mysql.com
1869cd9f83 Fix for BUG##5714 "Insert into MyISAM table and select ... for update]":
the fact that the transaction log is empty does not mean we're not in a transaction
(it could be BEGIN; SELECT * FOR UPDATE FROM ibtable: then we don't want to commit now, even if
the statement is a MyISAM update).
With a testcase.
2004-11-04 19:19:23 +01:00
monty@mishka.local
91ff64e107 Added options --auto-increment-increment and --auto-increment-offset.
This allows one to setup a master <-> master replication with non conflicting auto-increment series.
Cleaned up binary log code to make it easyer to add new state variables.
Added simpler 'upper level' logic for artificial events (events that should not cause cleanups on slave).
Simplified binary log handling.
Changed how auto_increment works together with to SET INSERT_ID=# to make it more predictable: Now the inserted rows in a multi-row statement are set independent of the existing rows in the table. (Before only InnoDB did this correctly)
2004-09-15 22:10:31 +03:00
serg@serg.mylan
dc6018d7fe per Monty's request - "WARNING" and "NOTE" changed to lowercase (for not to shout :) 2004-09-15 18:54:57 +02:00
rburnett@build.mysql.com
bee5f9a22d log.cc:
Changed label on INFORMATION log items to NOTE
2004-09-08 22:05:49 +02:00
serg@serg.mylan
413a8753e2 merged 2004-09-07 15:18:53 +02:00
guilhem@mysql.com
f25d3fca92 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0-opt
2004-09-06 22:47:50 +02:00
guilhem@mysql.com
99444c3311 Replacing class Disable_binlog by macros. Patch already approved by Monty. 2004-09-06 22:47:26 +02:00
serg@serg.mylan
130d2fd57f bug#5389 merge.test fails on qnx - uninitalized variable in myrg_open() 2004-09-06 22:20:40 +02:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
monty@mysql.com
32594c9989 Print value of Item_param if it has a value (when debugging) 2004-09-04 15:02:57 +03:00
monty@mysql.com
054cea4ca8 Merge with 4.0 2004-09-01 04:12:09 +03:00
rburnett@build.mysql.com
547b46b7c9 log.cc:
Fixed missing * in comment in setup_windows_event_source
2004-08-30 00:50:39 +02:00
guilhem@mysql.com
0485e5d3f0 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-08-29 14:14:32 +02:00
guilhem@mysql.com
93101561fd Fix for BUG#4500 "set character set replicates incorrectly"
We must not reset the charset in slave after each statement, otherwise the SET CHARACTER SET is cancelled immediately.
Instead, we write a SET CHARACTER SET DEFAULT to the master's binlog when needed (like we already do for SET FOREIGN_KEY_CHECKS);
such writing is not necessary in 4.1 (in 4.1 the bug does not exist, as the SET ONE_SHOT syntax is used).
I have written a test and it works, but I'm not pushing the test as it requires building with all charsets.
I have noticed differences between what is inserted in the master's table in 4.0 and 4.1, and alerted Bar.
2004-08-29 14:13:51 +02:00
monty@mysql.com
f574cd4e8f Code style fixes.
Initialize LOG_error_log before get_options to not use an uninitalized mutex in case of an error from handle_options()
2004-08-28 00:49:54 +03:00
serg@serg.mylan
08f3ba0e29 after merge 2004-08-26 18:22:22 +02:00
serg@serg.mylan
b4bb38e896 merged 2004-08-26 15:19:46 +02:00
rburnett@build.mysql.com
52a973c5ff Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into build.mysql.com:/users/rburnett/mysql-4.0
2004-08-25 06:39:19 +02:00
serg@serg.mylan
62722e7b05 merged 2004-08-20 00:52:43 +02:00
guilhem@mysql.com
0db5b4d202 (manual port from 4.0 - was needed)
Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 23:24:35 +02:00
rburnett@build.mysql.com
eb04e6da07 Bug #4466 Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
  Changed LOGLEVEL enum to loglevel
mysql_priv.h, log.cc:
  Changed LOGLEVEL to loglevel.  Removed startup_ from some of the DBUG_ENTER macros. Removed the print_msg_to_log function as it was unused.
my_getopt.c, my_getopt.h:
  Renamed LOGLEVEL to loglevel to match coding standards
2004-08-19 17:56:32 +02:00
guilhem@mysql.com
42d30b758b Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 00:29:11 +02:00
rburnett@build.mysql.com
a22cdab9e9 BUG# 4466 - Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
  Changed option_error_reporter to match new function header that includes LOGLEVEL enum
mysql_priv.h:
  Removed the MY_ERROR style bitmask.  Changed function headers to use new LOGLEVEL enum
log.cc:
  Changed print_buffer_to_log to print_buffer_to_file.  Remove the timestamp bool and now all log entries written to stderr are timestamped.  Removed some unused commented code.  changed to use the new LOGLEVEL enum.  
my_getopt.c:
  Changed functions to use the new LOGLEVEL enum and changed the included error reporter to be default_reporter.  This reporter is used in handle_options if a reporter is not given
my_getopt.h:
  changed typedefs to use better naming convention.  Moved error bitmask into the LOGLEVEL enum and included it here.
2004-08-18 22:31:01 +02:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
rburnett@build.mysql.com
67003d1c98 mysql_priv.h:
Added declarations for print_msg_to_log and vprint_msg_to_log.  sql_print_error are simple functions that wrap calls to print_msg_to_log.  Define the different error types with MY_ERROR_TYPE, MY_WARNING_TYPE, and MY_INFORMATION_TYPE
gen_lex_hash.cc:
  Added NULL error reporting parameter to handle_options
log.cc:
  Add print_msg_to_log, print_buffer_to_log, and vprint_msg_to_log.  Print_msg_to_log will write the message to the windows event log if on NT.  We now have error, warning, and information versions of sql_print_xxxx.  T his is a variation of a similar changeset WAX did.
mysqld.cc:
  Added option_error_reporter callback function and pass that into handle_options
mysql.cc:
  Added NULL as error reporter arg to the end of handle_options
Many files:
  Added NULL error reporter parameter as the last paramter to handle_options
my_getopt.c:
  Added second function pointer to server as an error reporting callback.  Added local function report_option_error that will either write the error to stderr or to the error reporting callback.  changed all calls in handle_options from fprintf(stderr, ... ) to report_option_error
my_getopt.h:
  Changed declaration of handle_options to use typedefs for the two function pointers.  added second function pointer to server as an error reporting callback
mysqld.dsp:
  Added custom build step for compiling message file and added message resource file (output of mc)
2004-08-14 03:38:37 +02:00
guilhem@mysql.com
dd023bc878 Fix for:
Bug #4810 "deadlock with KILL when the victim was in a wait state"
(I included mutex unlock into exit_cond() for future safety)
and BUG#4827 "KILL while START SLAVE may lead to replication slave crash"
2004-07-31 22:33:20 +02:00
guilhem@mysql.com
0f20e2fece Avoiding a theoretically possible crash (pthread_mutex_lock(0)) which could (at least in POSIX Threads books)
happen on SMP machines, when a thread is going to wait on a condition and it is KILLed at the
same time.
Cleaning code a bit by adding a test in enter_cond() that we have the mutex (was already the case in all places
where it's called except one which is fixed here).
2004-07-30 00:53:25 +02:00
guilhem@mysql.com
836d98874d after merge fixes (making rpl_charset and rpl_timezone pass).
Replication of charsets and timezones should shortly be changed to not need ONE_SHOT
(but 5.0 should still be able to read it, to be able to replicate 4.1 masters).
2004-07-15 23:34:41 +02:00
monty@mysql.com
31fe2837f9 Merge with 4.1 2004-07-12 08:20:24 +03:00
monty@mysql.com
db7efa2780 New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
Added key part to optimize_range() to fix problems when using fields in key parts.
2004-07-08 15:45:25 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
guilhem@mysql.com
4a82bd4732 Final part of WL#1717 "innodb/binlog consistency". This is to resolve
a limitation of yesterday's implementation:
if there was an unfinished transaction (COMMIT not typed), and some MyISAM tables were
then updated, and then mysqld crashes, then at restart the server would use the too old
binlog offset known by InnoDB to cut the binlog, thus cutting the successful MyISAM
updates. We fix this by reporting the binlog offset into InnoDB even if InnoDB was not
affected at all by the update.
But the feature is still disabled until we decide if it can go into 4.1.3.
2004-06-24 11:38:57 +02:00
guilhem@mysql.com
bccf57fbb2 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-1717
2004-06-23 23:52:49 +02:00
guilhem@mysql.com
c267b19db2 WL#1717 "binlog/innodb consistency".
Final push. Printing some warnings at startup, as --innodb-safe-binlog requires
some other options, to work as expected.
Adding 6 new tests (3 pairs). If they fail on some platforms (so far they have been run only on my Linux),
they should be ignored for the 4.1.3 build (you can just
rm mysql-test/*/rpl_crash_*).
Now going to update doc.
2004-06-23 23:51:40 +02:00
bar@mysql.com
97bdd97c8a log.cc:
rpl_charset failed on  Linux/AMD64.
2004-06-23 18:34:26 +05:00
guilhem@mysql.com
f5d6424487 Robustness feature.
Won't be pushed as is - separate email sent for internal review.
WL#1717 "binlog-innodb consistency".
Now when mysqld starts, if InnoDB does a crash recovery, we use the binlog name
and position retrieved from InnoDB (corresponding to the last transaction
successfully committed by InnoDB) to cut any rolled back transaction from
the binary log. This is triggered by the --innodb-safe-binlog option.
Provided you configure mysqld to fsync() InnoDB at every commit (using
flush_log_at_trx_commit) and to fsync() the binlog at every write
(using --sync-binlog=1), this behaviour guarantees that a master always has
consistency between binlog and InnoDB, whenever the crash happens.
6 tests to verify that it works.
2004-06-20 19:11:02 +02:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
2004-06-18 10:11:31 +04:00
guilhem@mysql.com
73411a2ed5 WL#1595 "Optionally fsync() the binlog after every statement":
New option --sync-binlog=x (and global settable variable) which will fsync the binlog
after every x-th disk write to it. That is, if in autocommit mode, after every x-th statement
written to the binlog; if using transactions, after every x-th transaction written to the binlog.
x==0 means no fsync. x==1 is the slowest.
There is no test added for this, I have just checked that it works as --sync-binlog=1 dramatically
slows down mysqld.
Made sync-frm a global settable variable.
2004-06-10 15:56:13 +02:00
guilhem@mysql.com
86e8ecc965 Implementation of WL#1824 "Add replication of character set variables in 4.1",
by binlogging some SET ONE_SHOT CHARACTER_SETetc,
which will be enough until we have it more compact and more complete in 5.0. With the present patch,
replication will work ok between 4.1.3 master and slaves, as long as:
- master and slave have the same GLOBAL.COLLATION_SERVER
- COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
- application does not use the fact that table is created with charset of the USEd db (BUG#2326).
all of which are not too hard to fulfill. 
ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
so we give error if used for non-charset vars.
Fix for BUG#3875 "mysqlbinlog produces wrong ouput  if query uses
 variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
 properly after SET NAMES".
Detecting that master and slave have different global charsets or server ids.
2004-06-03 23:17:18 +02:00
pem@mysql.com
bf45960eef Merge 4.1 -> 5.0 2004-05-07 18:52:06 +02:00
monty@mysql.com
f96c4941d8 Fixed problems noticed with last build 2004-04-09 07:12:41 +03:00
pem@mysql.com
dfd59e296e Merge 4.1 -> 5.0. 2004-04-07 19:07:44 +02:00
monty@mysql.com
42cf92ce37 Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly
2004-04-05 13:56:05 +03:00
guilhem@mysql.com
8066c2ce75 Changing SET SQL_LOG_BIN so that it explicitely throws an error if
user is not SUPER, instead of setting the value but ignoring it
silently internally.
2004-03-26 19:25:22 +01:00
monty@mashka.mysql.fi
494e43c1f5 merge with 4.0 to get security fixes and latest bug fixes 2004-02-20 17:43:02 +02:00
monty@mysql.com
14dc56b2a1 Fixed usage of strxnmov() in recent changesets 2004-02-19 22:04:31 +02:00
serg@serg.mylan
7a03cf04af potential problem fixed afer some reasoning 2004-02-19 09:11:46 +01:00
guilhem@mysql.com
1333f636ae Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/mysql_src/mysql-5.0-new-binlog-format
2003-12-19 23:05:07 +01:00
guilhem@gbichot2
df3b1a54f4 This is the final commit for Worklog tasks:
* A more dynamic binlog format which allows small changes (1064)
   * Log session variables in Query_log_event (1063)
It contains a few bugfixes (which I made when running the testsuite).
I carefully updated the results of the testsuite (i.e. I checked for every one,
if the difference between .reject and .result could be explained).
Apparently mysql-test-run --manager is broken in 4.1 and 5.0 currently,
so I could neither run the few tests which require --manager, nor check
that they pass nor modify their .result. But for builds, we don't run
with --manager.
Apart from --manager, the full testsuite passes, with Valgrind too (no errors).
I'm going to push in the next minutes. Remains: update the manual.
Note: by chance I saw that (in 4.1, in 5.0) rpl_get_lock fails when run alone;
this is normal at it makes assumptions on thread ids. I will fix this one day
in 4.1.
2003-12-19 22:40:23 +01:00
pem@mysql.com
99e0ae85c7 Merge 4.1 to 5.0. 2003-12-19 18:03:27 +01:00
guilhem@gbichot2
66a32e8925 This will be pushed only after I fix the testsuite.
This is the main commit for Worklog tasks:
 * A more dynamic binlog format which allows small changes (1064)
 * Log session variables in Query_log_event (1063)
Below 5.0 means 5.0.0.
MySQL 5.0 is able to replicate FOREIGN_KEY_CHECKS, UNIQUE_KEY_CHECKS (for speed),
SQL_AUTO_IS_NULL, SQL_MODE. Not charsets (WL#1062), not some vars (I can only think
of SQL_SELECT_LIMIT, which deserves a special treatment). Note that this
works for queries, except LOAD DATA INFILE (for this it would have to wait
for Dmitri's push of WL#874, which in turns waits for the present push, so...
the deadlock must be broken!). Note that when Dmitri pushes WL#874 in 5.0.1,
5.0.0 won't be able to replicate a LOAD DATA INFILE from 5.0.1.
Apart from that, the new binlog format is designed so that it can tolerate
a little variation in the events (so that a 5.0.0 slave could replicate a
5.0.1 master, except for LOAD DATA INFILE unfortunately); that is, when I
later add replication of charsets it should break nothing. And when I later
add a UID to every event, it should break nothing.
The main change brought by this patch is a new type of event, Format_description_log_event,
which describes some lengthes in other event types. This event is needed for
the master/slave/mysqlbinlog to understand a 5.0 log. Thanks to this event,
we can later add more bytes to the header of every event without breaking compatibility.
Inside Query_log_event, we have some additional dynamic format, as every Query_log_event
can have a different number of status variables, stored as pairs (code, value); that's
how SQL_MODE and session variables and catalog are stored. Like this, we can later
add count of affected rows, charsets... and we can have options --don't-log-count-affected-rows
if we want.
MySQL 5.0 is able to run on 4.x relay logs, 4.x binlogs.
Upgrading a 4.x master to 5.0 is ok (no need to delete binlogs),
upgrading a 4.x slave to 5.0 is ok (no need to delete relay logs);
so both can be "hot" upgrades.
Upgrading a 3.23 master to 5.0 requires as much as upgrading it to 4.0.
3.23 and 4.x can't be slaves of 5.0.
So downgrading from 5.0 to 4.x may be complicated.
Log_event::log_pos is now the position of the end of the event, which is
more useful than the position of the beginning. We take care about compatibility
with <5.0 (in which log_pos is the beginning).
I added a short test for replication of SQL_MODE and some other variables.
TODO:
- after committing this, merge the latest 5.0 into it
- fix all tests
- update the manual with upgrade notes.
2003-12-18 01:09:05 +01:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
guilhem@mysql.com
dba12258b9 Fix for BUG#2045 "Sending SIGHUP to mysqld crashes it if running with --log-bin".
The constructor of Rotate_log_event used when we are rotating our binlog or
relay log, should not assume that there is a nonzero THD available.
For example, when we are reacting to SIGHUP, the THD is 0.
In fact we don't need to use the THD in this constructor;
we can do like for Stop_log_event, and use the minimal Log_event
constructor.
If we were allowed to put Unix-specific commands in the testsuite,
I'd add a test for this (<sigh>).
2003-12-08 16:18:25 +01:00
pem@mysql.com
6e717133c5 Merge 4.1 to 5.0 2003-12-01 16:14:40 +01:00
guilhem@mysql.com
612109ffa0 Removing unneeded code: the Intvar_log_event constructor calls the Log_event constructor
which does e.server_id=thd.server_id.
2003-12-01 14:59:35 +01:00
monty@mysql.com
ede8169d24 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log
2003-11-28 12:18:13 +02:00
paul@teton.kitebird.com
7a1bb450a6 Change word order of a few PROCESSLIST messages to correspond
to order used in START SLAVE syntax.
2003-11-21 12:35:33 -06:00
pem@mysql.com
337238b78a Merging 4.1->5.0 2003-10-22 16:10:22 +02:00
monty@narttu.mysql.fi
6056cfadfc Merge with 4.0.16 2003-10-07 15:42:26 +03:00
ram@gw.mysql.r18.ru
cb334d03f4 WL #562: Change format of slow log in 4.1 2003-10-07 12:05:35 +05:00
monty@mishka.mysql.fi
989ca397b2 Optimized code for setting user variables with := and fixed some bugs in old code (Bug #1194)
Use forced close of socket to make mysqld shutdown faster when used under valgrind
2003-10-03 00:40:27 +03:00
hf@deer.(none)
6d3d37c6f8 bugfix for #1375 2003-09-29 21:07:51 +05:00
hf@deer.(none)
5f8e7fef27 Merge 2003-09-26 15:40:26 +05:00
hf@deer.(none)
ba8fa76fa2 SCRUM:
WL#604 Privileges in embedded library
code added to check privileges in embedded library
NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude
access-checking parts. Actually we now can exclude these parts from
standalone server as well. Do we need it?
Access checks are disabled in embedded server by default. One should
edit libmysqld/Makefile manually to get this working.
We definitely need the separate configure for embedded server
2003-09-26 15:33:13 +05:00
guilhem@mysql.com
b4171fe620 Fix for
Bug #1392 "On Win, slave leaves one temp file after successf. replicating LOAD DATA INFILE"
Windows-specific bug (we forgot to close a file before deleting it).
Patch written by me, tested by Miguel (thanks!) and it works.
2003-09-24 22:55:04 +02:00
pem@mysql.com
8d884c02bb Merging 4.1 -> 5.0 2003-09-24 11:29:38 +02:00
monty@mashka.mysql.fi
c674ffd5f1 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
2003-09-14 18:14:43 +03:00
dlenev@mysql.com
2c24b2e9b4 Manual merge after commiting START SLAVE UNTIL 2003-09-14 01:57:09 +04:00
dlenev@dlenev.mshome
c0cfae1c8d Implemented support for START SLAVE UNTIL (WL#868) 2003-09-14 00:13:41 +04:00
monty@mashka.mysql.fi
f300e3a164 Remove 'extern' references from .cc files 2003-09-13 11:35:29 +03:00
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
monty@narttu.mysql.fi
8a77f97079 Add detection of in_addr_t
Add pack_bits to pack_reclength for dynamic rows.  This solves buffer a possible buffer overflow on update.
(This will probably solve bug #563)
Fix test for available file descriptors in mysqltest
Fixed core dump bug in replication tests when running without transactional table support
2003-08-28 06:08:17 +03:00
pem@mysql.com
7f158dd12a Merge 4.1 into 5.0 2003-08-26 11:51:09 +02:00
guilhem@mysql.com
6c9cff9534 Clearer states in SHOW PROCESSLIST for replication threads.
For example the Binlog_dump thread (on the master) sometimes showed "Slave:".
And there were confusing messages where "binlog" was employed instead
of "relay log".
2003-08-25 14:13:58 +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
monty@narttu.mysql.fi
359846f052 Fixed some varnings from valgrind
Set min value of max_allowed_packet to 1024
Fixed problem with UNION's without braces and SQL_CALC_FOUND_ROWS, LIMIT #,#
and ORDER BY...LIMIT
2003-08-20 16:25:44 +03: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
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@narttu.mysql.fi
b1b73137de Fixed wrong test in LOG::close
Fixed test for binary build
2003-07-14 23:49:19 +03:00
monty@narttu.mysql.fi
df7c1e8165 Better fix for bug #791: At binlog rotation, INSERTs may not find their way into the binlog 2003-07-14 14:59:26 +03: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
b7e1fe5ad1 Member no_rotate in MYSQL_LOG was always 0, I delete it. 2003-07-12 15:48:26 +02:00
guilhem@mysql.com
34c8918915 removed 2 small useless if(). 2003-07-12 15:06:40 +02: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
monty@mashka.mysql.fi
d495656ac5 Cleanups 2003-07-09 00:55:07 +03: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
guilhem@mysql.com
9c73d91d54 WL#912 (more user control on relay logs):
FLUSH LOGS now rotates relay logs,
and a new variable max_relay_log_size.
Plus a very small bit of code cleaning.
2003-07-06 17:59:54 +02:00
monty@narttu.mysql.fi
1e62d6070a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into narttu.mysql.fi:/my/mysql-4.1
2003-06-14 11:38:09 +03:00
monty@narttu.mysql.fi
a1034db4b9 Cleanup after split of libmysql.c to client.c and libmysql.c. A 4.1 master/slave will now use the 4.1 protocol
Fixed wrong value for SQLSTATE_LENGTH
Added CLIENT_REMEMBER_OPTIONS to mysql_real_connect()
Changed mysql_port and mysql_unix_port to mysqld_xxxx
2003-06-14 11:37:42 +03: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
monty@narttu.mysql.fi
40109c574a Merge with 4.0.13 2003-06-04 19:21:51 +03:00
monty@narttu.mysql.fi
4ead61f873 code cleanup 2003-05-26 15:08:17 +03:00
heikki@hundin.mysql.fi
11ae9595c7 log.cc:
If FOREIGN_KEY_CHECKS=0, wrap in binlog SQL statements inside SET FOREIGN_...=0; ... ; SET FOREIGN_...=1
2003-05-25 23:37:32 +03:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
guilhem@mysql.com
7e85affd1e MySQL-classic did not pass the test suite rpl_rotate_logs.test anymore because a recent 1.1424.2.17 cset introduced an opt_using_transactions
which prevented binlogs to be rotated if transactions were not enabled. Fix for this. This bug did not affect releases.
2003-05-10 14:52:22 -04:00
monty@narttu.mysql.fi
51f9879008 Removed compiler warnings
Fixed memory leak in new filesort code
Optimzed sub selects to use keys with outer references.
Increased max tables in join to 62
2003-05-06 01:38:38 +03:00
heikki@hundin.mysql.fi
35fd869e51 Many files:
Eliminate the LOCK_log bottleneck in group commit in binlogging: flush InnoDB log files only after it has been released
2003-05-03 02:29:40 +03:00
pem@mysql.com
35c82164f6 Merged 4.1 to 5.0. 2003-04-29 12:06:04 +02: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
pem@mysql.com
736e78251e Merging 4.1 to 5.0. 2003-04-04 13:45:35 +02:00
heikki@hundin.mysql.fi
17d1a669ed log.cc:
Fix crash in previous bug fix log.cc reported by Rob Lyon if --skip-innodb is specified
2003-04-04 10:14:06 +03:00
heikki@hundin.mysql.fi
9a5578af57 Merge heikki@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/heikki/mysql-4.0
2003-04-03 21:19:14 +03:00
guilhem@mysql.com
8611c34e5e Explicit message to warn that logging (e.g. binary) is permanently turned off
because of writing problems (such message would have been useful during a recent
support task).
2003-04-03 20:19:13 +02:00
heikki@hundin.mysql.fi
8aa7532990 log.cc:
Fix bug number 224: do not call ha_report_binlog_offset_and_commit() when a MyISAM table is updated; this also makes CREATE TABLE not to commit an InnoDB transaction, even when binlogging is enabled
2003-04-03 21:19:13 +03:00
monty@narttu.mysql.fi
a7708c7904 Merge with 4.0 2003-04-03 21:19:12 +03:00
monty@narttu.mysql.fi
8f957e6ab5 Merge narttu.mysql.fi:/my/mysql-3.23 into narttu.mysql.fi:/my/mysql-4.0 2003-04-03 13:08:28 +03:00
monty@narttu.mysql.fi
e96c75fec0 Fixed bug in memory allocation that could affect 64 bit systems (affected hammer) 2003-04-03 13:07:42 +03: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
monty@narttu.mysql.fi
3cdc8ae55b Portability fix (for AMD hammer) 2003-04-03 12:10:38 +03:00
guilhem@mysql.com
654410a3d3 Deprecated the update log (Sprint task #792). Now --log-update
just turns on --log-bin and prints a warning. SQL_LOG_UPDATE
is handled in two ways (see mysqld.cc for comments).
2003-04-02 00:15:20 +02: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
b883a9c01c Merge with 4.0.12 2003-03-19 22:25:44 +02:00
bar@bar.mysql.r18.ru
8103c4c537 CONVERT class was removed 2003-03-18 17:01:32 +04:00
guilhem@mysql.com
87e1c552ed New variable rli->ignore_log_space_limit to resolve
a deadlock between I/O and SQL threads in replication
when relay_log_space is too small. This fixes bug #79.
2003-03-17 22:51:56 +01:00
monty@narttu.mysql.fi
a434bca704 Merge with 4.0 2003-03-16 19:17:54 +02:00
gluh@gluh.mysql.r18.ru
7fa51a2320 Fix for embeded library compile 2003-03-13 14:12:28 +04:00
gluh@gluh.mysql.r18.ru
3d61d2d973 Conflicts relsolving 2003-03-11 16:32:17 +04:00
gluh@gluh.mysql.r18.ru
e7f4bf5b27 Added 'PURGE LOGS BEFORE' command
Added expire-logs-days option
2003-03-11 13:49:06 +04:00
guilhem@mysql.com
ea4f0c383f Make log_pos be non-zero in the binary log, for BEGIN and COMMIT Query_log_events.
Now log_pos is the real position of the event. For events that are between BEGIN and COMMIT,
log_pos is still the BEGIN's log_pos.
This fixes bug #52 (If only transactions are run on the master then t
2003-03-06 16:22:31 +01:00
gluh@gluh.mysql.r18.ru
2022b7b68f SCRUM: 'Replication: PURGE LOGS with date' task
Added:

PURGE [MASTER] LOGS BEFORE date/date_expression
expire-logs-days option
  With this option old files are deleted when
      - mysqld is started
      - log is rotated
      - someone does FLUSH LOGS
2003-02-16 20:39:12 +04:00
monty@mashka.mysql.fi
25de9c19b2 After merge fixes & remove compiler warnings
Added lengths for all MYSQL_FIELD string parameters
Changed field length to 2 byte in .frm files
2003-02-07 15:47:24 +02:00
monty@mashka.mysql.fi
023d6dd39b Merge with 4.0.11 2003-02-04 21:52:14 +02:00
gluh@gluh.mysql.r18.ru
8d3c43880d conflicts resolving 2003-01-31 09:43:53 +04: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
3d28913740 Only write to the error log if --log-error is specified and --console is not specified
(On Windows --log-error is enabled by default)
2003-01-28 20:56:35 +02:00
monty@mashka.mysql.fi
6b71279382 merge 2003-01-28 09:02:51 +02:00
monty@mashka.mysql.fi
152f0603e7 Merge with 3.23.56 (Replace manual with 'empty' document)
Fix for bug when using auto_increment column and LAST_INSERT_ID()
2003-01-28 08:51:03 +02:00
monty@mashka.mysql.fi
689578a099 Fixes for Netware
Call pthread_mutex_destroy() on not used mutex.
Changed comments in .h and .c files from // -> /* */
Added detection of mutex on which one didn't call pthread_mutex_destroy()
Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression"
Added optimisation for ORDER BY NULL
2003-01-28 08:38:28 +02:00
monty@mashka.mysql.fi
710ffb2d89 Fix when using auto_increment and last_insert_id() in the same insert statement. 2003-01-28 06:48:26 +02:00
Administrador@light.
826993bba2 Added option hostname.err 2003-01-27 15:37:25 -02: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
1f6b615677 SCRUM
embedded-related changes
2003-01-20 18:47:25 +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
07daf3169e Merge with 4.0.8 2003-01-03 00:04:33 +02:00
Sinisa@sinisa.nasamreza.org
669184f41e many bug fixes 2002-12-23 14:56:41 +02:00
hf@deer.mysql.r18.ru
8a205e4ba3 Merge 2002-12-19 14:57:24 +04:00
bar@bar.mysql.r18.ru
b96a17a817 this will make me life easier in the future 2002-12-19 09:38:31 +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
9c509fcb52 Transactions in AUTOCOMMIT=0 mode didn't rotate binary log
Don't enable any bulk insert or record caching code if inserting less than MIN_ROWS_TO_USE_BULK_INSERT rows (100)
2002-12-14 12:45:31 +02:00
monty@mashka.mysql.fi
4886a2340b Transactions in AUTOCOMMIT=0 mode didn't rotate binary log. 2002-12-14 12:05:45 +02:00
heikki@hundin.mysql.fi
1b02928216 log.cc:
We must not commit inside InnoDB when LOAD DATA INFILE just writes a block to the binlog; only commit if the log event type is QUERY_EVENT or EXECUTE_LOAD_EVENT
2002-12-11 21:24:28 +02: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
859b688476 Merge with 4.0.6 2002-12-05 19:38:42 +02:00
monty@mashka.mysql.fi
fc06433a69 Removed copying of parameters as this leads to memory leaks in embedded server.
Fixed 'not initialized' memory error.
2002-12-05 03:40:33 +02:00
monty@mashka.mysql.fi
dac6498f9b Merge with 4.0 2002-11-21 15:56:48 +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
nick@mysql.com
4b7897fc76 Changed binlog name padding from binlog.001 to binlog.000001 2002-10-29 15:11:13 -07: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