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
Fix for server hang bug
mysql-test/r/heap.result:
Bug#4411
Test for server hang bug
mysql-test/t/heap.test:
Bug#4411
Test for server hang bug
sql/opt_sum.cc:
Bug#4411
Allow code to exit the loop.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
We should allow 19 as length of newly created TIMESTAMP fields.
mysql-test/r/type_timestamp.result:
Added test of TIMESTAMP(19) support.
mysql-test/t/type_timestamp.test:
Added test of TIMESTAMP(19) support.
sql/sql_parse.cc:
add_field_to_list(): TIMESTAMP columns should also support 19 as length since it is
length of 4.1 compatible representation.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because
of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY).
sql/sql_insert.cc:
Fix for BUG#4551 "Temporary InnoDB tables not replicated properly with CREATE TABLE .. SELECT"
The problem was that (for any storage engine), the created temporary table was not removed if CREATE SELECT failed (because
of a constraint violation for example). This was not consistent with the manual and with CREATE SELECT (no TEMPORARY).
And it led to the above bug, because the binlogging of CREATE SELECT is done by select_insert::send_eof() (same function
as INSERT SELECT) and so, if the table is transactional and there is a failure, the statement is considered as rolled
back and so nothing is written in the binlog. So temp table MUST be deleted.
BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines",
BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" with a test file.
It was not possible to add a test for BUG#4506 as in the test suite we must use --short-form
which does not display the "# at" lines.
client/mysqlbinlog.cc:
Fix for BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines"
when reading a remote binlog, the start position is not always BIN_LOG_HEADER_SIZE (4).
sql/sql_table.cc:
Fix for BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table"
we must my_error() _before_ we write to the binlog, so that a meaningful error code is available
in thd->net.last_errno for storage of the DROP TABLE statement into the binlog.
(Bug #4446)
innobase/row/row0ins.c:
row_ins_foreign_check_on_constraint(): limit recursion for UPDATE too
mysql-test/r/innodb.result:
Add test for recursion depth limit
mysql-test/t/innodb.test:
Add test for recursion depth limit
Redesigned the handler close functions so that they are usable
at different places where waiting for closing tables is done.
mysql-test/r/flush_table.result:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Added the test results.
mysql-test/t/flush_table.test:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Activated old test case.
Added new test cases.
sql/mysql_priv.h:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Made mysql_ha_close() more flexible.
Removed mysql_ha_closeall(), which closed only one table despite its name.
Added mysql_ha_close_list(), which closes the complete list or all tables and does not lock.
Removed a duplicate declaration.
sql/sql_base.cc:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Added proper close calls before some wait points to avoid deadlocks
or infinite loops.
sql/sql_handler.cc:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Redesigned the internal function find_table_ptr_by_name().
It can now suppress locking and tells if the requested table
has been flushed by itself.
Extended mysql_ha_close() so that it can now suppres locking
and error reporting. That way it can be used at more places and the
old function mysql_ha_closeall() is now obsolete.
Added a new function mysql_ha_close_list() which closes a whole list
of HANDLER tables or all HANDLER tables, if the list is NULL.
Furthermore is can close all 'old' (marked for flush) HANDLER tables.
sql/sql_table.cc:
bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Replaced the obsolte mysql_ha_closeall() by the new mysql_ha_close().
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and
unpacked with length size of the base column.
For the purpose of optimal key packing we have the method pack_key(), while rows are
packed with pack(). Now keys are unpacked with unpack_key() and no longer with
unpack() which is used for rows.
mysql-test/r/bdb.result:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added the test case results.
mysql-test/t/bdb.test:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added the test case.
sql/field.cc:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and
unpacked with length size of the base column.
For the purpose of optimal key packing we have the method pack_key(), while rows are packed
with pack(). Now keys are unpacked with unpack_key() and no longer with unpack() which is
used for rows.
sql/field.h:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
The default implementation simply calls unpack() for those field types that don't need
a special key unpacking.
sql/ha_berkeley.cc:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Now keys are unpacked with unpack_key() and no longer with unpack() which is used for rows.
For most field types, however, this simply calls unpack().
with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
Make net_buffer_length visible for mysql clients (Bug #4206)
include/mysql.h:
Make net_buffer_length visible for mysql clients
libmysql/libmysql.c:
Make net_buffer_length visible for mysql clients
mysql-test/mysql-test-run.sh:
Don't give warning for some common 'safe' warnings
mysql-test/r/lowercase_table2.result:
Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
mysql-test/t/lowercase_table2.test:
Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
scripts/mysql_install_db.sh:
Removed not used variable
sql/sql_table.cc:
lower_case_table_names=2 (Keep case for table names) was not honored
with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
dded code to clear the tail of the reference buffer if the actual key length
is less than the maximum key length.
mysql-test/r/bdb.result:
bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
Added the test case results.
mysql-test/t/bdb.test:
bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
Added the test case.
sql/ha_berkeley.cc:
bug#2688 - Wrong index_merge query results for BDB table with variable length primary key.
Added code to clear the tail of the reference buffer if the actual key length
is less than the maximum key length.
mysql-test/r/innodb_cache.result:
test of rollback one statement in transaction
mysql-test/t/innodb_cache.test:
test of rollback one statement in transaction
sql/handler.cc:
clear changed tables list only for total roll back
mysql-test/r/range.result:
Test of range optimizer bug
mysql-test/t/range.test:
Test of range optimizer bug
sql/opt_range.cc:
Fixed unlikely bug in the range optimzer when using many IN() queries on
different key parts. (Bug #4157)
mysql-test/t/type_date.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/type_date.result:
merge with 3.23
work as expected": precision-losing conversion removed from
sys_var_thd_ulonglong.
mysql-test/r/variables.result:
Test case for Bug#3754
mysql-test/t/variables.test:
Test case for Bug#3754
sql/set_var.cc:
Fix for Bug#3754: precision-losing conversion removed from
sys_var_thd_ulonglong.
mysql-test/r/handler.result:
Test case for BUG#3649
mysql-test/t/handler.test:
Test case for BUG#3649
sql/sql_handler.cc:
Fix for BUG#3649: when doing an index scan for an equality condition, use index_next_same to retrieve subsequent rows.
by adding sleep-and-retries (max 4 times) if MASTER_POS_WAIT() returns NULL
in sync_with_master and sync_slave_with_master.
The problem showed up only today, in MySQL 5.0 in rpl_server_id2.test,
but may affect 4.x as well, so fixing it here. Note that I am also fixing
5.0 too, with the same exact patch, because I don't want to leave 5.0 broken
until the next 4.0->4.1->5.0 merge.
client/mysqltest.c:
in sync_with_master (and sync_slave_with_master), if MASTER_POS_WAIT() returns NULL,
it may be that the slave SQL thread did not have time to start yes, so we sleep
1 sec and retry, 4 times at most.
mysql-test/r/rpl_server_id2.result:
result update
mysql-test/t/rpl_server_id2.test:
master_slave.inc already drops the table