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