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
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
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
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).
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
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.
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.
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
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
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.
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
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.
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
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
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
(ok'd by CTO to fix it in 4.0).
Fix to make mysql-test-run work with all Valgrind versions.
mysql-test/mysql-test-run.sh:
fixing mysql-test-run.sh so that it works indifferently with Valgrind 1.x, 2.x
(versions <= 2.0.0 refuse --tool option; versions >=2.1.2 require it; 2.1.0 accepts it).
I hope the shell code is portable enough; anyway Valgrind only runs on Linux...
I tested it with 2.0.0, 2.1.0, 2.1.2.
mysql-test/r/truncate.result:
result update
mysql-test/t/truncate.test:
testing if TRUNCATE resets autoinc counter for temp tables (BUG#5033); testing difference with DELETE FROM.
sql/sql_delete.cc:
in mysql_truncate(), always reset the autoinc counter, as manual says (even if it's a temp table, which was BUG#5033).
mysql-test/r/variables.result:
Test case for BUG#5135, check that setting log_warnings actually works.
mysql-test/t/variables.test:
Test case for BUG#5135, check that setting log_warnings actually works.
sql/mysqld.cc:
Set a max value for log_warnings, so se can set it to something other than 0.
Added test case for bug #4256.
join_outer.result:
Fixed bug #4256.
item_cmpfunc.h:
Fixed inconsistency of values of used_tables_cache and
const_item_cache for Item_func_isnull objects.
This inconsistency caused bug #4256.
sql/item_cmpfunc.h:
Fixed inconsistency of values of used_tables_cache and
const_item_cache for Item_func_isnull objects.
This inconsistency caused bug #4256.
mysql-test/r/join_outer.result:
Fixed bug #4256.
mysql-test/r/null.result:
Added test case for bug #4256.
mysql-test/t/null.test:
Added test case for bug #4256.
in a deadlock-free manner. This splits locking the global read lock in two steps.
This fixes a consequence of this bug, known as:
BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB'
And a test.
sql/handler.cc:
making COMMIT wait if FLUSH TABLES WITH READ LOCK happened.
sql/lock.cc:
an additional stage so that FLUSH TABLES WITH READ LOCK blocks COMMIT:
make_global_read_lock_block_commit():
taking the global read lock is TWO steps (2nd step is optional; without
it, COMMIT of existing transactions will be allowed):
lock_global_read_lock() THEN make_global_read_lock_block_commit().
sql/mysql_priv.h:
new argument to wait_if_global_read_lock()
sql/sql_class.h:
THD::global_read_lock now an uint to reflect the 2 steps of global read lock (does not block COMMIT / does)
sql/sql_db.cc:
update for new prototype
sql/sql_parse.cc:
implementing the two steps of global read lock so that FLUSH TABLES WITH READ LOCK can block COMMIT without deadlocking with COMMITs.
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
mysql-test/r/rpl_heap.result:
result update
mysql-test/t/rpl_heap.test:
testing a bug
sql/log.cc:
new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/mysql_priv.h:
removing argument no_log from mysql_create_table(); no_log was perfect as some
binlogging could still be done by open_unireg_entry() for a HEAP table.
sql/sql_class.h:
new class Disable_binlog used to temporarily disable binlogging for one thread.
sql/sql_parse.cc:
removing no_log
sql/sql_table.cc:
removing no_log from mysql_create_table(); instead using new class Disable_binlog.
Disabling binlogging in some cases, where the binlogging is done later by some other code
(case of CREATE SELECT and ALTER).
from the select list and TEXT field
make setup_copy_fields to insert Item_copy_string for blobs in
the beginning of the copy_funcs (push_back instead of push_front)
the thing is that Item_copy_string::copy for function can call
Item_copy_string::val_int for blob via Item_ref.
But if Item_copy_string::copy for blob isn't called before,
it's value will be wrong.
So all the Item_copy_string::copy for blobs should be called before
Item_copy_string::copy for functions.
mysql-test/r/having.result:
added test case for
Bug #4358 Problem with HAVING clause that uses
alias from the select list and TEXT field
mysql-test/t/having.test:
added test case for
Bug #4358 Problem with HAVING clause that uses
alias from the select list and TEXT field
sql/sql_select.cc:
make setup_copy_fields to insert Item_copy_string for blobs in
the beginning of the copy_funcs (push_back instead of push_front)
the thing is that Item_copy_string::copy for function can call
Item_copy_string::val_int for blob via Item_ref.
But if Item_copy_string::copy for blob isn't called before,
it's value will be wrong.
So all the Item_copy_string::copy for blobs should be called before
Item_copy_string::copy for functions.
fixed
Bug #4358 Problem with HAVING clause that
uses alias from the select list and TEXT field