Commit graph

616 commits

Author SHA1 Message Date
Staale Smedseng
6777150883 Merge from 5.0-bt 2009-06-29 15:17:01 +02:00
Staale Smedseng
a073ee45c2 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.
      
This bug will be resolved in more than one patch to limit the
size of changesets. This is the first patch, fixing a number 
of the warnings, predominantly "suggest using parentheses 
around && in ||", and empty for and while bodies.
2009-06-09 18:11:21 +02:00
Luis Soares
8e589d1d06 BUG#41725: slave crashes when inserting into temporary table after
stop/start slave
      
When stopping and restarting the slave while it is replicating
temporary tables, the server would crash or raise an assertion
failure. This was due to the fact that although temporary tables are
saved between slave threads restart, the reference to the thread in
use (table->in_use) was not being properly updated when the restart
happened (it would still reference the old/invalid thread instead of
the new one).
      
This patch addresses this issue by resetting the reference to the new
slave thread on slave thread restart.

mysql-test/r/rpl_temporary.result:
  Result file.
mysql-test/t/rpl_temporary.test:
  Test case that checks that both failures go away.
sql/slave.cc:
  Changed slave.cc to reset sql_thd reference in temporary tables.
2009-05-23 00:15:21 +01:00
Chad MILLER
767501a9b1 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Andrei Elkin
9cf91b4cd9 merging from 5.0-bt rep to a local branch 2009-04-30 15:41:47 +03:00
Andrei Elkin
d38e62634f Bug #38694 Race condition in replication thread shutdown
The issue of the current bug is unguarded access to mi->slave_running 
by the shutdown thread calling end_slave() that is bug#29968 
(alas happened not to be cross-linked with the current bug)

Fixed:

with removing the unguarded read of the running status
and perform reading it in terminate_slave_thread()
at time run_lock is taken (mostly bug#29968 backporting, still with some
improvements over that patch - see the error reporting from 
terminate_slave_thread()).
Issue of bug#38716 is fixed here for 5.0 branch as well.

Note:

There has been a separate artifact identified - 
a race condition between init_slave() and  end_slave() - 
reported as  Bug#44467.

mysql-test/r/rpl_bug38694.result:
  a new results file is added.
mysql-test/t/rpl_bug38694-slave.opt:
  simulating delay at slave threads shutdown.
mysql-test/t/rpl_bug38694.test:
  A new test to check if a delay at the termination phase of slave threads
  could cause any issue.
sql/slave.cc:
  The unguarded read of the running status is removed. Its reading is done in
  terminate_slave_thread() at time run_lock is taken;
  Calling terminate_slave_threads(skip_lock := !need_slave_mutex) in the failing branch of start_slave_threads() which is bug#38716 issue.
sql/slave.h:
  removing terminate_slave_thread() out of the global interface scope.
2009-04-28 14:46:07 +03:00
Alexey Botchkov
ddc9a19550 merging 2009-04-28 14:48:54 +05:00
Chad MILLER
14f923c028 Merge 5.0.80 release and 5.0 community. Version left at 5.0.80. 2009-04-14 13:20:13 -04:00
Ignacio Galarza
54fbbf9591 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Alexey Botchkov
d445b215d1 Bug#25058 ignored return codes in memory allocation functions
memory allocation error checks added for functions
   calling insert_dynamic()

per-file messages:
  myisam/mi_delete.c
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  myisam/mi_write.c
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  server-tools/instance-manager/instance_options.cc
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/slave.cc
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sp_head.cc
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sp_head.h
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sp_pcontext.cc
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sp_pcontext.h
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sql_select.cc
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
  sql/sql_yacc.yy
Bug#25058 ignored return codes in memory allocation functions
    out-of-memory errors handled
2008-11-21 17:38:42 +04:00
Chad MILLER
c425bf421d Merge chunk from trunk. 2008-07-10 14:50:07 -04:00
Chad MILLER
6a6e77eeff Merge chunk from trunk. 2008-07-10 14:47:53 -04:00
unknown
219c7a2a47 Merge amd64.(none):/src/mysql-5.0-bugteam
into  amd64.(none):/src/bug26243/my50-bug26243


libmysql/libmysql.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2008-03-28 16:01:05 -04:00
unknown
a9089cf460 Bug#26243 mysql command line crash after control-c
- Backported the 5.1 DBUG to 5.0.
- Avoid memory cleanup race on Windows client for CTRL-C


client/mysql.cc:
  Bug#26243 mysql command line crash after control-c
  - On Windows, the sigint handler shouldn't call mysql_end
  because the main thread will do so automatically.
  - Remove unnecessary signal call from the sigint handler.
  - Call my_end with proper value.
dbug/dbug.c:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
dbug/factorial.c:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
dbug/user.r:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
include/my_dbug.h:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
libmysql/libmysql.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
myisam/mi_open.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_federated.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_innodb.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_myisammrg.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/item_cmpfunc.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/mysqld.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/net_serv.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/opt_range.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/set_var.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/slave.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/sql_cache.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/sql_select.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
tests/mysql_client_test.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
2008-03-28 14:02:27 -04:00
unknown
0d6f9bad70 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_cp932.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/slave.cc:
  Auto merged
2008-03-26 09:33:55 +01:00
unknown
1836625fb4 BUG#31024: STOP SLAVE does not stop attempted connect()s
Problem: if the IO slave thread is attempting to connect,
STOP SLAVE waits for the attempt to finish. 
It may take a long time.
Fix: don't wait, stop the slave immediately.


sql/slave.cc:
  Send a SIGALRM signal to the slave thread when stopping it (using
  pthread_kill()). This breaks current socket(), connect(), poll() etc.
  calls, and makes the subsequent thd->awake() call effective.
  
  Also, move the definition of KICK_SLAVE to slave.cc.
sql/sql_repl.h:
  Removed KICK_SLAVE and inlined it in slave.cc because:
   - it was only called once, so better to make it local to where it is used
   - it needed to include a preprocessor conditional in the middle
2008-03-11 14:42:54 +01:00
unknown
04c5af1802 Bug#26622 MASTER_POS_WAIT does not work as documented
MASTER_POS_WAIT return values are different than expected when the server is not a slave. 
It returns -1 instead of NULL.

Fixed with correcting  st_relay_log_info::wait_for_pos() to return the proper
value in the case of rli info is not inited.


mysql-test/r/rpl_master_pos_wait.result:
  results changed
mysql-test/t/rpl_master_pos_wait.test:
  the new test to check that select master_pos_wait() to a server does 
  not have master info returns NULL as specified.
sql/slave.cc:
  changing the return value to correspond the specification.
2008-03-06 14:49:21 +02:00
unknown
fea2a5d83d BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl

Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.

This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.

This is fixed by:
- reading the event to be executed before checking if the until condition
  is satisfied.
- comparing the start position of the event to be executed. Since we do
  not have the start position available, we compute it by subtracting
  event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
  time, that meet until condition, we stop immediately, as in this
  case we do not want to wait for next event.


mysql-test/r/rpl_dual_pos_advance.result:
  A test case for BUG#13861.
mysql-test/t/rpl_dual_pos_advance.test:
  A test case for BUG#13861.
sql/log_event.cc:
  Store length of event. This is needed for further calculation of
  the beginning of event.
sql/slave.cc:
  Slave SQL thread may execute one extra event when there are events
  skipped by slave I/O thread (e.g. originated by the same server).
  Whereas it was requested not to do so by the UNTIL condition.
  
  This happens because we compare with the end position of previously
  executed event. This is fine when there are no skipped by slave I/O
  thread events, as end position of previous event equals to start
  position of to be executed event. Otherwise this position equals to
  start position of skipped event.
  
  This is fixed by:
  - reading the event to be executed before checking if the until condition
    is satisfied.
  - comparing the start position of the event to be executed. Since we do
    not have the start position available, we compute it by subtracting
    event length from end position (which is available).
  - if there are no events on the event queue at the slave sql starting
    time, that meet until condition, we stop immediately, as in this
    case we do not want to wait for next event.
sql/slave.h:
  Added master_log_pos parametr to is_until_satisfied().
mysql-test/t/rpl_dual_pos_advance-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt''
2008-02-22 19:07:07 +04:00
unknown
8414bd54ea Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/5.0-bug33931-assert_write_ignored_ev_when_init_slave_fails


sql/slave.cc:
  Auto merged
2008-02-14 13:55:11 +02:00
unknown
ded528ca12 Bug #33931 assertion at write_ignored_events_info_to_relay_log if init_slave_thread() fails
and
bug#33932  assertion at handle_slave_sql if init_slave_thread() fails

the asserts were caused by 
  bug33931: having thd deleted at time of executing err: code plus
            a missed initialization;
  bug33932: initialization of slave_is_running member was missed;

fixed with relocating mi members initialization and removing delete thd
It is safe to do as deletion happens later explicitly in the caller of
init_slave_thread().

Todo: at merging the test is better to be moved into suite/bugs for 5.x (when x>0).


sql/slave.cc:
  adding the bugs simulating code;
  relocating some assignments to satisfy the asserts;
mysql-test/r/rpl_bug33931.result:
  the new result file
mysql-test/t/rpl_bug33931-slave.opt:
  option to spark the simulation code
mysql-test/t/rpl_bug33931.test:
  tests check that slave does not crash as before.
  Slave threads must be in NO running state in the end.
2008-02-13 14:09:41 +02:00
unknown
3b6a71a4b0 Bug #34305 show slave status handling segfaults when slave io is about
to leave

The artifact was caused by
a flaw in concurrent accessing the slave's io thd by
the io itself and a handling show slave status thread.
Namely, show_master_info did not acquire mi->run_lock mutex that is
specified for mi->io_thd member.

Fixed with deploying the mutex locking and unlocking. The mutex is kept
short time and without interleaving with mi->data_lock mutex.

Todo: to report and fix an issue with 
    sys_var_slave_skip_counter::{methods} 
seem to acquire incorrectly
     active_mi->rli.run_lock
instead of the specified
     active_mi->rli.data_lock

A test case is difficult to compose, so rpl_packet should continue serving
as the indicator.


sql/slave.cc:
  implementing a TODO left at 4.1 time:
  mending access to mi->io_thd with the specified mutex;
sql/slave.h:
  adding a member name to the list of that run_lock guards.
2008-02-05 17:36:26 +02:00
unknown
150590a0bc BUG#12691 (Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER):
Complementary patch since LOAD DATA INFILE was not covered in
the previous patch.

This patch adds a check so that the slave skip counter is not
decreased to zero if seeing a BEGIN_LOAD_QUERY_EVENT,
APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT since these cannot
end a group. The group is terminated by an EXECUTE_LOAD_QUERY_
EVENT or DELETE_FILE_EVENT.


mysql-test/r/rpl_slave_skip.result:
  Result change.
mysql-test/t/rpl_slave_skip.test:
  Adding tests to test that the first event of a LOAD DATA INFILE
  can be skipped safely for both transactional and non-transactional
  tables. Also include a case that will generate a DELETE_FILE event
  last in the group, and this should be properly skipped as well.
sql/slave.cc:
  Not decrementing slave skip counter to zero when seeing a
  BEGIN_LOAD_QUERY_EVENT, APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT
  since these cannot end a group.
2007-12-20 16:07:54 +01:00
unknown
b536aa6756 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


CMakeLists.txt:
  Auto merged
include/config-win.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
win/configure.js:
  Auto merged
Makefile.am:
  Manual merge.
client/mysqlcheck.c:
  Manual merge.
configure.in:
  Manual merge.
mysql-test/r/mysqlcheck.result:
  Manual merge.
mysql-test/t/mysqlcheck.test:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
2007-12-10 15:28:17 -05:00
unknown
2d380a832d Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.0-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b12691-mysql-5.0-rpl


sql/slave.cc:
  Auto merged
2007-10-26 19:18:02 +02:00
unknown
f01321fd09 BUG#12691 (Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER):
Adding code to keep skipping events while inside a transaction. Execution
will start just after the transaction has been skipped.


sql/slave.cc:
  Adding code to set the thd->options flag for the slave SQL thread
  even when BEGIN, ROLLBACK, COMMIT, and XID events are being skipped.
      
  Adding code to not decrease the slave skip counter from 1 to 0 if we
  are inside a transaction. This will keep the counter at 1, and keep
  skipping events, until a transaction terminator is read. At that point,
  the slave skip counter will be decreased to 0, and events will be read
  and executed instead of read and skipped.
mysql-test/r/rpl_slave_skip.result:
  New BitKeeper file ``mysql-test/r/rpl_slave_skip.result''
mysql-test/t/rpl_slave_skip-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_slave_skip-slave.opt''
mysql-test/t/rpl_slave_skip.test:
  New BitKeeper file ``mysql-test/t/rpl_slave_skip.test''
2007-10-26 18:52:58 +02:00
unknown
bf8a85aa56 Bug #29309 Incorrect "Seconds_Behind_Master" value in SHOW SLAVE STATUS after FLUSH LOGS
Report claims that Seconds_behind_master behaves unexpectedly. 

Code analysis shows that there is an evident flaw in that treating of FormatDescription event is wrong
so  that after FLUSH LOGS on slave the Seconds_behind_master's calculation slips and incorrect
value can be reported to SHOW SLAVE STATUS. 
Even worse is that the gap between the correct and incorrect deltas grows with time.

Fixed with prohibiting changes to rpl->last_master_timestamp by artifical events (any kind of).
suggestion as comments is added how to fight with lack of info on the slave side by means of
new heartbeat feature coming.

The test can not be done ealily fully determistic.


sql/log_event.cc:
  changing timestamp is affirmed only by non-artificial events. Artifical FD won't change it anymore.
  The simulation code is off unless server is started with the args from the opt-file.
  The simulation code assumes that it will execute specific schedule generated by rpl_replication_delay.test.
sql/slave.cc:
  Comments are changed to announce a new possibility to cope with
  Seconds_behind_master jumping due to EOF special treatment (reset of the timestamp)
mysql-test/suite/manual/r/rpl_replication_delay.result:
  result are not deterministic though there are comments saying the most probable expected
  value for Seconds_behind_master
mysql-test/suite/manual/t/rpl_replication_delay-slave.opt:
  bug emulation
mysql-test/suite/manual/t/rpl_replication_delay.test:
  specic test for bug#29309. It's hard to make it reliable as it deals with timestamps.
  (a way to automate the test like this is to have I_S table for show slave status' fields)
  
  A possible way to check results is to run
  grep -i 'show\|seconds' < suite/manual/r/rpl_replication_delay.reject and to get the lines like these:
  
  show slave status /* Second_behind reports 0 */;;
  Seconds_Behind_Master   0
  show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
  Seconds_Behind_Master   9
  show slave status /* reports the correct diff with master query time about 3+3 secs */;;
  Seconds_Behind_Master   6
  
  Due to time discreteness of time the reported numbers may slightly vary. That's why the test is not reliable.
2007-10-04 18:46:31 +03:00
unknown
b86904731f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


BitKeeper/triggers/post-commit:
  Auto merged
CMakeLists.txt:
  Auto merged
VC++Files/sql/mysqld.vcproj:
  Auto merged
client/CMakeLists.txt:
  Auto merged
extra/CMakeLists.txt:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/CMakeLists.txt:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
ndb/src/common/util/File.cpp:
  Auto merged
server-tools/instance-manager/CMakeLists.txt:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
win/README:
  Auto merged
win/configure.js:
  Auto merged
configure.in:
  manual merge.  version update.
sql/sql_parse.cc:
  manual merge
2007-09-10 08:06:27 -04:00
unknown
b0051cce17 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug21132


sql/slave.cc:
  Auto merged
2007-08-29 15:57:04 +02:00
unknown
b2bf1ddfc0 Merge polly.local:/home/kaa/src/maint/bug24192/my50-bug24192
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/slave.cc:
  Auto merged
2007-07-11 19:29:11 +04:00
unknown
8abc8b9dc7 Fix for bug #24192 "MySQL replication does not exit server when running out of memory"
In case of out-of-memory error received from the master, print the corresponding message to the error log and stop slave I/O thread to avoid reconnecting with a wrong binary log position.


sql/slave.cc:
  In case of out-of-memory error received from the master, print the corresponding message to the error log and stop slave I/O thread to avoid reconnecting with a wrong binary log position.
2007-07-11 18:38:45 +04:00
unknown
9c1671267a Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


BitKeeper/triggers/post-commit:
  Auto merged
client/CMakeLists.txt:
  Auto merged
extra/CMakeLists.txt:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
myisam/CMakeLists.txt:
  Auto merged
mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
server-tools/instance-manager/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
win/Makefile.am:
  Auto merged
win/README:
  Auto merged
win/configure.js:
  Auto merged
CMakeLists.txt:
  manual merge.
configure.in:
  manual merge.
mysql-test/r/information_schema.result:
  manual merge.
sql/CMakeLists.txt:
  manual merge.
sql/set_var.cc:
  manual merge.
sql/sql_parse.cc:
  manual merge.
sql/sql_select.cc:
  manual merge.
2007-07-02 10:46:46 -04:00
unknown
808beaa51d Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


include/config-win.h:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
ndb/src/ndbapi/DictCache.cpp:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
configure.in:
  Version increment.
support-files/mysql.spec.sh:
  Include enterprise advert.
2007-04-26 11:51:37 -04:00
unknown
6f5cacfae8 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-25411_d


sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2007-04-24 09:25:54 -06:00
unknown
3eff7d4dd5 Bug#25411 (trigger code truncated), PART I
The issue found with bug 25411 is due to the function skip_rear_comments()
which damages the source code while implementing a work around.
The root cause of the problem is in the lexical analyser, which does not
process special comments properly.
For special comments like :
[1] aaa /*!50000 bbb */ ccc
since 5.0 is a version older that the current code, the parser is in lining
the content of the special comment, so that the query to process is
[2] aaa bbb ccc
However, the text of the query captured when processing a stored procedure,
stored function or trigger (or event in 5.1), can be after rebuilding it:
[3] aaa bbb */ ccc
which is wrong.

To fix bug 25411 properly, the lexical analyser needs to return [2] when
in lining special comments.
In order to implement this, some preliminary cleanup is required in the code,
which is implemented by this patch.

Before this change, the structure named LEX (or st_lex) contains attributes
that belong to lexical analysis, as well as attributes that represents the
abstract syntax tree (AST) of a statement.
Creating a new LEX structure for each statements (which makes sense for the
AST part) also re-initialized the lexical analysis phase each time, which
is conceptually wrong.

With this patch, the previous st_lex structure has been split in two:
- st_lex represents the Abstract Syntax Tree for a statement. The name "lex"
has not been changed to avoid a bigger impact in the code base.
- class lex_input_stream represents the internal state of the lexical
  analyser, which by definition should *not* be reinitialized when parsing
  multiple statements from the same input stream.

This change is a pre-requisite for bug 25411, since the implementation of
lex_input_stream will later improve to deal properly with special comments,
and this processing can not be done with the current implementation of
sp_head::reset_lex and sp_head::restore_lex, which interfere with the lexer.

This change set alone does not fix bug 25411.


sql/item_func.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/log_event.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/mysql_priv.h:
  Refactoring, separate lex_input_stream from st_lex.
sql/slave.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sp.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sp_head.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sp_head.h:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_class.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_class.h:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_lex.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_lex.h:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_parse.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_prepare.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_trigger.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_view.cc:
  Refactoring, separate lex_input_stream from st_lex.
sql/sql_yacc.yy:
  Refactoring, separate lex_input_stream from st_lex.
2007-04-24 09:24:21 -06:00
unknown
d4dfe7664e BUG#26551 (Aborted query for non-transactional table breaks replication):
Added error code ER_QUERY_INTERRUPTED to the list of special errors
that prevent the slave from starting to execute a query.


sql/slave.cc:
  Added ER_QUERY_INTERRUPTED to special error code that prevents statement
  from being executed on slave.
mysql-test/r/rpl_critical_errors.result.txt:
  New BitKeeper file ``mysql-test/r/rpl_critical_errors.result.txt''
mysql-test/t/rpl_critical_errors.test:
  New BitKeeper file ``mysql-test/t/rpl_critical_errors.test''
2007-04-12 14:00:45 +02:00
unknown
da89f79c4d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


VC++Files/sql/mysqld.vcproj:
  Auto merged
include/config-win.h:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
ndb/src/common/util/File.cpp:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  Manual merge.
include/my_dbug.h:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/slave.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
2007-04-03 09:20:22 -04:00
unknown
da8e832a05 Merge polly.local:/tmp/maint/bug23775/my50-bug23775
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/slave.cc:
  Auto merged
2007-03-20 17:27:49 +03:00
unknown
f7aa1930f4 Fix for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits".
Problem: to handle a situation when the size of event on the master is greater than max_allowed_packet on slave, we checked for the wrong constant (ER_NET_PACKET_TOO_LARGE instead of CR_NET_PACKET_TOO_LARGE).

Solution: test for the client "packet too large" error code instead of the server one in slave I/O thread.


mysql-test/r/rpl_packet.result:
  Added test case for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits"
mysql-test/t/rpl_packet.test:
  Added test case for bug #23775 "Replicated event larger that max_allowed_packet infinitely re-transmits"
sql/slave.cc:
  Test for the client "packet too large" error code instead of the server one in slave I/O thread.
2007-03-16 17:25:20 +03:00
unknown
8fa0d1b98e Removing two more compilation warnings.
sql/slave.cc:
  Guard declaration of variable to avoid "unused variable" warning.
sql/sql_repl.cc:
  Guard declaration of variable to avoid "unused variable" warning.
2007-03-01 10:40:48 +01:00
unknown
5454146123 Merge mysqldev@production.mysql.com:my/build-200702201448-5.0.36/mysql-5.0-release/
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


BitKeeper/etc/collapsed:
  auto-union
include/config-win.h:
  Auto merged
myisam/mi_open.c:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
configure.in:
  Manual merge.  Verified "5.0.37".
mysql-test/r/information_schema.result:
  Manual merge.
mysql-test/t/information_schema.test:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
2007-02-27 17:07:08 -05:00
unknown
f0e5877c53 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug25306


sql/slave.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2007-02-27 19:38:39 +01:00
unknown
33dbda5eae Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge


sql/field.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2007-02-25 00:10:51 +01:00
unknown
dfb019ea74 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge


sql/field.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge
2007-02-24 11:41:31 +01:00
unknown
8c07265ce1 the fix for BUG#24432
"INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values"
didn't make it into 5.0.36 and 5.1.16,
so we need to adjust the bug-detection-based-on-version-number code.
Because the rpl tree has a too old version, rpl_insert_id cannot pass,
so I disable it (like is already the case in 5.1-rpl for the same reason),
and the repl team will re-enable it when they merge 5.0 and 5.1 into
their trees (thus getting the right version number).


mysql-test/t/disabled.def:
      rpl_insert_id tests statement-based replication of INSERT ON
      DUPLICATE KEY UPDATE. This type of INSERT had BUG#24432, which is
      fixed in 5.0.38; we made the slave detect if it is connected to a
      <5.0.38 master and if so refuse to replicate.
      The problem is that this 5.0-rpl tree, even though it will produce
      the 5.0.38 release, still has a 5.0.36 version in configure.in.
      Thus rpl_insert_id fails. So I disable it. As soon as the 5.0-rpl
      tree gets the changesets from the main 5.0, its version will change
      to 5.0.38 and so the repl team will re-enable the test.
sql/slave.cc:
  the fix for BUG#24432 didn't make it into 5.0.36 and 5.1.16,
  so we need to adjust the bug-detection-based-on-version-number code.
2007-02-23 15:32:51 +01:00
unknown
44bdb07028 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug25306


sql/slave.cc:
  Auto merged
2007-02-23 01:28:24 +01:00
unknown
607c224969 Prevent bugs by making DBUG_* expressions syntactically equivalent
to a single statement.
---
Bug#24795: SHOW PROFILE

Profiling is only partially functional on some architectures.  Where 
there is no getrusage() system call, presently Null values are 
returned where it would be required.  Notably, Windows needs some love 
applied to make it as useful.

  Syntax this adds:
  
  SHOW PROFILES
  
  SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
   where "n" is an integer
   and "types" is zero or many (comma-separated) of
      "CPU"
      "MEMORY" (not presently supported)
      "BLOCK IO"
      "CONTEXT SWITCHES"
      "PAGE FAULTS"
      "IPC"
      "SWAPS"
      "SOURCE"
      "ALL"

It also adds a session variable (boolean) "profiling", set to "no"
by default, and (integer) profiling_history_size, set to 15 by 
default.

This patch abstracts setting THDs' "proc_info" behind a macro that 
can be used as a hook into the profiling code when profiling 
support is compiled in.  All future code in this line should use
that mechanism for setting thd->proc_info.

---

Tests are now set to omit the statistics.

---

Adds an Information_schema table, "profiling" for access to 
"show profile" data.
---
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community-3--bug24795
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
---
Fix merge problems.
---
Fixed one bug in the query_source being NULL.  

Updated test results.
---
Include more thorough profiling tests.

Improve support for prepared statements.

Use session-specific query IDs, starting at zero.
---
Selecting from I_S.profiling is no longer quashed in profiling, as
requested by Giuseppe.

Limit the size of captured query text.

No longer log queries that are zero length.


BitKeeper/deleted/.del-profile.result:
  Rename: mysql-test/r/profile.result -> BitKeeper/deleted/.del-profile.result
BitKeeper/deleted/.del-profile.test:
  Rename: mysql-test/t/profile.test -> BitKeeper/deleted/.del-profile.test
BitKeeper/deleted/.del-sql_profile.cc:
  Rename: sql/sql_profile.cc -> BitKeeper/deleted/.del-sql_profile.cc
BitKeeper/deleted/.del-sql_profile.h:
  Rename: sql/sql_profile.h -> BitKeeper/deleted/.del-sql_profile.h
configure.in:
  Add a configure-time option to enable/disable query profiling.  The
  default is enabled.
include/my_dbug.h:
  
  
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
myisam/mi_open.c:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
mysql-test/r/information_schema.result:
  Updated (re-recorded) tests that I missed somehow.  I verified these
  for correctness.
mysql-test/r/information_schema_db.result:
  Updated test results I missed.
mysql-test/r/mysqlshow.result:
  Fix merge problems.
ndb/src/ndbapi/DictCache.cpp:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
sql/ha_archive.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/ha_berkeley.cc:
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/ha_myisam.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/ha_myisammrg.cc:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
sql/ha_ndbcluster.cc:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
sql/item_cmpfunc.cc:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
sql/item_func.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/lock.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/log_event.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/mysql_priv.h:
  Use 64-bit constants for the 64-bit bit field.
  
  Add a new option bit for whether profiling is active or not.
sql/mysqld.cc:
  Add semicolon to DBUG statement.
  
  Add a new system variable and set it.
  ---
  Set the minimum, which is zero and not 50.
sql/repl_failsafe.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/set_var.cc:
  Make a new system global variable and session variable, to determine
  behavior of profiling.	
  ---
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/set_var.h:
  The THD::options bit field is ulonglong, not ulong.
sql/slave.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
  ---
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/sp_head.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/sql_base.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
  ---
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/sql_cache.cc:
  DBUG_* statements should be syntactically equivalent to a single 
  statement.
  ---
  Fix merge problems.
sql/sql_class.cc:
  Insert a pointer to the current thread in the profiling code.
  ---
  Manual merge, undoing first patch.
  ---
  Fix merge problems.
sql/sql_class.h:
  Create a new system variable, profiling_history_size, and add a 
  member to THD to hold profiling information about this thread's 
  execution.
  ---
  Manual merge, undoing first patch.
sql/sql_delete.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
  ---
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/sql_insert.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
  ---
  Fix merge problems.
sql/sql_lex.cc:
  Initialize profiling options to empty.
  ---
  Manual merge, undoing first patch.
sql/sql_lex.h:
  Add info to the lexer object so that we can hold data that comes from
  parsing statements.
  
  Reuse memory addresses of uints that can't occur in the same state-
  ment.
  
  This is dangerous because it involves knowledge of what symbols are 
  never used together, which is information stored obliquely in another
  file.
  ---
  Manual merge, undoing first patch.
sql/sql_parse.cc:
  Add hooks to the parser to jump to profiling code.
  
  If profiling is not present, then return an error message upon being
  used.
  ---
  Manual merge, undoing first patch.
  ---
  Fix merge problems.
  ---
  Include patch backported to 5.0-global.
  
  THD::options is a ulonglong, not ulong.
sql/sql_prepare.cc:
  From prepared statement execution, set the query source in the 
  profiler, as we can't get it from  thd .
  ---
  Make it less expensive to limit the size of the queries.
sql/sql_repl.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/sql_select.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
  ---
  Fix merge problems.
sql/sql_show.cc:
  Abstract setting thread-info into a function or macro.
  
  Also, remove "static" qualification on schema_table_store_record()
  so that external functions may use it.
  ---
  Manual merge, undoing first patch.
sql/sql_table.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/sql_update.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/sql_view.cc:
  Abstract setting thread-info into a function or macro.
  ---
  Manual merge, undoing first patch.
sql/sql_yacc.yy:
  Add new lexer symbols and insert new grammatical rules necessary to 
  retreive profiling information.
  ---
  Manual merge, undoing first patch.
  ---
  Fix merge problems.
sql/table.h:
  Add enum item for query profiling.
BitKeeper/deleted/.del-profiling-master.opt:
  New BitKeeper file ``mysql-test/t/profiling-master.opt''
mysql-test/r/profiling.result:
  New BitKeeper file ``mysql-test/r/profiling.result''
  ---
  Include more verbose that describes the queries so far.
  
  Include Giuseppe's tests.
  ---
  Selecting from I_S.profiling is no longer quashed in profiling, as
  requested by Giuseppe.
mysql-test/t/profiling.test:
  New BitKeeper file ``mysql-test/t/profiling.test''
  ---
  Include more verbose that describes the queries so far.
  
  Include Giuseppe's tests.
  ---
  Selecting from I_S.profiling is no longer quashed in profiling, as
  requested by Giuseppe.
sql/sql_profile.cc:
  New BitKeeper file ``sql/sql_profile.cc''
  ---
  If query_source is NULL, as can sometimes happen, then don't try
  to copy that memory.
  ---
  Make each new session use its own numbering of query_ids, and not
  show the global-pool numbers to the user.
  
  Provide a way for prepared statements to set the query_source.
  ---
  Selecting from I_S.profiling is no longer quashed in profiling, as
  requested by Giuseppe.
  
  Limit the size of captured query text.
  
  No longer log queries that are zero length.
sql/sql_profile.h:
  New BitKeeper file ``sql/sql_profile.h''
  ---
  Make each new session use its own numbering of query_ids, and not
  show the global-pool numbers to the user.
  
  Provide a way for prepared statements to set the query_source.
  ---
  Make it less expensive to limit the size of the queries.
2007-02-22 10:03:08 -05:00
unknown
1384e64005 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
cmd-line-utils/readline/display.c:
  Auto merged
configure.in:
  Auto merged
extra/yassl/include/buffer.hpp:
  Auto merged
extra/yassl/include/crypto_wrapper.hpp:
  Auto merged
extra/yassl/include/yassl_imp.hpp:
  Auto merged
extra/yassl/include/yassl_int.hpp:
  Auto merged
extra/yassl/src/crypto_wrapper.cpp:
  Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
  Auto merged
extra/yassl/taocrypt/include/des.hpp:
  Auto merged
extra/yassl/taocrypt/include/hash.hpp:
  Auto merged
extra/yassl/taocrypt/include/hmac.hpp:
  Auto merged
extra/yassl/taocrypt/include/modarith.hpp:
  Auto merged
extra/yassl/taocrypt/include/modes.hpp:
  Auto merged
extra/yassl/taocrypt/include/rsa.hpp:
  Auto merged
extra/yassl/taocrypt/include/type_traits.hpp:
  Auto merged
extra/yassl/taocrypt/mySTL/list.hpp:
  Auto merged
extra/yassl/taocrypt/src/aes.cpp:
  Auto merged
extra/yassl/taocrypt/src/algebra.cpp:
  Auto merged
extra/yassl/testsuite/testsuite.cpp:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysys/default.c:
  Auto merged
ndb/src/common/transporter/Transporter.cpp:
  Auto merged
ndb/src/common/util/File.cpp:
  Auto merged
ndb/src/common/util/SocketClient.cpp:
  Auto merged
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/ndbapi/ClusterMgr.hpp:
  Auto merged
ndb/src/ndbapi/Ndb.cpp:
  Auto merged
ndb/src/ndbapi/NdbScanOperation.cpp:
  Auto merged
ndb/src/ndbapi/SignalSender.cpp:
  Auto merged
sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
extra/yassl/taocrypt/src/asn.cpp:
  Manual merge (Fix shadowed variable name)
extra/yassl/taocrypt/test/test.cpp:
  No changes
ndb/src/common/util/ConfigValues.cpp:
  Manual merge (Fix shadowed variable name)
sql/field.h:
  manual merge
sql/ha_myisam.cc:
  manual merge
sql/ha_ndbcluster.cc:
  manual merge
sql/item_cmpfunc.cc:
  manual merge
sql/item_subselect.cc:
  Manual merge (Fix shadowed variable name)
sql/mysqld.cc:
  no changes
2007-02-21 14:07:08 +02:00
unknown
914ae41f33 Fix for BUG#24432
"INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values".
When in an INSERT ON DUPLICATE KEY UPDATE, using
an autoincrement column, we inserted some autogenerated values and
also updated some rows, some autogenerated values were not used
(for example, even if 10 was the largest autoinc value in the table
at the start of the statement, 12 could be the first autogenerated
value inserted by the statement, instead of 11). One autogenerated
value was lost per updated row. Led to exhausting the range of the
autoincrement column faster.
Bug introduced by fix of BUG#20188; present since 5.0.24 and 5.1.12.
This bug breaks replication from a pre-5.0.24 master.
But the present bugfix, as it makes INSERT ON DUP KEY UPDATE
behave like pre-5.0.24, breaks replication from a [5.0.24,5.0.34]
master to a fixed (5.0.36) slave! To warn users against this when
they upgrade their slave, as agreed with the support team, we add
code for a fixed slave to detect that it is connected to a buggy
master in a situation (INSERT ON DUP KEY UPDATE into autoinc column)
likely to break replication, in which case it cannot replicate so
stops and prints a message to the slave's error log and to SHOW SLAVE
STATUS.
For 5.0.36->[5.0.24,5.0.34] replication we cannot warn as master
does not know the slave's version (but we always recommended to users
to have slave at least as new as master).
As agreed with support, I'll also ask for an alert to be put into
the MySQL Network Monitoring and Advisory Service.


mysql-test/r/rpl_insert_id.result:
  results to check the bugfix; without the bugfix, you would see, in
  master and slave:
  "3,2" instead of "2,2" for the INSERT VALUES testcase,
  "11,6,..." instead of "6,6,..." for the INSERT SELECT testcase.
mysql-test/t/rpl_insert_id.test:
  testing that BUG#24432 is fixed
sql/log_event.cc:
  A trick to force the master to pretend it is old and features BUG#24432.
  To do fast lookups in the list of known bugs by version, we compute
  the 3 X.Y.Z numbers from the master's version string and cache that
  into a new member Format_description_log_event::server_version_split.
  We do this computation in the event's two constructors.
  A simple prevention against buffer overrun when reading the master's
  version from a binlog event (assume the event is corrupted on disk,
  and so the version string on disk is longer than ST_SERVER_VER_LEN
  (50), then we would not get a closing 0 at the end of the class member.
sql/log_event.h:
  new member to hold the "split server version" (3 numbers X.Y.Z),
  and a method to compute this from the version string.
sql/slave.cc:
  a function which tells, based on master's version (as found
  in the Format_description event in the relay log being executed),
  if master can have a certain bug. This function uses a list of
  bug_id / first_version_with_bug / first_version_with_fix.
  If the test is positive, a short error message is put into SHOW SLAVE
  STATUS, and a verbose message is put into the slave's error log.
  The caller is expected to stop the slave in this case.
sql/slave.h:
  new function to test if the replication master has a bug
sql/sql_insert.cc:
  Fix for BUG#24432:t he reason was a misplaced restore_auto_increment() 
  (misplaced when fixing BUG#20188). Indeed, when updating the row,
  it is clear that the autogenerated auto_increment value will not be
  used for this row (and if by "chance" the autoinc value present
  in the updated row is >= to the not used autogenerated value,
  adjust_next_insert_id_after_explicit_value() will fix next_insert_id).
  We also add code for a fixed slave to detect that it is connected to
  a buggy master (in which case it cannot replicate so stops).
mysql-test/r/rpl_known_bugs_detection.result:
  see that SHOW SLAVE STATUS prints information that slave found a bug
  in master, and does not execute the dangerous event (table stays
  empty).
mysql-test/t/rpl_known_bugs_detection-master.opt:
  pass debug symbol to make the master pretend it has BUG#24432
mysql-test/t/rpl_known_bugs_detection.test:
  new test to see if bug detection by slave works
2007-02-08 15:53:14 +01:00
unknown
cbace0b7b4 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug10798/my50-bug10798


sql/slave.cc:
  Auto merged
2007-02-05 10:09:31 +04:00
unknown
f27ea1b152 Merge mysql.com:/usr/home/ram/work/bug10798/my41-bug10798
into  mysql.com:/usr/home/ram/work/bug10798/my50-bug10798


sql/slave.cc:
  merging
2007-02-05 09:54:23 +04:00