Commit graph

6637 commits

Author SHA1 Message Date
unknown
d1b9076e51 srv0srv.c:
Put back a 50 millisecond sleep in too high concurrency situations which I removed in the previous push; count also such sleeping threads to the InnoDB queue in SHOW INNODB STATUS


innobase/srv/srv0srv.c:
  Put back a 50 millisecond sleep in too high concurrency situations which I removed in the previous push; count also such sleeping threads to the InnoDB queue in SHOW INNODB STATUS
2003-07-13 18:50:43 +03:00
unknown
706dc59f58 srv0srv.c:
Fix a benign bug introduced in 4.0.14: InnoDB could complain 'Error: trying to declare trx to enter InnoDB' if several threads tried to init the auto-inc counter for the same table at the same time; in theory, the bug could even lead to a hang of the server, but that shuld be extremely improbable


innobase/srv/srv0srv.c:
  Fix a benign bug introduced in 4.0.14: InnoDB could complain 'Error: trying to declare trx to enter InnoDB' if several threads tried to init the auto-inc counter for the same table at the same time; in theory, the bug could even lead to a hang of the server, but that shuld be extremely improbable
2003-07-13 17:18:06 +03:00
unknown
bc479783c4 srv0start.c, srv0srv.h, os0file.h, os0file.c:
Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files


innobase/os/os0file.c:
  Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files
innobase/include/os0file.h:
  Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files
innobase/include/srv0srv.h:
  Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files
innobase/srv/srv0start.c:
  Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files
2003-07-13 00:17:02 +03:00
unknown
91eb7ce162 perror.c:
fix typo.


extra/perror.c:
  fix typo.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-07-12 11:45:43 -05:00
unknown
9480ec8289 Cleaning after removing LOG_INFO_PURGE_NO_ROTATE.
sql/sql_repl.cc:
  In my previous change I removed 'no_rotate' from MYSQL_LOG, so this made
  LOG_INFO_PURGE_NO_ROTATE useless (an error code which was never returned),
  so I remove it of the 'switch'.
2003-07-12 16:04:42 +02:00
unknown
5526d454fd Member no_rotate in MYSQL_LOG was always 0, I delete it.
sql/log.cc:
  Member no_rotate of MYSQL_LOG is useless; this shows it for sure:
  [guilhem@gbichot2 mysql-4.0]$ bk -r grep no_rotate
  sql/log.cc      1.83       no_rotate(0), need_start_event(1)
  sql/log.cc      1.75      if (no_rotate)
  sql/log.cc      1.89      if (!no_rotate)
  sql/sql_class.h 1.119     bool no_rotate;
  i.e. no_rotate is 0 all the time. So we don't need it.
  Biggest part of the patch is indentation change.
sql/sql_class.h:
  suppress no_rotate
2003-07-12 15:48:26 +02:00
unknown
351a03df7a Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-07-12 15:25:08 +02:00
unknown
543208de96 removed 2 small useless if().
sql/log.cc:
  a comment for the future.
sql/mysqld.cc:
  if (p) is not needed: fn_ext() always returns a valid pointed; the way
  to test if an extension was found is if (*p), not if (p).
  But here even if there's no extension, we still want to truncate opt_name
  to FN_REFLEN, so we always execute the code.
  By design, the test was always 'false' (because we strip the extension before
  testing if there's an extension) so log->set_no_rotate never executed.
sql/sql_class.h:
  remove set_no_rotate as we don't need it.
2003-07-12 15:06:40 +02:00
unknown
1c5773add4 - fixed an error in the rpl_error_ignored_table test suite: the master
port number can be different from 3306 when doing the release builds
   with Do-compile, therefore it has to be replaced with the correct
   value during the test run using the "--replace_result" function.


mysql-test/r/rpl_error_ignored_table.result:
   - replaced hard-coded master port number with MASTER_PORT variable, since
     the port number is different when running the test suite during the 
     release builds with "Do-compile".
mysql-test/t/rpl_error_ignored_table.test:
   - replaced hard-coded master port number with MASTER_PORT variable, since
     the port number is different when running the test suite during the 
     release builds with "Do-compile".
2003-07-11 22:18:53 +02:00
unknown
aa28da79c1 - fixed a typo in previous push
Build-tools/Bootstrap:
   - duh!
2003-07-11 19:32:29 +02:00
unknown
762b13468d - fixed a bug in Bootstrap script: simply searching for the last tagged
ChangeSet was not sufficient to get the full ChangeLog between two
   released versions (when using "--changelog=last") as merging between 
   trees also merges the BK tags. Now we explicitely search for the last
   tagged ChangeSet that matches our major+minor version number, which 
   should match the last ChangeSet used for the previous release.


Build-tools/Bootstrap:
   - fixed a bug: simply searching for the last tagged ChangeSet was not
     sufficient to get the full ChangeLog between two released versions
     (when using "--changelog=last") as merging between trees also merges
     the BK tags. Now we explicitely search for the last tagged ChangeSet
     that matches our major+minor version number, which should match the
     last ChangeSet used for the previous release.
2003-07-11 18:24:13 +02:00
unknown
d974959b4f 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.


sql/handler.cc:
  is_open() with locks
sql/item_func.cc:
  is_open() with locks
sql/log.cc:
  No more 'inited'.
  We now always use is_open() in a thread-safe manner.
  This simplifies some functions (no more need to test is_open() twice).
sql/log_event.cc:
  is_open() with locks
sql/mysqld.cc:
  Init mutexes for the global MYSQL_LOG objects.
  We care about no_rotate, because we can't do it in open() anymore (because
  we don't have 'inited' anymore).
sql/repl_failsafe.cc:
  is_open() with locks
sql/slave.cc:
  init pthread objects (mutexes, conds) in the constructor of st_relay_log_info.
  Some better locking in rotate_relay_log().
sql/sql_base.cc:
  is_open() with locks
sql/sql_class.h:
  Before, we inited LOCK_log in MYSQL_LOG::open(), so in other places of the code
  when we were never 100% sure that it had been inited. For example, if the server
  was running without --log-bin, ::open() was not called so the mutex was not
  inited. We could detect it with !inited, but not safely as 'inited' was not
  protected by any mutex.
  So now:
  we *always* init the LOCK_log mutex, even if the log is not used. We can't init
  the mutex in MYSQL_LOG's constructor, because for global objects like
  mysql_bin_log, mysql_log etc, the constructor is called before MY_INIT(), but
  safe_mutex depends on MY_INIT(). So we have a new function MYSQL_LOG::init_pthread_objects
  which we call in main(), after MY_INIT().
  For the relay log, we call this function in the constructor of
  st_relay_log_info, which is called before any function tries to
  use the relay log (the relay log is always invoked as rli.relay_log).
  So now we should be safe in all cases and we don't need 'inited'.
sql/sql_db.cc:
  is_open() with locks
sql/sql_delete.cc:
  is_open() with locks
sql/sql_insert.cc:
  is_open() with locks
sql/sql_load.cc:
  is_open() with locks
sql/sql_parse.cc:
  is_open() with locks
sql/sql_rename.cc:
  is_open() with locks
sql/sql_repl.cc:
  is_open() with locks
sql/sql_table.cc:
  is_open() with locks
sql/sql_update.cc:
  is_open() with locks
2003-07-11 14:26:44 +02:00
unknown
f200fa15db Fix for BUG#812
"mysqlhotcopy fails to copy tables but does not indicate a failure"
("does not indicate a failure");
this is about "mysqlhotcopy fails to copy tables".


mysql-test/t/rpl_error_ignored_table-slave.opt:
  added a missing newline
scripts/mysqlhotcopy.sh:
  Fix for BUG#812.
  The problem was that with many tables to copy (10000 in the bug's example),
  the generated 'cp' command line was 1MB long, whereas (at least on my Linux) it
  should not exceed 128 kB. Testing the 'cp' in a shell terminal gives
  "arguments list too long".
  So we issue several small (100 kB) 'cp' command lines instead of a big one.
  Of course, this will still fail on systems where the limit is below 100 kB.
  We now have safe_system() which cuts the command line in pieces,
  and calls safe_simple_system() (execution) for each piece.
2003-07-10 16:03:29 +02:00
unknown
8a1a63de90 Merge mysql.com:/space/my/mysql-4.0
into mysql.com:/space/my/mysql-4.0-build
2003-07-09 15:51:57 +02:00
unknown
a71c2b3bb3 - enhanced the RPM spec file (use more RPM macros, cleanups, allow to
override CC/CXX when using a special compiler)
 - the RPM should now build on AMD64 and IA64, too


support-files/MySQL-shared-compat.spec.sh:
   - use %_libdir macro instead of hardcoded value (required on AMD64,
     where %_libdir is /usr/lib64 instead)
support-files/mysql.spec.sh:
   - removed the GIF Icon (file was not included in the sources anyway)
   - removed unused variable %shared_lib_version
   - do not run automake before building the standard binary
     (should not be necessary)
   - add server suffix '-standard' to standard binary (to be in line
     with the binary tarball distributions)
   - Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir,
     _datadir, _includedir) throughout the spec file (using _libdir was
     required to be used anyway to be able to build on AMD64).
   - allow overriding CC and CXX (required when building with other compilers)
2003-07-09 15:51:31 +02:00
unknown
08843dd197 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
2003-07-09 00:57:38 +03:00
unknown
3c268e59ec Cleanups
mysql-test/t/distinct.test:
  Cleanup
sql/log.cc:
  Cleanup
sql/slave.cc:
  Cleanup
sql/sql_delete.cc:
  Cleanup
sql/sql_parse.cc:
  Simple optimization
2003-07-09 00:55:07 +03:00
unknown
075fd01fba Merge lgrimmer@build.mysql.com:/home/bk/mysql-4.0
into mysql.com:/space/my/mysql-4.0
2003-07-08 23:31:10 +02:00
unknown
b5b615942c - Fixed mysqlhotcopy to actually abort if copying the tables failed.
(BUG#812)


scripts/mysqlhotcopy.sh:
   - Actually die if copying the tables fails instead of going on as if
     nothing was wrong (BUG#812)
2003-07-08 23:29:55 +02:00
unknown
5e817c5313 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0


sql/mysqld.cc:
  Auto merged
2003-07-09 00:00:16 +03:00
unknown
e13e857cae Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup


myisam/mi_extra.c:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
mysql-test/r/alter_table.result:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
mysql-test/t/alter_table.test:
  Test DISABLE/ENABLE KEY
sql/ha_myisam.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/mysqld.cc:
  Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup
sql/sql_table.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/table.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/table.h:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
2003-07-08 23:58:04 +03:00
unknown
f0f7eccc23 ha_innodb.cc:
Prevent the user from creating InnoDB tables with > 1000 columns


sql/ha_innodb.cc:
  Prevent the user from creating InnoDB tables with > 1000 columns
2003-07-08 20:51:45 +03:00
unknown
eb271ef830 2003-07-08 11:26:46 -05:00
unknown
48b88d1a64 mysqlhotcopy.sh:
Undo serg's patch that used my_print_defaults,
  and instead simply do not define $opt{user}.
  This allows the script to use option files properly.


scripts/mysqlhotcopy.sh:
  Undo serg's patch that used my_print_defaults,
  and instead simply do not define $opt{user}.
  This allows the script to use option files properly.
2003-07-08 11:25:46 -05:00
unknown
d99608d2f2 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-08 17:27:43 +02:00
unknown
072162dff7 added missing ~/.my.cnf support to mysqlhotcopy (bug #808) 2003-07-08 17:27:22 +02:00
unknown
5efab3ea77 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-07-08 15:52:00 +02:00
unknown
eed62d993d 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.


include/mysqld_error.h:
  New error code (can be sent only to the slave thread, not to normal clients).
sql/log.cc:
  removed comment from a previous debugging.
sql/log_event.cc:
  ER_SLAVE_IGNORED_TABLE is an ignorable error.
sql/share/czech/errmsg.txt:
  for BUG#797
sql/share/danish/errmsg.txt:
  for BUG#797
sql/share/dutch/errmsg.txt:
  for BUG#797
sql/share/english/errmsg.txt:
  for BUG#797
sql/share/estonian/errmsg.txt:
  for BUG#797
sql/share/french/errmsg.txt:
  for BUG#797
sql/share/german/errmsg.txt:
  for BUG#797
sql/share/greek/errmsg.txt:
  for BUG#797
sql/share/hungarian/errmsg.txt:
  for BUG#797
sql/share/italian/errmsg.txt:
  for BUG#797
sql/share/japanese/errmsg.txt:
  for BUG#797
sql/share/korean/errmsg.txt:
  for BUG#797
sql/share/norwegian-ny/errmsg.txt:
  for BUG#797
sql/share/norwegian/errmsg.txt:
  for BUG#797
sql/share/polish/errmsg.txt:
  for BUG#797
sql/share/portuguese/errmsg.txt:
  for BUG#797
sql/share/romanian/errmsg.txt:
  for BUG#797
sql/share/russian/errmsg.txt:
  for BUG#797
sql/share/slovak/errmsg.txt:
  for BUG#797
sql/share/spanish/errmsg.txt:
  for BUG#797
sql/share/swedish/errmsg.txt:
  for BUG#797
sql/share/ukrainian/errmsg.txt:
  for BUG#797
sql/sql_parse.cc:
  when in sql_parse in the slave thread we ignore the query because of replicate-do
  and replicate-ignore options, we return a specific error to the slave thread,
  so that it knows that the query has been ignored (which is different from a
  successful query).
  A small cleanup (test was done twice).
2003-07-08 15:50:57 +02:00
unknown
e8d5bb1895 trx0trx.c:
A cosmetic change: set trx id to zero at creation so that SHOW INNODB STATUS does not print a random value for the id of a transaction object for which the transaction has never been started yet (for example, running SHOW INNODB STATUS as the first command from a mysql prompt printed a random id for the trx object associated with the session itself running the SHOW INNODB STATUS command)


innobase/trx/trx0trx.c:
  A cosmetic change: set trx id to zero at creation so that SHOW INNODB STATUS does not print a random value for the id of a transaction object for which the transaction has never been started yet (for example, running SHOW INNODB STATUS as the first command from a mysql prompt printed a random id for the trx object associated with the session itself running the SHOW INNODB STATUS command)
2003-07-08 14:16:27 +03:00
unknown
d0486f8abc typos fixed 2003-07-07 19:35:11 +02:00
unknown
c0d60e83a7 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-07 19:08:17 +02:00
unknown
a4c3f0d727 finally proper recursive descent for parsing expressions with MATCH ... AGAINST in add_ft_keys() 2003-07-07 19:02:58 +02:00
unknown
7ff9378a34 correct (finally) condition for MATCH >0, >=0 etc in add_ft_keys (SW#1647)
still no rec. descent
2003-07-07 16:45:19 +02:00
unknown
e639c5fec7 sql_delete.cc:
Fix bug: if a DELETE failed in a FOREIGN KEY error and it had already deleted some rows, then MySQL did not roll back the failed SQL statement, and also wrote it to the binlog


sql/sql_delete.cc:
  Fix bug: if a DELETE failed in a FOREIGN KEY error and it had already deleted some rows, then MySQL did not roll back the failed SQL statement, and also wrote it to the binlog
2003-07-07 16:39:53 +03:00
unknown
964c2fe083 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


sql/mysql_priv.h:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-07-06 18:01:39 +02:00
unknown
27601fc5ee 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.


libmysqld/lib_sql.cc:
  open_log has no default arguments anymore.
mysql-test/r/rpl_flush_log_loop.result:
  result update now that FLUSH LOGS rotates relay logs.
mysql-test/r/rpl_log.result:
  result update now that FLUSH LOGS rotates relay logs.
mysql-test/r/rpl_rotate_logs.result:
  result update now that max_binlog_size is 4096.
mysql-test/t/rpl_rotate_logs-master.opt:
  now max_binlog_size must be a multiple of 4096 (see change in mysqld.cc)
sql/log.cc:
  Got rid of default arguments of various MYSQL_LOG methods (the default arguments
  made code reading uneasy).
  Set max_size in ::init().
  New function set_max_size() to set max_size of a MYSQL_LOG on-the-fly.
  More DBUG info.
sql/mysql_priv.h:
  no defaults in open_log().
  New variables max_relay_log_size.
sql/mysqld.cc:
  New variable and option max_relay_log_size.
  max_binlog_size and max_relay_log_size are multiples of IO_SIZE.
  No more default arguments for log functions.
sql/set_var.cc:
  New variable max_relay_log_size.
  If it is 0, then max_binlog_size will apply to relay logs.
  When one of these variables is changed, fix_max_%log_size is called
  to update max_size of the binary and/or relay logs.
sql/slave.cc:
  New function rotate_relay_log().
sql/slave.h:
  New function rotate_relay_log().
sql/sql_class.h:
  New member max_size of MYSQL_LOG (for automatic rotation).
  New method set_max_size() for setting on-the-fly.
sql/sql_parse.cc:
  Flush the relay log in FLUSH LOGS.
2003-07-06 17:59:54 +02:00
unknown
da1be35be8 row0mysql.c:
Fix performance bug: if there were thousands of tables, DROP TABLE could take as much as a second CPU time


innobase/row/row0mysql.c:
  Fix performance bug: if there were thousands of tables, DROP TABLE could take as much as a second CPU time
2003-07-06 18:01:51 +03:00
unknown
ad720a2803 Merge heikki@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/heikki/mysql-4.0
2003-07-06 16:17:41 +03:00
unknown
38c9d9fd04 srv0srv.c:
In background loop run purge to completion before doing other background operations: it does not make sense to flush buffer pool pages if they are soon modified again by purge
trx0purge.c:
  Increase purge_sys->n_pages_handled for every undo log we purge, even if that log would be only a hundred bytes: that way we get the purge batches of 20 pages to set a fresh purge view (limit) more often, and we can reduce the number of old row versions purge has to look at when it decides if it can remove some delete-marked index record


innobase/trx/trx0purge.c:
  Increase purge_sys->n_pages_handled for every undo log we purge, even if that log would be only a hundred bytes: that way we get the purge batches of 20 pages to set a fresh purge view (limit) more often, and we can reduce the number of old row versions purge has to look at when it decides if it can remove some delete-marked index record
innobase/srv/srv0srv.c:
  In background loop run purge to completion before doing other background operations: it does not make sense to flush buffer pool pages if they are soon modified again by purge
2003-07-06 16:17:02 +03:00
unknown
421a462990 missing test case for DISTINCT .. LEFT .. 2003-07-05 16:29:11 +03:00
unknown
57043e331c Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0


sql/sql_parse.cc:
  Auto merged
2003-07-04 23:06:22 +03:00
unknown
4c2d3b0554 Fixed a compatibility bug in mysqlhotcopy between different
versions of DBD. New mysqlhotcopy version supports both old
and new DBD versions while versions elder than 1.19 support
only old DBD versions.
2003-07-04 23:06:21 +03:00
unknown
778fec0c82 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-04 23:06:20 +03:00
unknown
40feb0c617 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-04 22:06:19 +02:00
unknown
4e61b75d8b Remove compiler warnings
Simple cleanup of previous pull


sql/item_strfunc.cc:
  Removed compiler warning
sql/sql_cache.cc:
  Indentation fix
sql/sql_handler.cc:
  Simple ptimization
sql/sql_parse.cc:
  Removed compiler warning
sql/log_event.h:
  Indentation fix
2003-07-04 23:06:19 +03:00
unknown
4e4ab26f53 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.r18.ru:/usr/home/ram/work/4.0
2003-07-05 01:06:18 +05:00
unknown
cdb44cd455 fixed bug #670 2003-07-04 16:06:17 -04:00
unknown
2848b0bed9 merge + order by (bug #515) temporary fix
properly fixed in 4.1
2003-07-04 14:42:57 +02:00
unknown
30341167c5 fix and test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
mysql-test/r/handler.result:
  test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
mysql-test/t/handler.test:
  test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
sql/sql_handler.cc:
  fix for the bug #787: HANDLER without INDEX doesn't work with deleted rows
2003-07-04 17:15:16 +05:00
unknown
b22a797631 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/sql_handler.cc:
  Auto merged
2003-07-04 12:55:46 +02:00