Problem: GROUP BY on empty ucs2 strings crashed server.
Reason: sometimes mi_unique_hash() is executed with
ptr=null and length=0, which means "empty string".
The branch of code handling UCS2 character set
was not safe against ptr=null and fell into and
endless loop even if length=0 because of poiter
arithmetic overflow.
Fix: adding special check for length=0 to avoid pointer arithmetic
overflow.
mysql-test/r/ctype_uca.result:
Adding test case
mysql-test/t/ctype_uca.test:
Adding test case
strings/ctype-uca.c:
Fix my_uca_scanner_init_ucs2 to be safe against
strings with length=0 and ptr=0.
correct cit printout
correct bit store retrieve
ndb/include/ndbapi/NdbRecAttr.hpp:
correct medium int printout
ndb/src/ndbapi/NdbRecAttr.cpp:
correct cit printout
sql/ha_ndbcluster.cc:
correct bit store retrieve
enabled the optional FOR JOIN to all the three
clauses : USE, FORCE and IGNORE
mysql-test/r/select.result:
WL3527: 5.0 part: test cases
mysql-test/t/select.test:
WL3527: 5.0 part: test cases
to 0 causes wrong (large) length to be read
from the row in _mi_calc_blob_length() when
storing NULL values in (e.g) POINT columns.
This large length is then used to allocate
a block of memory that (on some OSes) causes
trouble.
Fixed by calling the base class's
Field_blob::reset() from Field_geom::reset()
that is called when storing a NULL value into
the column.
mysql-test/r/gis.result:
Bug #27164: test case
mysql-test/t/gis.test:
Bug #27164: test case
sql/field.h:
Bug #27164: not reseting the data pointer
to 0 causes wrong (large) length to be read
from the row in _mi_calc_blob_length() when
storing NULL values in (e.g) POINT columns.
This large length is then used to allocate
a block of memory that (on some OSes) causes
trouble.
Pass ME_NOREFRESH flag to an error handler in my_malloc() and _mymalloc() in case of memory allocation failure, so that it gets logged to the error log.
mysys/my_malloc.c:
Pass ME_NOREFRESH flag to an error handler in my_malloc() in case of memory allocation failure, so that it gets logged to the error log.
mysys/safemalloc.c:
Pass ME_NOREFRESH flag to an error handler in _mymalloc() in case of memory allocation failure, so that it gets logged to the error log.
opt_complete_insert was improperly used by accident.
Use complete_insert flag instead.
client/mysqldump.c:
Fix for bug #25993: mysqldump crashes with merge table and -c option
- use complete_insert instead of opt_complete_insert.
mysql-test/r/mysqldump.result:
Fix for bug #25993: mysqldump crashes with merge table and -c option
- test result.
mysql-test/t/mysqldump.test:
Fix for bug #25993: mysqldump crashes with merge table and -c option
- test case.
from func_group.test after the patch for bug #27229 had been applied.
The memory corruption happened because in some rare cases the function
count_field_types underestimated the number of elements in
in the array param->items_to_copy.
sql/item_sum.cc:
The return value of the Item_sum::update_used_tables method
should not depend on the place of aggregation of the set
function for which the Item_sum object has been created.
sql/sql_select.cc:
This is a fix for the memory corruption occurred in one of test cases
from func_group.test after the patch for bug #27229 had been applied.
The memory corruption happened because in some rare cases the function
count_field_types underestimated the number of elements in
in the array param->items_to_copy.
Currently it's not guaranteed that after JOIN::prepare() the
used_tables attribute is calculated for all items. For example
for the expression SUM(outer_ref)+1 used_tables() must return
OUTER_REF_TABLE_BIT. Yet by the moment when the used_tables
attribute is calculated in JOIN::prepare SUM(outer_ref) has
not been substituted for Item_aggregate_ref yet.
By this reason additional calls of the method update_used_tables
are needed for some items passed as parameters to the function
create_tmp_table.
Fix is to rewrite the MBR::overlaps() function, to compute the dimension of both
arguments, and the dimension of the intersection; test that all three dimensions are the
same (e.g., all are Polygons).
Add tests for all MBR* functions for various combinations of shapes, lines and points.
mysql-test/include/gis_generic.inc:
Add tests & checks for bug #24563 and bug #24588 - some GIS functions missing in
5.1; many GIS functions not tested; Overlaps() function was incorrect when MBR shifted
only along one axis; Overlaps() needs to take dimension of shape into account.
mysql-test/r/archive_gis.result:
Update test results.
mysql-test/r/bdb_gis.result:
Update test results.
mysql-test/r/gis.result:
Update test results.
mysql-test/r/innodb_gis.result:
Update test results.
mysql-test/r/ndb_gis.result:
Update test results.
mysql-test/t/gis.test:
Add tests & checks for bug #24563 and bug #24588 - some GIS functions missing in
5.1; many GIS functions not tested; Overlaps() function was incorrect when MBR shifted
only along one axis; Overlaps() needs to take dimension of shape into account.
sql/spatial.h:
Add MBR::dimension() (map MBR to integral dimension: point -> 0, line -> 1,
polygon -> 2, invalid -> -1)
Fix MBR::overlaps() to handle MBRs which are shifted on one dimension only, and to
take MBR dimension into account. Also, test both within() and contains() predicates (so
that overlaps(a, b) == overlaps(b, a)).
fixed differently: wake up select_thread with THR_SERVER_ALARM instead
mysys/thr_alarm.c:
reverted linuxthreads thr_client_alarm fix (not future-proof)
- Improve error handling for "out of memory" problems when master is
sending logs to slave. If memory allocation fails the log should
now report error "memory allocation failed reading log event"
sql/log_event.cc:
Return LOG_READ_MEM from "Log_event::read_log_event" if memory
allocation fails.
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-single-user
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
ndb/include/kernel/signaldata/DictTabInfo.hpp:
manual merge
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
manual merge
ndb/include/kernel/signaldata/DictTabInfo.hpp:
add single user mode field in table definition
ndb/include/ndb_constants.h:
new constants for single usermode option of tables
ndb/include/ndbapi/NdbDictionary.hpp:
add single user mode field in table definition
ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
add single user mode field in table definition
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
add single user mode field in table definition
send this infor to TC
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
add single user mode field in table definition
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
single user table mode on table object
merge some flags from uint8 to bits
get allow transaction to also check single user mode
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
single user table mode on table object
merge some flags from uint8 to bits
get allow transaction to also check single user mode
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
set single user mode flag on system tables to make them always updatable
ndb/src/ndbapi/NdbDictionary.cpp:
get/set functions for single user mode on tables
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
get/set functions for single user mode on tables
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
get/set functions for single user mode on tables
ndb/test/src/NDBT_Table.cpp:
print single user mode
into poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
(in thr_alarm.cc it happened too late).
mysys/thr_alarm.c:
move thr_client_alarm initialization to mysqld.cc
(here it happened too late)
sql/mysqld.cc:
move thr_client_alarm initialization to mysqld.cc
(in thr_alarm.cc it happened too late).
moved thr_kill_signal initialization to init_signals()