Commit graph

3685 commits

Author SHA1 Message Date
unknown
9b76bca8cf Some minor fixes for Netware. These were required after we started building
against a later version of libc.


include/config-netware.h:
  Changes for Netware. Needed to build against newer libc.
netware/BUILD/nwbootstrap:
  Fix to build script.
sql/mysqld.cc:
  Added an include.
2005-08-18 21:26:25 +03:00
unknown
307ed9b4da block using QC in case of having tables locked by LOCK... (BUG#12385)
sql/sql_cache.cc:
  block QC using if tables are locked with LOCK
  unlock QC
mysql-test/r/query_cache_noembeded.result:
  New BitKeeper file ``mysql-test/r/query_cache_noembeded.result''
mysql-test/t/query_cache_noembeded.test:
  New BitKeeper file ``mysql-test/t/query_cache_noembeded.test''
2005-08-10 18:58:55 +03:00
unknown
04bf09424d Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.0
into  krsna.patg.net:/home/patg/mysql-build/mysql-4.0
2005-08-04 15:48:01 -07:00
unknown
076c375ab5 ha_innodb.cc:
Fix compilation error in previous commit


sql/ha_innodb.cc:
  Fix compilation error in previous commit
2005-08-03 18:47:50 +03:00
unknown
43b1710c51 ha_innodb.cc:
Backport of Bug #9670 to 4.0: assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED)


sql/ha_innodb.cc:
  Backport of Bug #9670 to 4.0: assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED)
2005-08-03 18:11:55 +03:00
unknown
16c4593089 BUG 11104 (same as changeset 1.1891 on the 5.0 tree, but realised this
needed to be fixed in earlier versions)
Fixed the iteration of how substrings are handled with negative indexes in 
SUBSTRING_INDEX


mysql-test/r/func_str.result:
  New results for the fix to substring_index
mysql-test/t/func_str.test:
  Added tests for fix to substring_index, various lenth search patterns. Also included
  are the queuries the user who reported the bug listed in the bug report
sql/item_strfunc.cc:
  Fix to BUG 11104 
      Took out the offset-=delimiter_length-1 out of the for loop. It was causing
      basically this: 
      select substring_index('the king of the the hill', 'the', -2) to not work.
      The first iteration, offset would be initialised to 24, then strstr would 
      point at 'the king of the the* hill' ('*'means right before the 
      character following), returning a offset of 16. The for loop would then 
      decrement offset by two (3 - 1), to 14, now pointing at 
      "the king of th*e the hill", _skipping_ past the 'e' in the second to last
      'the', and therefore strstr would never have a chance of matching the 
      second to last 'the', then moving on to the 'the' at the begginning of the 
      string!
  
      In a nutshell, offset was being decremented by too great a value, preventing
      the second to last 'the' from being ever found, hence the result of 
      'king of the the hill' from the query that is reported in the bug report
2005-07-31 21:28:52 -07:00
unknown
90e41facf7 Review fixes:
Fixed portability problem with bool in C programs
Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
my_sleep() -> pthread_cond_timedwait()


include/thr_lock.h:
  bool -> my_bool (bool is not portable in C programs)
mysys/thr_lock.c:
  bool -> my_bool (bool is not portable in C programs)
sql/lock.cc:
  Added comment
  Don't use | on bool variable
sql/mysql_priv.h:
  Added comment
sql/slave.cc:
  Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
sql/sql_base.cc:
  Added comments
  my_sleep() -> pthread_cond_timedwait() to get less code and potentitally faster loop
BitKeeper/etc/ignore:
  added ac_available_languages_fragment
2005-07-26 17:55:58 +03:00
unknown
01ebc69db4 Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-4.0
into  mysql.com:/home/stewart/Documents/MySQL/4.0/main
2005-07-22 12:52:06 +10:00
unknown
af1dfb613b Bug #10600 After review fixes
sql/lock.cc:
  Used flags immediately in call
sql/mysql_priv.h:
  Added RTFC (short for remove_table_from_cache)
  for constants and used hex syntax to clarify it is bits
  in the flags
sql/sql_base.cc:
  Use flags parameter immediately and use flags immediately in call
  Change to other variant of eternal loop variant
sql/sql_table.cc:
  Use flags immediately in call
2005-07-20 21:19:01 +02:00
unknown
6d29b23b15 Bug #10600
remove_table_from_cache fails to signal other thread and gets
blocked when other thread also gets blocked


include/thr_lock.h:
  Report if any threads was signalled
mysys/thr_lock.c:
  Report if any threads was signalled
sql/lock.cc:
  Report if any threads was signalled
  Use new interface for remove_table_from_cache
sql/mysql_priv.h:
  New interface for remove_table_from_cache
  + mysql_lock_abort_for_thread
sql/sql_base.cc:
  Use new interface of remove_table_cache
  Rewrote remove_table_from_cache to fix bug
sql/sql_table.cc:
  Use new interface of remove_table_from_cache
2005-07-19 00:29:19 +02:00
unknown
7f8b23344a BUG#11384 drop database causes mysqld to core
Only reproducable in 5.1-wl2325, although the missing code is missing from 4.0 and up.


sql/slave.cc:
  Clean up after slave sql thread when exiting.
  
  Wasn't calling close_thread_tables().
  
  This was causing a crashing bug in the 5.1-wl2325 tree. It is conceivable that this
  could cause a problem in earlier versions, but we have not been able to reproduce.
2005-07-14 17:33:35 +10:00
unknown
9d5a45c2f3 - backport of a compile fix from 4.1 (ChangeSet@1.2260.23.2 2005/05/19 from reggie)
"changed dl_name to udf->dl in mysql_create_function"
2005-06-30 17:33:23 +02:00
unknown
74dd642177 sql_repl.cc:
Bug #11064  	some read error not detected in replication on 64-bit platform


sql/sql_repl.cc:
  Bug #11064  	some read error not detected in replication on 64-bit platform
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-06-03 11:16:37 +02:00
unknown
cf2188ca39 Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
Used the new option in create_table_from_items().
It is necessary to prevent the SELECT table from being reopend.
It would get new storage assigned for its fields, while the
SELECT part of the command would still use the old (freed) storage.
2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
against a global read lock. This prevents a deadlock in
CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
and avoids the creation of new tables during a global read lock.
3.) Replaced set_protect_against_global_read_lock() and
unset_protect_against_global_read_lock() by
wait_if_global_read_lock() and start_waiting_global_read_lock()
in the INSERT DELAYED handling.


mysql-test/r/create.result:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added test results.
mysql-test/t/create.test:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added tests which do not require concurrency.
sql/lock.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
  Changed the parameter list.
  Removed two unnecessary functions. Their functionality is included in
  wait_if_global_read_lock() and start_waiting_global_read_lock().
sql/mysql_priv.h:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Changed the declaration of mysql_lock_tables().
  Added definitions for the new options.
sql/sql_acl.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_base.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_handler.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_insert.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Replaced set_protect_against_global_read_lock() and
  unset_protect_against_global_read_lock() by
  wait_if_global_read_lock() and start_waiting_global_read_lock()
  in the INSERT DELAYED handling.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_parse.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
  against a global read lock. This prevents a deadlock in
  CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
  and avoids the creation of new tables during a global read lock.
sql/sql_table.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
  Used the new option in create_table_from_items().
2005-05-31 11:08:14 +02:00
unknown
dae940d11e Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2005-05-18 21:36:46 +02:00
unknown
e507f6a15e udf: when banning paths from soname in CREATE FUNCTION, check for \ on windows.
when reporting an error, use an appropriate buffer for udf->name
2005-05-18 21:31:39 +02:00
unknown
b11b13e9bd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0-bug10095
2005-05-15 22:58:10 +02:00
unknown
06736ab48a Fix for BUG#10095: {wrong query results because of incorrect constant propagation}
The problem: base_list::remove didn't modify base_list::last when removing 
the last list element.
The fix: If we remove the last element, find the element before it (by walking
from the beginning of the list) and set base_list::last accordingly.

The list gets corrupted in both 4.0 and 4.1. There are no visible problems in 
current 4.1 because current 4.1 doesn't call where_cond->fix_fields() after 
constant propagation step.


mysql-test/r/select.result:
  Testcase for BUG#10095
mysql-test/t/select.test:
  Testcase for BUG#10095
sql/sql_list.h:
  Fix for BUG#10095: {wrong query results because of incorrect constant propagation} 
  The problem: base_list::remove didn't modify base_list::last when removing 
  the last list element.
  The fix: If we remove the last element, find the element before it (by walking
  from the beginning of the list) and set base_list::last accordingly.
2005-05-15 22:56:45 +02:00
unknown
faa12bf0c7 Fixed compiler failure 2005-05-14 17:08:43 +03:00
unknown
7c441dd115 Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
(Previously a CREATE TABLE with a lot of null fields that was part of a primary key caused MySQL to wrongly count the number of bytes needed to store null bits)
This is a more complete bug fix for #6236


mysql-test/r/alter_table.result:
  More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
mysql-test/t/alter_table.test:
  More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
sql/handler.h:
  Add counter for null fields
sql/sql_table.cc:
  Change create_field->offset to store offset from start of fields, independent of null bits.
  Count null_bits separately from field offsets and adjust them in case of primary key parts.
sql/unireg.cc:
  Change create_field->offset to store offset from start of fields, independent of null bits.
  Count null_bits separately from field offsets and adjust them in case of primary key parts.
2005-05-13 11:11:50 +03:00
unknown
4d1c68f8d1 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.0
into ltantony.mysql.com:/usr/home/antony/work2/megapatch-4.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-08 23:24:33 +01:00
unknown
cdfc786f69 Merge ltantony.mysql.com:/usr/home/antony/work2/p4-bug8191
into ltantony.mysql.com:/usr/home/antony/work2/megapatch-4.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-08 23:07:46 +01:00
unknown
3ac2df4e4c Bug#8191 - SELECT INTO OUTFILE insists on FROM clause
Fix bug + include test case.
  Enable outfile tests.


mysql-test/t/outfile.test:
  Reenable outfile tests
  Add test for Bug#8191
sql/sql_yacc.yy:
  Fix Bug#8191
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-08 22:56:58 +01:00
unknown
3e1dad4115 Bug#6236
Incomplete ALTER TABLE breaks MERGE compatibility
  Fix implicit NOT NULL not set on ALTER of PK columns


mysql-test/r/alter_table.result:
  Test for Bug#6236
mysql-test/t/alter_table.test:
  Test for Bug#6236
sql/sql_table.cc:
  Implicit NOT NULL not set on ALTER of PK columns
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-08 21:03:50 +01:00
unknown
1cdcc4f6b1 Merge bk-internal:/home/bk/mysql-4.0
into ultrafly.mysql.com:/Users/mwagner/work/bk/mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-07 22:08:05 +02:00
unknown
d868738e11 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/svoj/devel/mysql/7709-mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-07 21:39:29 +05:00
unknown
6e13083d65 errmsg.txt:
Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).


sql/share/czech/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/danish/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/dutch/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/english/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/estonian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/french/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/german/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/greek/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/hungarian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/italian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/japanese/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/korean/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/norwegian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/norwegian-ny/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/polish/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/portuguese/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/romanian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/russian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/slovak/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/spanish/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/swedish/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
sql/share/ukrainian/errmsg.txt:
  Add newline at EOF for proper processing by comp-err.exe on Windows where fgets() works differently than Linux (Bug #6195).
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-07 15:11:31 +02:00
unknown
1392f4820a BUG#7709 fix - Boolean fulltext query against unsupported engines does not
fail.


mysql-test/r/innodb.result:
  Test case for BUG#7709 - Boolean fulltext query against
  unsupported engines does not fail added.
mysql-test/t/innodb.test:
  Test case for BUG#7709 - Boolean fulltext query against
  unsupported engines does not fail added.
sql/item_func.cc:
  Check if table supports fulltext.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-07 15:48:56 +05:00
unknown
1570873c6b [backport of 4.1, because 4.0 autobuild now hits the same problem;
when merging just use "ul"] In configure.in, don't remove $AVAILABLE_LANGUAGES_ERRORS_RULES at end
because config.status may later need this file (if it does not find it
it won't incorporate dependencies of errmsg.sys in sql/share/Makefile).
In sql/share/Makefile.am using "all:" leads to double-"all:" in Makefile.


configure.in:
  Don't remove $AVAILABLE_LANGUAGES_ERRORS_RULES at end of configure.in
  because config.status may later need this file (if it does not find it
  it won't incorporate dependencies of errmsg.sys in sql/share/Makefile :( )
sql/share/Makefile.am:
  using "all:" leads to double-"all:" in Makefile (counting the auto-generated);
  all-local is the standard way to :
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-07 11:35:14 +02:00
unknown
079910b6f1 Bug#6616
MySQL server 100% CPU if FLUSH TABLES WITH READ LOCK + INSERT
  Infinite loop caused by missing update to thd version.


sql/sql_base.cc:
  Bug#6616
    thd version needs to be updated before reopening tables
    to prevent an infinite loop.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-06 14:42:28 +01:00
unknown
f63c8f53b0 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
Added protection against global read lock while creating and
initializing a delayed insert handler.
Allowed to ignore a global read lock when locking the table
inside the delayed insert handler.
Added some minor improvements.


sql/lock.cc:
  Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
  Changed mysql_lock_tables() to allow for ignoring global read lock.
  Added functions to set/unset protection against global read lock.
sql/mysql_priv.h:
  Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
  Changed existing and added new function declarations.
sql/sql_insert.cc:
  Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
  Added and extended some comments.
  Added a protection against global read lock while a handler is
  created and initialized.
  Moved the unlock of the delayed insert object past its last usage
  in delayed_get_table().
  Changed the table locking in handle_delayed_insert() so that it
  does not wait for global read lock.
2005-04-27 12:40:37 +02:00
unknown
1f1a579aa9 - added missing copyright headers to several Makefile.am's (noticed
while testing changes to the mysql-copyright scripts


libmysqld/examples/Makefile.am:
  - added a copyright header
sql/share/Makefile.am:
  - added a copyright header
tools/Makefile.am:
  - added a copyright header
2005-04-19 17:00:05 +02:00
unknown
e2d9929d2c BUG#9922 - INSERT SELECT with UNIONs allows concurrent INSERTs
don't set lex->lock_option=TL_READ in the parser for SELECT
2005-04-15 19:20:15 +02:00
unknown
2a8f6bb188 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2005-04-14 22:09:38 +02:00
unknown
1403fb000b TRUNCATE is always a transaction on itself. pretent we're in auto-commit mode
bug#8151
2005-04-14 18:14:54 +02:00
unknown
3e0a626367 Fix for bug #9796 "Query Cache caches queries with CURRENT_USER()
function".

We should not cache queries using CURRENT_USER() function as we do it
for some other functions, e.g. USER() function.


mysql-test/r/query_cache.result:
  Let us test that queries with CURRENT_USER() function are not cached.
mysql-test/t/query_cache.test:
  Let us test that queries with CURRENT_USER() function are not cached.
sql/item_create.cc:
  create_func_current_user():
    We should not cache queries which use CURRENT_USER() function.
2005-04-11 00:30:23 +04:00
unknown
64978db186 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg8894
2005-04-03 09:48:09 +04:00
unknown
7d865e0b12 bug#3891 - DROP TABLE many-unexistent-tables, was printing an error with %s instead of table names
sql/sql_table.cc: print an error with a function that respects width modifiers (%.64s)


mysql-test/r/drop.result:
  bug#3891 - DROP TABLE many-unexistent-tables, was printing an error with %s instead of table names
mysql-test/t/drop.test:
  bug#3891 - DROP TABLE many-unexistent-tables, was printing an error with %s instead of table names
sql/share/english/errmsg.txt:
  allow longer "table names" as DROP TABLE puts a list here
sql/share/russian/errmsg.txt:
  allow longer "table names" as DROP TABLE puts a list here
sql/share/ukrainian/errmsg.txt:
  allow longer "table names" as DROP TABLE puts a list here
sql/sql_table.cc:
  print an error with a function that respects width modifiers (%.64s)
2005-04-02 20:13:19 +02:00
unknown
fe811dd892 don't strcmp db if it's a pattern 2005-03-30 10:43:24 +02:00
unknown
22f6c58bb1 Fix for bug #8894 "TIMESTAMP values scrambled/misaligned when using --new".
Fixed Field_timestamp::val_int() so now it works correctly in --new mode
(or for TIMESTAMP(19) columns). 
Also removed unused Field_timestamp::fill_and_store() method.


mysql-test/r/type_timestamp.result:
  Added test for bug #8894 "TIMESTAMP values scrambled/misaligned when 
  using --new".
mysql-test/t/type_timestamp.test:
  Added test for bug #8894 "TIMESTAMP values scrambled/misaligned when 
  using --new".
sql/field.cc:
  Field_timestamp::fill_and_store() 
    Removed unused method.
  Field_timestamp::val_int()
    Even in --new mode integer representation of TIMESTAMP value should
    not exceed 14 digits.
sql/field.h:
  Removed unused Field_timestamp::fill_and_store() method.
2005-03-28 23:36:25 +04:00
unknown
606ee28d2a Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2005-03-26 19:49:17 +01:00
unknown
7f7f4f30b3 fixes for "backport wild_compare fix from 4.1 - bug#3924"
sql/sql_acl.cc:
  don't use acl_cache for GRANT
sql/sql_parse.cc:
  fixed backporting error in "backport wild_compare fix from 4.1 - bug#3924"
2005-03-26 19:46:42 +01:00
unknown
05534c4df0 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into quadxeon.mysql.com:/nfstmp1/guilhem/mysql-4.0-4xeon


BitKeeper/etc/logging_ok:
  auto-union
2005-03-17 15:51:52 +01:00
unknown
93c928d3a7 safer creation of temp files used in replication of LOAD DATA INFILE.
When we come to create these, they may already exist and it's necessary to delete these old, useless copies.


BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-03-17 14:39:39 +01:00
unknown
7ceb5c6cef A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop).
sql/key.cc:
  A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop).
  For "partial" key parts (e.g. key(a(20), ...) we create different
  key_part->field, see sql/table.cc; so we have to use the eq() 
  function here to compare fields.
2005-03-17 10:24:50 +04:00
unknown
7c90fa7b2c Fix for BUG#8711: "<=>" may have true value for NULL arguments, so make
Item_func_equal::not_null_tables() always return 0.


mysql-test/r/join_outer.result:
  Testcase for BUG#8711
mysql-test/t/join_outer.test:
  Testcase for BUG#8711
sql/item_cmpfunc.h:
  Fix for BUG#8711: "<=>" may have true value for NULL arguments, i.e. it can accept NULL-complemented 
  table rows. This differs from assumptions made in Item_func::not_null_tables(), so add 
  Item_func_equal::not_null_tables().
  Item_func_equal::not_null_tables_cache value doesn't make sense now, but we still let it be
  calculated (and ignore it)
2005-03-11 02:17:03 +03:00
unknown
44d66d26dc func_str.result, func_str.test:
Added a test case for bug #8669.
item_strfunc.cc:
  Fixed bug #8669.
  Function AES_DECRYPT can return NULL value.


sql/item_strfunc.cc:
  Fixed bug #8669.
  Function AES_DECRYPT can return NULL value.
mysql-test/t/func_str.test:
  Added a test case for bug #8669.
mysql-test/r/func_str.result:
  Added a test case for bug #8669.
2005-03-09 00:15:51 -08:00
unknown
fd35e7870a Fix for bug#8978 : Crash on 'select format ...' 2005-03-07 18:56:18 +03:00
unknown
16874ec6f5 Changed C++ style comment to C style for 'sql/net_serv.cc' which will be symlinked
to 'libmysql/net.c'.


sql/net_serv.cc:
  Even though this is (by name) a C++ file, it is later symlinked to 'libmysql/net.c'
  and so the source will be treated as plain C: No C++ comments in here!
2005-03-04 11:07:56 +01:00
unknown
4e09f68e87 typos fixed 2005-03-03 23:10:23 +01:00
unknown
9a420a4f7b Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2005-03-03 21:13:57 +01:00
unknown
f49cf0f229 uninit variable fixed 2005-03-03 21:13:33 +01:00
unknown
8104faa083 Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it)
include/my_global.h:
  O_NOFOLLOW
isam/create.c:
  create table files with O_EXCL|O_NOFOLLOW
merge/mrg_create.c:
  create table files with O_EXCL|O_NOFOLLOW
myisam/mi_create.c:
  create files of temporary tables with O_EXCL|O_NOFOLLOW
myisammrg/myrg_create.c:
  create table files with O_EXCL|O_NOFOLLOW
mysys/mf_tempfile.c:
  create temporary files with O_EXCL|O_NOFOLLOW
sql/ha_myisam.cc:
  let mi_create know if the table is TEMPORARY
sql/mysql_priv.h:
  --allow_suspicious_udfs
sql/mysqld.cc:
  --allow_suspicious_udfs
sql/share/english/errmsg.txt:
  typo
sql/sql_udf.cc:
  --allow_suspicious_udfs
  don't allow xxx() udf without any of xxx_init/deinit/add/reset
  check paths when loading from mysql.func
sql/table.cc:
  create frm of temporary table with O_EXCL|O_NOFOLLOW
2005-03-03 19:51:29 +01:00
unknown
ebdbe9e5c3 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0-look
2005-02-28 15:40:45 +03:00
unknown
6a0e1def63 Merge mysql.com:/home/bkroot/mysql-4.0
into mysql.com:/home/bk/b8412-mysql-4.0
2005-02-23 19:40:31 +01:00
unknown
41a329f9a1 Merge mysql.com:/home/bkroot/mysql-4.0
into mysql.com:/home/bk/b7879-mysql-4.0


sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-02-18 13:50:19 +01:00
unknown
d6157becb3 Merge rurik.mysql.com:/home/igor/mysql-4.0
into rurik.mysql.com:/home/igor/dev/mysql-4.0-0
2005-02-15 18:48:04 -08:00
unknown
f1a97c0c49 delete.result, delete.test:
Added a test case for bug #8392.
sql_delete.cc:
  Fixed bug #8392.
  The bug caused a crash for a delete statement with ORDER BY
  that explicitly referred to the modified table.


sql/sql_delete.cc:
  Fixed bug #8392.
  The bug caused a crash for a delete statement with ORDER BY
  that explicitly referred to the modified table.
mysql-test/t/delete.test:
  Added a test case for bug #8392.
mysql-test/r/delete.result:
  Added a test case for bug #8392.
2005-02-15 18:45:42 -08:00
unknown
c7b5773551 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-02-15 14:42:14 +02:00
unknown
358cfd6c42 Better bug fix for #5569: "Incorrect "Access Denied" error with SAME login DIFFERENT host"
This fixes also the reverse lookup bug introduced by the previous patch



mysql-test/t/group_by.test:
  Remove empty line
vio/viosocket.c:
  Added function comment
2005-02-15 14:42:13 +02:00
unknown
95dec435c2 Bug#7879: Using TL_READ_NO_INSERT locks instead of TL_READ locks when
reading tables in "complex" SQL statements. If inserts happen in a
table being read, the statements have no serialization order and the
change can therefore not be reproduced on the slave.


sql/sql_update.cc:
  Switching to using T_READ_NO_INSERT when the binlog is used.
sql/sql_yacc.yy:
  Switching to using T_READ_NO_INSERT when the binlog is used.
2005-02-15 11:02:01 +01:00
unknown
658bac84bf InnoDB: Create temporary files in the MySQL tmpdir instead of $TMPDIR.
(Bug #5822)


sql/ha_innodb.cc:
  innobase_mysql_tmpfile(): pass mysql_tmpdir to create_temp_file(),
  so that the MySQL startup option tmpdir will be honored instead of
  the environment variable TMPDIR. (Bug #5822)
2005-02-15 11:16:17 +02:00
unknown
8a8d476453 Bug#8412: For replication to work correctly, the prologue and
epilogue to an SQL statement should not have an error code even
when the SQL statement itself has an error code.


mysql-test/r/rpl_insert_id.result:
  Adding test to ensure that slave handles error statement gracefully.
mysql-test/t/rpl_insert_id.test:
  Adding test to ensure that slave handles error statement gracefully.
sql/log.cc:
  Setting error code to 0 for SQL statement prologue and epilogue.
2005-02-14 18:39:33 +01:00
unknown
b7fadca152 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.0
2005-02-13 11:18:55 +02:00
unknown
537531f0e8 Fixed mistyping (thnx to Konstantin)
sql/sql_cache.cc:
  Fixed mistyping
2005-02-11 21:57:37 +02:00
unknown
aa3727d7dc select.result:
After revision of the fix for bug #7520.
table.cc:
  Revised the fix for bug #7520.
  Made it compliant with 5.0 code where the bug does not exist.


sql/table.cc:
  Revised the fix for bug #7520.
  Made it compliant with 5.0 code where the bug does not exist.
mysql-test/r/select.result:
  After revision of the fix for bug #7520.
2005-02-11 10:39:26 -08:00
unknown
9540945624 select.result, select.test:
Added a test case for bug #7520.
table.cc:
  Fixed bug #7520.
  The bug was caused by a wrong calculation of the field max_key_length for
  a TABLE structure when there was an index on a blob field.


sql/table.cc:
  Fixed bug #7520.
  The bug was caused by a wrong calculation of the field max_key_length for
  a TABLE structure when there was an index on a blob field.
mysql-test/t/select.test:
  Added a test case for bug #7520.
mysql-test/r/select.result:
  Added a test case for bug #7520.
2005-02-10 22:15:38 -08:00
unknown
df1fab9d45 Fix for BUG#7519: Index statistics is not displayed after ANALYZE for temporary tables:
Call file->extra() with HA_STATUS_CONST in mysqld_show_keys.
The fix will not be merged into 4.1/5.0 because they don't have this problem already.


mysql-test/r/show_check.result:
  Testcase for BUG#7519
mysql-test/t/show_check.test:
  Testcase for BUG#7519
sql/sql_show.cc:
  Fix for BUG#7519: Index statistics is not displayed after ANALYZE for temporary tables:
  When handling "SHOW INDEX" the call file->extra(HA_STATUS_CONST | ...) is made for regular tables 
  but bypassed for temporary tables. 
  Call file->extra() with HA_STATUS_CONST in mysqld_show_keys to make sure we're always using the 
  current index cardinality values.
2005-02-05 06:23:23 +03:00
unknown
6d0d03dab9 Fix QUOTE() to not reuse the input field for output, which resulted in
incorrect results when the input was a constant across a multi-row SELECT
statement. (Bug #8248)


sql/item_strfunc.h:
  Add tmp_value member
sql/item_strfunc.cc:
  Always allocate a new string for QUOTE(), in case the field is being reused
  for multiple rows.
mysql-test/t/func_str.test:
  Add regression test
mysql-test/r/func_str.result:
  Add test results
2005-02-01 18:29:10 -08:00
unknown
faca00b5d5 Merge mysql.com:/home/jimw/my/mysql-4.0-5569
into mysql.com:/home/jimw/my/mysql-4.0-clean


sql/sql_parse.cc:
  Auto merged
2005-02-01 15:38:27 -08:00
unknown
7da72c932e Remove #if 0 as this only confuses the code withing adding anything 2005-02-01 15:36:48 +02:00
unknown
30025f3fdc Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-31 09:34:34 +02:00
unknown
934fde094c Bug#7011
Fix replication for multi-update
  new test - rpl_multi_update2


sql/mysql_priv.h:
  Bug#7011
    New function mysql_multi_update_lock()
sql/sql_parse.cc:
  Bug#7011
    New function check_multi_update_lock()
    For multi-update on slave, perform an early open&lock
sql/sql_update.cc:
  Bug#7011
    Split out multi-update locking into its own function,
      mysql_multi_update_lock()
2005-01-30 10:24:03 +00:00
unknown
0b7ca5e847 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-28 14:17:49 +02:00
unknown
a12d52a1d7 InnoDB: Tolerate negative return values from ftell().
sql/ha_innodb.cc:
  Tolerate negative return values from ftell().
2005-01-27 14:05:44 +02:00
unknown
f7ad204606 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-26 14:07:40 +02:00
unknown
360d32f201 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000
2005-01-26 09:07:25 +01:00
unknown
8deafa8037 order_by.result, order_by.test:
Added a test case for bug #7672.
sql_yacc.yy:
  Fixed bug #7672.
  Made queries of the form (SELECT ...) ORDER BY ... to
  be equivalent to SELECT ... ORDER BY ...


sql/sql_yacc.yy:
  Fixed bug #7672.
  Made queries of the form (SELECT ...) ORDER BY ... to
  be equivalent to SELECT ... ORDER BY ...
mysql-test/t/order_by.test:
  Added a test case for bug #7672.
mysql-test/r/order_by.result:
  Added a test case for bug #7672.
2005-01-25 14:30:38 -08:00
unknown
e1b8a004fe Always call vio_in_addr() so that thd->remote is
always initialized. (Bug #5569)


vio/viosocket.c:
  Remove comment that is no longer correct
sql/sql_parse.cc:
  Always call vio_in_addr() on successful connection,
  so that thd->remote always gets set
vio/viossl.c:
  Remove comment that is no longer correct
2005-01-25 12:06:55 -08:00
unknown
f35117ea34 InnoDB: Backport innodb_autoextend_increment from 4.1
innobase/include/srv0srv.h:
  Add configuration variable srv_auto_extend_increment
innobase/srv/srv0srv.c:
  Add configuration variable srv_auto_extend_increment
sql/ha_innodb.h:
  Add configuration variable srv_auto_extend_increment
sql/mysqld.cc:
  Add startup option innodb_autoextend_increment
sql/set_var.cc:
  Add settable global variable innodb_autoextend_increment
2005-01-25 16:27:13 +02:00
unknown
d7d7741e5b Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000


sql/sql_select.cc:
  Auto merged
2005-01-24 10:08:45 +01:00
unknown
25c2d1adb0 select_found.result, select_found.test:
Added a test case for bug #7945.
sql_select.cc:
  Fixed bug #7945. If DISTINCT is used only with constants
  in a query with GROUP BY, we can apply an optimization
  that set LIMIT to 1 only in the case when there is 
  no SQL_CALC_FOUND_ROWS.


sql/sql_select.cc:
  Fixed bug #7945. If DISTINCT is used only with constants
  in a query with GROUP BY, we can apply an optimization
  that set LIMIT to 1 only in the case when there is 
  no SQL_CALC_FOUND_ROWS.
mysql-test/t/select_found.test:
  Added a test case for bug #7945.
mysql-test/r/select_found.result:
  Added a test case for bug #7945.
2005-01-22 02:40:27 -08:00
unknown
4095dbb973 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-4000
2005-01-20 16:17:33 +01:00
unknown
353bc07096 BUG#6034 - Error code 124: Wrong medium type.
Version for 4.0. Committed for merge.
If the result table is one of the select tables in INSERT SELECT,
we must not disable the result tables indexes before selecting.
mysql_execute_command() detects the match for other reasons and
adds the flag OPTION_BUFFER_RESULT to the 'select_options'. 
In this case the result is put into a temporary table first. 
Hence, we can defer the preparation of the insert
table until the result is to be used.


mysql-test/r/insert_select.result:
  BUG#6034 - Error code 124:  Wrong medium type.
  The test results.
mysql-test/t/insert_select.test:
  BUG#6034 - Error code 124:  Wrong medium type.
  The test case.
sql/sql_select.cc:
  BUG#6034 - Error code 124:  Wrong medium type.
  With OPTION_BUFFER_RESULT in the 'select_options',
  defer the preparation of the insert table until the 
  result is to be used. Unfortunately, this happens
  at several places.
2005-01-19 21:13:30 +01:00
unknown
803774958c Merge mysql.com:/home/jimw/my/mysql-4.0-7700
into mysql.com:/home/jimw/my/mysql-4.0-clean
2005-01-18 11:39:10 -08:00
unknown
9ed0d85550 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg7884
2005-01-18 17:05:09 +03:00
unknown
b1a0f67a03 Clean up in implementation of f_is_geom()/f_is_bitfield()/f_is_enum()
macros.

It does not fixes any bugs in 4.0. But it prevents from future error in
any bugfixes that may use these macros. Also after merging into 4.1 tree
this cleanup will fix bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix".


sql/field.h:
  Since FIELDFLAG_INTERVAL, FIELDFLAG_BITFIELD, FIELDFLAG_BLOB and
  FIELDFLAG_GEOM flags occupy the same space as number of decimals for
  FIELDFLAG_NUMBER fields, it is safer to check in "f_is_geom()"-type
  macros that we have non-number field, like we already do in f_is_blob()
  macro.
2005-01-18 17:04:16 +03:00
unknown
dd68385435 Fix over-optimization that could result in an unsigned double field being
set to a negative value. (Bug #7700)


sql/field_conv.cc:
  Don't treat real fields as identical when destination is unsigned and
  the source is not.
mysql-test/t/type_float.test:
  Add test for setting double unsigned to a negative value from a signed double
mysql-test/r/type_float.result:
  Add test results
2005-01-17 16:13:56 -08:00
unknown
896cdbe5df Anoter fix for moved IO_CACHE object 2005-01-18 02:04:41 +02:00
unknown
deac81af88 Fixed possible access to unintialized memory in filesort when using many buffers
include/my_sys.h:
  Added function to call if IO_CACHE is moved
mysys/mf_iocache.c:
  Added function to call if IO_CACHE is moved
sql/filesort.cc:
  Tell that io_cache is moved
2005-01-15 03:47:06 +02:00
unknown
d90e3b497f ha_innodb.cc:
Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables


sql/ha_innodb.cc:
  Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
2005-01-13 19:20:49 +02:00
unknown
1e63ecd035 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2005-01-13 16:16:05 +02:00
unknown
b692ca4fd5 A fix for Bug#6761 "mysql_list_fields() does not work": test
case will be added to client_test in 4.1


sql/sql_parse.cc:
  A fix for bug #6761: "mysql_list_fields() does not work": init
  thd->query_length, which is used next line. Remove a stale comment.
2005-01-12 17:04:45 +03:00
unknown
c65c72f01a InnoDB: Use system-supplied tmpfile() on Netware, as there is no
open interface for setting the "delete-on-close" flag.


innobase/os/os0file.c:
  Use system-supplied tmpfile() on Netware
sql/ha_innodb.cc:
  Remove innobase_mysql_tmpfile() on Netware.
2005-01-12 15:24:49 +02:00
unknown
7310387078 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/mysqld.cc:
  Auto merged
2005-01-12 12:35:34 +01:00
unknown
0bcfc49b4b added missing Com_update_multi status variable 2005-01-12 12:18:17 +01:00
unknown
d8d9f79e09 Fix for BUG#7658 "optimize crashes slave thread (1 in 1000)]":
mysql_admin_table() attempted to write to a vio which was 0. I could have fixed mysql_admin_table()
but fixing my_net_write() looked more future-proof.


sql/net_serv.cc:
  If no VIO, no write.
2005-01-10 13:52:32 +01:00
unknown
8ffe8ab302 Make query_cache_wlock_invalidate visible in SHOW VARIABLES (Bug #7594)
sql/set_var.cc:
  Make query_cache_wlock_invalidate visible in SHOW VARIABLES
2005-01-04 02:45:01 +01:00
unknown
f077d4b06b Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0
2004-12-31 12:55:42 +01:00
unknown
40a0199e77 unsufficient privilege checks in GRANT, when a grantor has column-level privileges 2004-12-30 21:01:11 +01:00