Commit graph

3503 commits

Author SHA1 Message Date
unknown
baf1c89e3d A fix (bug #6564: QUOTE(NULL) returns NULL, not the string 'NULL') 2004-11-11 18:20:40 +04:00
unknown
12fbc41f5f 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.


sql/log.cc:
  When we write the cached binlog segment to disk binlog at COMMIT/ROLLBACK time:
  imagine this is rollback due to net timeout, after all statements of
  the transaction succeeded. Then we want a zero-error code in BEGIN.
  In other words, if there was a really serious error code it's already
  in the transaction's statement events.
sql/sql_table.cc:
  out of date comment
2004-11-10 15:07:55 +01:00
unknown
4a56b28461 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-11-04 19:19:51 +01:00
unknown
e30bd1e48d 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.


mysql-test/r/mix_innodb_myisam_binlog.result:
  result update
mysql-test/t/mix_innodb_myisam_binlog.test:
  test update for a new bug
sql/log.cc:
  The fact that the transaction log is empty does not mean we're not in a transaction
  (it could be BEGIN; SELECT * FOR UPDATE: then we don't want to commit now).
2004-11-04 19:19:23 +01:00
unknown
1e87c820d1 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg6387
2004-11-04 14:25:08 +03:00
unknown
d259ba4006 Fix for bug #6387 "Queried timestamp values do not match the inserted
value if server runs in time zone with leap seconds".

Now in my_gmt_sec() function we take into account difference between
our target and estimation in seconds part.


mysql-test/Makefile.am:
  Added mysql-test/std_data/Moscow_leap reuired by new timezone3.test
  to source distribution.
sql/time.cc:
  my_gmt_sec():
   When comparing our target broken-down datetime t value and proper 
   representation of our estimation *l_time we should take into account
   that they could differ in second part if we have time zone leap seconds.
   
   Also added comments about some assumptions used in this function.
2004-11-03 17:59:03 +00:00
unknown
1d63509005 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-11-03 11:09:41 +02:00
unknown
9c06c80dff ha_innodb.cc:
Backport Jan's fix of the LOAD DATA INFILE REPLACE duplicate key error bug (Bug #5835) to 4.0


sql/ha_innodb.cc:
  Backport Jan's fix of the LOAD DATA INFILE REPLACE duplicate key error bug (Bug #5835) to 4.0
2004-11-02 13:21:11 +02:00
unknown
3ff74fe4a0 mysqld.cc:
Describe innodb_max_purge_lag
  Improve description of innodb_table_locks


sql/mysqld.cc:
  Describe innodb_max_purge_lag
  Improve description of innodb_table_locks
2004-11-01 12:08:44 +02:00
unknown
33d68675f7 close table before next iteration of table proccesing in mysql_admin_table (to allow open next table) 2004-10-28 21:14:00 +03:00
unknown
11ff375efd - Applied some Windows portability fixes for myisampack.c and sql_handler.cc
(backports from fixes made in 4.1)


myisam/myisampack.c:
   - replaced "1ULL" with "((ulonglong)1)" to resolve a compile error on
     Windows
sql/sql_handler.cc:
   - removed some unused variables
   - added a (byte*) cast to fix a compile error on Windows (backport of a
     fix made in 4.1)
2004-10-27 21:51:27 +02:00
unknown
743597ea96 Backport innodb_max_purge_lag from 4.1
innobase/include/srv0srv.h:
  Add configuration parameter srv_max_purge_lag.
  Add global variable srv_dml_needed_delay.
innobase/include/trx0sys.h:
  Add trx_sys->rseg_history_len
innobase/row/row0mysql.c:
  Add row_mysql_delay_if_needed() for delaying INSERTs, UPDATEs and
  DELETEs for srv_dml_needed_delay microseconds.
innobase/srv/srv0srv.c:
  Define global variable srv_dml_needed_delay.
  Define configuration parameter srv_max_purge_lag.
innobase/trx/trx0purge.c:
  Update trx_sys->rseg_history_len.
  trx_purge(): Compute srv_dml_needed_delay from srv_max_purge_lag
  and trx_sys->rseg_history_len.
innobase/trx/trx0rseg.c:
  Initialize trx_sys->rseg_history_len at InnoDB start-up.
sql/ha_innodb.h:
  Add configuration parameter srv_max_purge_lag.
sql/mysqld.cc:
  Add startup option innodb_max_purge_lag,
  with default value 0 (meaning infinite, disabling the feature).
sql/set_var.cc:
  Add global variable innodb_max_purge_lag.
2004-10-27 13:33:11 +03:00
unknown
9abe7d272b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.0


sql/sql_parse.cc:
  Auto merged
2004-10-24 11:32:08 +03:00
unknown
5ab6c5e532 postreview fixes
sql/mysql_priv.h:
  constant definition
sql/sql_base.cc:
  difine used instead of constant
sql/sql_cache.cc:
  difine used instead of constant
  typo fixed
2004-10-22 22:51:04 +03:00
unknown
a6efe82fee Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.0
2004-10-22 22:10:52 +03:00
unknown
b8847967c8 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.0
2004-10-22 22:08:46 +03:00
unknown
dd126ba1a5 Part of fix for bug #6081 "Call to deprecated mysql_create_db() function
crashes server"

(in 4.0 we fix only connection stalling in case of error, crash itself is
fixed in 4.1, the test case for this code is also there).


sql/sql_parse.cc:
  Handling of COM_CREATE_DB, COM_DROP_DB:
  We should call send_error() if mysql_create_db or mysql_drop_db
  return error (like we do it for SQL versions of these commands).
2004-10-22 19:27:43 +04:00
unknown
e6e1600ec9 Check of temporary tables hiding for query fetched from QC (BUG#6084)
mysql-test/r/query_cache.result:
  hiding real table stored in query cache by temporary table
mysql-test/t/query_cache.test:
  hiding real table stored in query cache by temporary table
sql/sql_cache.cc:
  Check of temporary tables hiding for query fetched from QC
sql/sql_cache.h:
  Key length now stored in table record of query cache
2004-10-21 23:56:12 +03:00
unknown
ec8779e95a Fix test case for innodb-lock
mysql-test/r/innodb-lock.result:
  Fix test case (old one didn't test things correctly)
mysql-test/t/innodb-lock.test:
  Fix test case (old one didn't test things correctly)
mysys/thr_lock.c:
  More debugging information
sql/mysqld.cc:
  Enable innodb_table_locks as default, as otherwise there is a possibility for deadlocks
sql/sql_base.cc:
  More debug information
2004-10-20 16:04:28 +03:00
unknown
ed8ec2cf16 Code cleanups (done during review of new code)
Rename innodb_table_locks_old_behavior -> innodb_table_locks
Set innodb_table_locks to off by default to get same behaviour as in MySQL 4.0.20
(This means that Innodb ignore table locks by default, which makes it easier to combine MyISAM and InnoDB to simulate a transaction)


libmysql/libmysql.c:
  Use ulong instead of unsigned long
  Reuse _dig_vec()
myisam/myisampack.c:
  Simplify code
mysql-test/r/innodb-lock.result:
  new test case
mysql-test/t/innodb-lock.test:
  new test case
sql/ha_innodb.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/mysqld.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
  Set this off by default to get same behaviour as in MySQL 4.0.20
sql/set_var.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/sql_class.h:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
2004-10-20 11:24:08 +03:00
unknown
4324519868 fixed retsult code 2004-10-19 11:54:33 +03:00
unknown
38e717ea13 Merge dellis@bk-internal.mysql.com:/home/bk/mysql-4.0
into goetia.(none):/home/dellis/mysqlab/bk/mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
sql/mysqld.cc:
  Auto merged
2004-10-17 18:47:08 -05:00
unknown
5dfa8d859b mysqld.cc:
BUG #5731 key_buffer_size not properly restricted to 4GB; use UINT_MAX32 for clarity.


sql/mysqld.cc:
  BUG #5731 key_buffer_size not properly restricted to 4GB; use UINT_MAX32 for clarity.
2004-10-17 18:44:51 -05:00
unknown
7723eb0258 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-10-15 14:38:59 +03:00
unknown
c461eb866e Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug5625


sql/ha_myisam.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-10-14 20:04:47 +02:00
unknown
fc27da0879 BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
Added a try to a normal repair() if repair_by_sort() failed.
This was not done with ENABLE KEYS and OPTIMIZE TABLE.
Fixed error code handling in mysql_alter_table().


sql/ha_myisam.cc:
  BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
  Added a try to a normal repair() if repair_by_sort() failed.
  This was not done with ENABLE KEYS and OPTIMIZE TABLE.
sql/sql_table.cc:
  BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
  Added a translation from 'bool' return value to '< 0' error indication,
  which is used within mysql_execute_command() and must as such be
  handed over by mysql_alter_table(). A returncode >= 0 is interpreted
  as 'I have already called send_ok()'.
2004-10-14 20:02:56 +02:00
unknown
f0ed73d874 Added startup option and settable session variable
innodb_table_locks_old_behavior: do not acquire an
InnoDB table lock for LOCK TABLES, as in mysql-4.0.18
and earlier.


sql/ha_innodb.cc:
  Do not acquire an InnoDB table lock for LOCK TABLES if
  innodb_table_locks_old_behavior is enabled.
sql/mysqld.cc:
  Added innodb_table_locks_old_behavior
sql/set_var.cc:
  Added innodb_table_locks_old_behavior
sql/sql_class.h:
  Added innodb_table_locks_old_behavior
2004-10-13 22:54:21 +03:00
unknown
eb3b048000 ha_innodb.cc:
Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table referenced by a FOREIGN KEY constraint; this error number is less misleading than the previous value HA_ERR_CANNOT_ADD_FOREIGN, but misleading still; we should introduce to 5.0 a proper MySQL error code


sql/ha_innodb.cc:
  Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table referenced by a FOREIGN KEY constraint; this error number is less misleading than the previous value HA_ERR_CANNOT_ADD_FOREIGN, but misleading still; we should introduce to 5.0 a proper MySQL error code
2004-10-12 18:12:00 +03:00
unknown
a66a4dfb59 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-10-11 11:02:24 +02:00
unknown
c5f9a412ce Fix for BUG#5949 "error code 1223 in binlog when using innobackup":
when one connection had done FLUSH TABLES WITH READ LOCK, some updates, and then COMMIT,
it was accepted but my_error() was called and so, while client got no error, error was logged in binlog.
We now don't call my_error() in this case; we assume the connection know what it does.
This problem was specific to 4.0.21. The change is needed to make replication work with existing versions of innobackup.


sql/lock.cc:
  If a connection has done FLUSH TABLES WITH READ LOCK and now is doing COMMIT, don't give error
  (applies only if it's the same connection; others' COMMITs are still blocked).
2004-10-11 11:01:38 +02:00
unknown
e98bd143a7 Using MySQL 4.0 with privilege tables from 5.0 caused a crash.
(Fixed this by backporting some logic from 4.1)
2004-10-08 16:32:56 +03:00
unknown
fe46310640 Code cleanups while doing review of pushed code
myisam/mi_locking.c:
  More comments
sql/mysql_priv.h:
  Change mode to uint (as it's a bitmap)
sql/sql_handler.cc:
  Change mode to uint (as it's a bitmap)
  Fixed DBUG_PRINT to use same format as other MySQL code
2004-10-06 17:20:39 +03:00
unknown
95e1c07483 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b5733


sql/records.cc:
  Auto merged
2004-10-06 12:49:56 +05:00
unknown
4d93bb9562 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0


sql/sql_table.cc:
  Auto merged
2004-10-06 01:25:55 +03:00
unknown
0d76cb7ea4 Reverted patch for new usage of open_count as it caused more problems than it solved
Cleaned up patch for checking locks for multi-table updates


myisam/mi_close.c:
  Reverted patch for new usage of open_counts
myisam/mi_locking.c:
  Reverted patch for new usage of open_counts
sql/ha_myisam.cc:
  Reverted patch for new usage of open_counts
sql/handler.cc:
  Removed compiler warning
sql/sql_acl.cc:
  Removed compiler warning
sql/sql_table.cc:
  No need to unlock after failed call to external_lock()
sql/sql_update.cc:
  Cleaned up (and made it more secure) patch for checking locks for multi-table updates
2004-10-06 01:24:21 +03:00
unknown
cd430fbfb6 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0
2004-10-05 21:21:27 +05:00
unknown
1539b03934 Fix for #5730 (Query cache crashes server)
Recusive part leads to stack overflow


sql/sql_cache.cc:
  Recursion removed from Query_cache::allocate_data_chain
2004-10-05 21:19:40 +05:00
unknown
513ef79dae Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-10-05 17:12:16 +03:00
unknown
c36a75a809 Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-10-05 15:15:45 +03:00
unknown
99e3f21c74 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
2004-10-05 14:54:40 +03:00
unknown
83b5480722 Fix for wrongly calculated Examined_rows in 4.0 UNION's.
sql/sql_union.cc:
  Fixing a non-critical bug in 4.0 UNION's which results in erronously 
  calculated number o fexamined rows. This value is displayed in the 
  slow query log.
  
  This is a bug number #5879.
2004-10-05 14:47:10 +03:00
unknown
786a178795 Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0
2004-10-05 12:05:13 +02:00
unknown
174f07fcb4 Merge mysql.com:/M40/mysql-4.0 into mysql.com:/M40/push-4.0 2004-10-05 11:33:57 +02:00
unknown
7ce31065c6 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug4286


sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-10-05 11:33:13 +02:00
unknown
c0364263d9 patch fixing after review on patch-fixing of
Bug #5492 
"set @@session.read_rnd_buffer_size=33554432" crashes server on query

1. added warning comments for uint3korr (need one more byte allocated)
2. unsigned long in uint3korr was replaced by unsigned int to 
   avoid problems on 64-bits platforms
3. shorten warning comments in init_rr_cache in sql/records.cc


include/config-win.h:
  1. added warning comments for uint3korr (need one more byte allocated)
  2. unsigned long in uint3korr was replaced by unsigned int to 
     avoid problems on 64-bits platforms
include/my_global.h:
  1. added warning comments for uint3korr (need one more byte allocated)
  2. unsigned long in uint3korr was replaced by unsigned int to 
     avoid problems on 64-bits platforms
sql/records.cc:
  shorten warning comments for my_malloc_lock in init_rr_cache
2004-10-04 23:26:42 +05:00
unknown
cef86787db Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_5492/mysql-4.0
2004-10-04 21:30:45 +05:00
unknown
fcf273821a Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-10-04 15:17:32 +03:00
unknown
06a393083f mysqld.cc:
BUG #5731 Restrict key_buffer_size to 4GB on 64 bit platforms


sql/mysqld.cc:
  BUG #5731 Restrict key_buffer_size to 4GB on 64 bit platforms
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-10-03 10:00:26 -05:00
unknown
3447469515 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.0
into ltantony.rdg.cyberkinetica.homeunix.net:/usr/home/antony/work/bug4118
2004-10-03 00:25:51 +01:00
unknown
52ee9687a2 Merge ltantony.rdg.cyberkinetica.homeunix.net:/usr/home/staff/repositories/mysql-4.0
into ltantony.rdg.cyberkinetica.homeunix.net:/usr/home/antony/work/bug4118


sql/sql_parse.cc:
  Auto merged
2004-10-03 00:25:09 +01:00