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).
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
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.
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()'.
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
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
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).
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
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
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.
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
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
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.
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
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 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).
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").