Commit graph

3491 commits

Author SHA1 Message Date
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
unknown
a49f5cae9a Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced.


mysql-test/r/lock_multi.result:
  Bug#4118
    New test for multi-update locking
mysql-test/r/multi_update.result:
  Bug#4118
    Fix test
mysql-test/t/lock_multi.test:
  Bug#4118
    New test for multi-update locking
mysql-test/t/multi_update.test:
  Bug#4118
    Fix test
sql/sql_parse.cc:
  Bug#4118
    Split multi-update to its own case statement in sql_parse.cc
sql/sql_update.cc:
  Bug#4118
    Overview of locking checking:    
      1. Open and acquire READ lock
      2. Check to see which tables need WRITE lock
      3. Unlock tables and relock
sql/sql_yacc.yy:
  Bug#4118
    Split multi-update to its own case statement in sql_parse.cc
2004-10-03 00:20:47 +01:00
unknown
dc3f3ce694 delete.result, delete.test:
A fix (bug #5733: Table handler error with self-join multi-table DELETE).
records.cc:
  A fix (bug #5733: Table handler error with self-join multi-table DELETE).


sql/records.cc:
  ]A fix (bug #5733: Table handler error with self-join multi-table DELETE).
mysql-test/t/delete.test:
  A fix (bug #5733: Table handler error with self-join multi-table DELETE).
mysql-test/r/delete.result:
  A fix (bug #5733: Table handler error with self-join multi-table DELETE).
2004-10-01 16:23:54 +05:00
unknown
6882e87f15 Solve compile problem for 4.0.22 on hpita2. (Backport of a 4.1 change)
sql/mysqld.cc:
  Replace 'sete_id(_)' calls by 'setre_id(-1,_)' calls, as the former
  have no prototypes on some platforms. (Backport of a 4.1 change)
2004-09-30 19:05:33 +02:00
unknown
a8cbb00d5c Merge build.mysql.com:/home/bk/mysql-4.0
into build.mysql.com:/users/rburnett/mysql-4.0
2004-09-27 23:22:08 +02:00
unknown
fb1407d563 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg4131-3


sql/sql_parse.cc:
  Auto merged
2004-09-27 00:50:29 +04:00
unknown
e6f924efe5 Fix for bug #4131 "TIMESTAMP columns missing minutes and seconds when
using GROUP BY"
Now we are setting Field_timestamp::field_length to 19 in open_table()
if we are in new mode (and we are restoring it back when we are coming
back to normal mode). This also should solve potential problems with
some of LOAD DATA INFILE and SELECT * INTO in this mode.


mysql-test/r/type_timestamp.result:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
mysql-test/t/type_timestamp.test:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
sql/field.cc:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode is
  in effect.
  Lot of Field_timestamp code simplified and Field_timestamp::make_field()
  is no longer needed because we are setting field_length to 19 if we are
  in --new mode now.
sql/field.h:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode
  is in effect. 
  Field_timestamp::make_field() is no longer needed because we are setting
  field_length to 19 if we are in --new mode now.
sql/sql_base.cc:
  If --new mode is in effect all TIMESTAMP fields should pretend that they
  have length of 19. We are achieving this by setting 
  Field_timestamp::field_length to 19 (or original value) in open_table().
  We are using TABLE::timestamp_mode variable for avoiding of unnecessary
  looping over all fields of the table and setting field_length if table
  was used with same new_mode value before.
  
  Note: We do not introduce general framework for setting up Field objects
  for usage with current THD here because this fix is only needed in 4.0
  and Monty said that we will also remove looping over all fields when
  updating table_name member at some point. This more general framework
  will also complicate nice optimization with avoiding of unneeded looping.
sql/sql_parse.cc:
  Now when we are creating TIMESTAMP(19) fields by default in --new mode,
  otherwise we will have unaligned behavior between ALTER and CREATE.
sql/table.h:
  Added TABLE::timestamp_mode field for saving information whenever we set 
  field_length members of table's TIMESTAMP fields to 19 (to honor 
  new_mode) or they have original values.
2004-09-27 00:50:00 +04:00
unknown
550c4eb795 Bug #5539 SHOW DATABASES LIKE and symlinks
sql_show.cc:
  Made change suggested by Serge. REmoved else in mysql_find_files so symlink files fall through to the wildcard check


sql/sql_show.cc:
  Made change suggested by Serge. REmoved else in mysql_find_files so symlink files fall through to the wildcard check
2004-09-25 18:43:07 +02:00
unknown
697cb7b106 BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Reworked the HANDLER functions and interface.
Using a HASH to store information on open tables that
survives FLUSH TABLE.
HANDLER tables alias names must now be unique, though it
is allowed in 4.0 to qualify them with the database name
of the base table.


mysql-test/r/flush_table.result:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler test results to handler.result.
  Added the new test results.
mysql-test/r/handler.result:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler test results from flush_table.result to here.
mysql-test/t/flush_table.test:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler tests to handler.test.
  Added new tests.
mysql-test/t/handler.test:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Moved pure handler tests from flush_table.test to here.
sql/mysql_priv.h:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Reworked the handler interface.
sql/sql_base.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Replaced mysql_ha_close_list() by the better named
  function mysql_ha_flush() with readable options.
sql/sql_class.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Added initialization for the handler tables hash.
  Changed the handler tables clean-up code.
  Unreleted to bug: Changed the order of THD initialization
  to avoid warning messages on Linux with gcc.
sql/sql_class.h:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Added the handler tables HASH to THD.
sql/sql_handler.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  Completely reworked the handler functions.
  Added an introducing comment, describing the new functionality.
sql/sql_table.cc:
  BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
  BUG#4335 - one name can be handler open'ed many times.
  replaced mysql_ha_close() by the better named
  function mysql_ha_flush() with readable options.
2004-09-24 18:39:25 +02:00
unknown
c868213373 Fix for BUG#3248 "Doc says MyISAM warns if disk full but it does not":
we force the message to the error log, and we make it more informative;
we treat EDQUOT like ENOSPC.


mysys/errors.c:
  more informative message
mysys/my_fstream.c:
  Treat EDQUOT like ENOSPC.
mysys/my_pread.c:
  Treat EDQUOT like ENOSPC.
mysys/my_write.c:
  Treat EDQUOT like ENOSPC.
mysys/mysys_priv.h:
  Define EDQUOT when it does not exist. Finally decided to put it here after discussion with Monty:
  as this constant is used only in 3 files only in mysys/, I don't make it visible everywhere
  (there currently is no file of choice for such defines; my_base.h does not contain any).
  Using a value which never happens avoids collisions.
sql/mysqld.cc:
  If ME_NOREFRESH, we write message to error log, even if it has been saved for client (because if operation
  is hanging, the message does not get to client now; example is MyISAM waiting for free disk space).
2004-09-24 11:54:37 +02:00
unknown
ecd3172b00 Bug #5539 SHOW DATABASES LIKE and symlinks
sql_show.cc:
  Added wild card check to symdir block in mysql_find_files


sql/sql_show.cc:
  Added wild card check to symdir block in mysql_find_files
2004-09-24 09:00:14 +02:00
unknown
9860a95a3f Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-09-23 17:56:21 +02:00
unknown
0e6975f33b Fix for BUG#5711 "replication SQL thread does not abort on SQL syntax error":
in net_printf(), we fill net->last_* variables for the slave SQL thread to know the error.


sql/net_pkg.cc:
  in net_printf(), store the error in net->last_*, so that slave SQL thread can be aware there was an error reported by net_printf()
  (which is what yacc uses for "you have an error in your syntax").
2004-09-23 14:43:31 +02:00