Commit graph

1421 commits

Author SHA1 Message Date
unknown
60af920628 Fixes while reviewing code
(Cleanups and better bug fixes)


mysql-test/r/select.result:
  Fixed test after wrong merge
mysql-test/t/select.test:
  Fixed test after wrong merge
scripts/mysql_fix_privilege_tables.sh:
  Don't read defaults files
sql/item_cmpfunc.cc:
  Fix wrong value for not_null_tables_cache
sql/item_cmpfunc.h:
  Remove wrong patch (flags are set in fix_length_and_dec())
sql/item_func.h:
  Fix wrong value for not_null_tables_cache
sql/slave.cc:
  Fixed indentation
2004-11-26 02:31:22 +02:00
unknown
fecd27a106 Merge mysql.com:/home/timka/mysql/src/4.0-virgin
into mysql.com:/home/timka/mysql/src/4.0-master


BitKeeper/etc/logging_ok:
  auto-union
2004-11-25 13:25:35 +02:00
unknown
0dcb55f470 Merge for BUG#3759 which was missing from the main tree for some reason.
BitKeeper/etc/logging_ok:
  auto-union
sql/item_cmpfunc.h:
  Auto merged
mysql-test/r/select.result:
  Merge for BUG#3759
mysql-test/t/select.test:
  Merge for BUG#3759
2004-11-25 11:37:28 +02:00
unknown
467c481479 Merge mysql.com:/space/bkroot/mysql-4.0
into mysql.com:/space/bk/b6148-mysql-4.0


BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-11-25 09:38:52 +01:00
unknown
6f2cf12aa6 Fix for Bug#6148. Only rewind read position in binary log when the
slave SQL thread is started.


sql/slave.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/slave.h:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/sql_repl.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/repl_failsafe.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
2004-11-25 09:26:45 +01:00
unknown
e65956d067 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2004-11-22 18:47:23 +01:00
unknown
2934e7ebe6 ft_boolean_search.c:
bug#6705 - (+trunc1* +trunc2*)
fulltext.test, fulltext.result:
  bug#6705


mysql-test/r/fulltext.result:
  bug#6705
mysql-test/t/fulltext.test:
  bug#6705
myisam/ft_boolean_search.c:
  bug#6705 - (+trunc1* +trunc2*)
2004-11-22 18:37:30 +01:00
unknown
801a2fa308 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg6439
2004-11-19 17:54:14 +03:00
unknown
835e0159b6 test for bug#5528 2004-11-17 13:38:35 +01:00
unknown
e1509cf781 Proposed fix for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument".

Added range checking for from_unixtime() argument, cleaned up code 
a bit.


mysql-test/r/func_time.result:
  Test for bug #6439 "from_unixtime() function returns wrong datetime 
  values for too big argument".
mysql-test/t/func_time.test:
  Test for bug #6439 "from_unixtime() function returns wrong datetime 
  values for too big argument".
sql/item_timefunc.cc:
  Item_func_from_unixtime: 
    Added error range checking for function argument + small code clean up.
2004-11-15 16:11:13 +03:00
unknown
5cc756f6b9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b6564
2004-11-12 12:38:07 +04:00
unknown
b19eb67f08 Bug#6123 - GRANT USAGE creates useless mysql.db row
Prevent creation of a row which grants no rights
  Test included


mysql-test/r/grant.result:
  Test for Bug#6123
mysql-test/t/grant.test:
  Test for Bug#6123
sql/sql_acl.cc:
  Bug#6123
    Prevent creation of useless row
2004-11-11 20:59:03 +00:00
unknown
baf1c89e3d A fix (bug #6564: QUOTE(NULL) returns NULL, not the string 'NULL') 2004-11-11 18:20:40 +04: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
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
3bdd7e77fd Fix when compiling without InnoDB
BitKeeper/deleted/.del-innodb-lock-master.opt~f76a4a1999728f87:
  Delete: mysql-test/t/innodb-lock-master.opt
2004-10-27 18:57:49 +03: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
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
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
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
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
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
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
d7281b331a Fix for bug #5595: NULLIF() IS NULL returns false if NULLIF() returns NULL 2004-09-18 13:06:44 +04:00
unknown
e84eb55a07 Bug#5553 - Multi table UPDATE IGNORE fails on dup key
We don't want the update to abort when IGNORE is specified


mysql-test/r/update.result:
  Bug#5553 - UPDATE IGNORE fails on dup key
    New test
mysql-test/t/update.test:
  Bug#5553 - UPDATE IGNORE fails on dup key
    New test
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-09-17 12:07:59 +01:00
unknown
cc98eea53b A fix (bug #5498 TRIM fails with LEADING or TRAILING if remstr = str). 2004-09-13 14:25:43 +05:00
unknown
c36356b6a4 Bug #5447 Select does not find records
Note, there is no need to propagate this change into 4.1.


mysql-test/r/ctype_latin1_de.result:
  Bug #5447 Select does not find records
mysql-test/t/ctype_latin1_de.test:
  Bug #5447 Select does not find records
strings/ctype-latin1_de.c:
  Bug #5447 Select does not find records
2004-09-09 12:23:10 +05:00
unknown
419ca7152f Merge rurik.mysql.com:/home/igor/mysql-4.0
into rurik.mysql.com:/home/igor/dev/mysql-4.0-0
2004-09-07 10:08:17 -07:00
unknown
3a476a6e91 clean up at end of test (thanks serg)
mysql-test/r/rpl_set_charset.result:
  result update
mysql-test/t/rpl_set_charset.test:
  clean up on slave too.
2004-09-07 14:20:48 +02:00
unknown
e205392de7 cleanup 2004-09-07 13:36:27 +02:00
unknown
00080aa7c3 A new test for the fix for BUG#4500 ("SET CHARACTER SET replicates incorrectly").
As I cannot be 100% sure that there won't be issues with some of our exotic platforms
(who knows if the charset of <obscure old OS> will play fair?), I'll send an email to the build guys.
Well, this holds if bk does not crash on binary chars of this cset.
2004-09-07 11:15:23 +02:00
unknown
982a78829a bug#5389 merge.test fails on qnx - uninitalized variable in myrg_open()
myisammrg/myrg_open.c:
  backport from 4.1
mysql-test/r/union.result:
  after merge fix
mysql-test/t/union.test:
  after merge fix
sql/log.cc:
  backward compatibility: inhibit severity labels in error log
2004-09-06 22:20:40 +02:00
unknown
50bde49309 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
2004-09-06 20:18:41 +02:00
unknown
e9a4045252 union.test: drop table added
BitKeeper/etc/ignore:
  Added support-files/my-innodb-heavy-4G.cnf to the ignore list
mysql-test/r/union.result:
  drop table added
mysql-test/t/union.test:
  drop table added
2004-09-05 11:27:31 +02:00
unknown
8838c971fa A fix (Bug #4980: union statement with () union () order by produces wrong explain). 2004-09-03 19:59:29 +05:00
unknown
182688f01f Merge rurik.mysql.com:/home/igor/mysql-4.0
into rurik.mysql.com:/home/igor/dev/mysql-4.0-0


sql/sql_select.cc:
  Auto merged
2004-09-02 22:07:07 -07:00
unknown
afac3c3127 select.result, select.test:
Added a test case for bug #5333.
null_key.result, key_primary.result:
  Made covering index usable for const tables.
sql_select.cc:
  Made covering index usable for const tables:
  downported the corresponding code from 4.1.
  Simultaneously fixed bug #5333 reported for 4.1.
  The bug was due to the fact that field index in join
  structures was always set to 0 for const tables.


sql/sql_select.cc:
  Made covering index usable for const tables:
  downported the corresponding code from 4.1.
  Simultaneously fixed bug #5333 reported for 4.1.
  The bug was due to the fact that field index in join
  structures was always set to 0 for const tables.
mysql-test/t/select.test:
  Added a test case for bug #5333.
mysql-test/r/key_primary.result:
  Made covering index usable for const tables.
mysql-test/r/null_key.result:
  Made covering index usable for const tables.
mysql-test/r/select.result:
  Added a test case for bug #5333.
2004-09-02 22:06:30 -07:00
unknown
e230217f4d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b5232
2004-09-02 16:25:32 +05:00
unknown
65a94e3470 added test for BUG#3759 2004-08-30 18:14:29 +03:00
unknown
db15b91915 Code style fixes.
Initialize LOG_error_log before get_options to not use an uninitalized mutex in case of an error from handle_options()


mysql-test/r/lowercase_table.result:
  Changed foo database -> mysqltest
  More test cases
mysql-test/t/lowercase_table.test:
  Changed foo database -> mysqltest
  More test cases
mysys/my_getopt.c:
  Fix new code to use MySQL indentation style
sql/log.cc:
  Change to use MySQL indentation style and naming conventions
  Remove usage of strlen() and strcat()
sql/mysqld.cc:
  Initialize LOG_error_log before get_options to not use an uninitalized mutex in case of an error from handle_options()
sql/sql_base.cc:
  Added comment
sql/table.cc:
  Added #if MYSQL_VERSION_ID < 40100 to ensure code is merged correctly
2004-08-28 00:49:54 +03:00
unknown
bf26880291 A fix (Bug #5232: CREATE TABLE ... SELECT can deadlock itself). 2004-08-27 16:43:01 +05:00
unknown
3b55c6f394 Test case for Bug #4792 lower_case_table_names does not resolve db.tbl.column in SELECT list
lowercase_table.result:
  New results for modified lowercase_table test
lowercase_table.test:
  Added test case for all uppercase database when running under lower_case_table_names.  This really only failed under Windows.  Bug# 4792


mysql-test/t/lowercase_table.test:
  Added test case for all uppercase database when running under lower_case_table_names.  This really only failed under Windows.  Bug# 4792
mysql-test/r/lowercase_table.result:
  New results for modified lowercase_table test
2004-08-25 17:25:38 +02:00
unknown
b758a6d142 Fix for bug #4340: find_in_set is case insensitive even on binary operators(2nd version)
mysql-test/r/func_set.result:
  Fix for bug #4340: find_in_set is case insensitive even on binary operators
mysql-test/t/func_set.test:
  Fix for bug #4340: find_in_set is case insensitive even on binary operators
sql/item_func.cc:
  Fix for bug #4340: find_in_set is case insensitive even on binary operators
2004-08-24 17:29:08 +04:00