Assertion `bitmap_is_set_all(&table->s->all_set)' failed in
handler::ha_reset
This assertion could be triggered if two connections simultaneously
executed two bitmap test functions on the same bitmap. For example,
the assertion could be triggered if one connection executed UPDATE
while a second connection executed SELECT on the same table.
Even if bitmap test functions have read-only semantics and have
const bitmaps as parameter, several of them modified the internal
state of the bitmap. With interleaved execution of two such functions
it was possible for one function to modify the state of the same
bitmap that the other function had just modified. This lead to an
inconsistent state and could trigger the assert.
Internally the bitmap uses 32 bit words for storage. Since bitmaps
can contain any number of bits, the last word in the bitmap may
not be fully used. A 32 bit mask is maintained where a bit is set
if the corresponding bit in the last bitmap word is unused.
The problem was that several test functions applied this mask to
the last word. Sometimes the mask was negated and used to zero out
the remainder of the last word and sometimes the mask was used as-is
to fill the remainder of the last word with 1's. This meant that if
a function first used the negated mask and another function then
used the mask as-is (or vice-versa), the first function would then
get the wrong result.
This patch fixes the problem by changing the implementation of
9 bitmap functions that modified the bitmap state even if the
bitmap was declared const. These functions now preserve the
internal state of the bitmap. This makes it possible for
two connections to concurrently execute two of these functions
on the same bitmap without issues.
The patch also removes dead testing code from my_bitmap.c.
These tests have already been moved to unittest/mysys/bitmap-t.c.
Existing test coverage of my_bitmap has been extended.
No MTR test case added as this would require adding several sync
points to the bitmap functions. The patch has been tested with
a non-deterministic test case posted on the bug report.
include/my_bit.h:
Removed my_count_bits_ushort() which is not needed anymore.
Added my_count_bits_uint32().
unittest/mysys/bitmap-t.c:
Extended test coverage of my_bitmap.
Bug #55755 : Date STD variable signness breaks server on FreeBSD and OpenBSD
* Added a check to configure on the size of time_t
* Created a macro to check for a valid time_t that is safe to use with datetime
functions and store in TIMESTAMP columns.
* Used the macro consistently instead of the ad-hoc checks introduced by 52315
* Fixed compliation warnings on platforms where the size of time_t is smaller than
the size of a long (e.g. OpenBSD 4.8 64 amd64).
Bug #52315: utc_date() crashes when system time > year 2037
* Added a correct check for the timestamp range instead of just variable size check to
SET TIMESTAMP.
* Added overflow checking before converting to time_t.
* Using a correct localized error message in this case instead of the generic error.
* Added a test suite.
* fixed the checks so that they check for unsigned time_t as well. Used the checks
consistently across the source code.
* fixed the original test case to expect the new error code.
Added strings_def.h into strings library to be able to have a DBUG_ASSERT() version without _db_flush() call (as strings.a should not depend on dbug.a)
Remove include of m_string.h in all string files (as it's included by string_def.h).
Fixed include order.
Changed "m_ctype.h" -> <m_ctype.h>
include/my_dbug.h:
Flush DBUG log in case of DBUG_ASSERT()
strings/bchange.c:
Include strings_def.h
strings/bcmp.c:
Include strings_def.h
strings/bfill.c:
Include strings_def.h
strings/bmove.c:
Include strings_def.h
strings/bmove512.c:
Include strings_def.h
strings/bmove_upp.c:
Include strings_def.h
strings/conf_to_src.c:
Include strings_def.h
Fixed copyright
strings/ctype-big5.c:
Include strings_def.h
strings/ctype-bin.c:
Include strings_def.h
strings/ctype-cp932.c:
Include strings_def.h
strings/ctype-czech.c:
Include strings_def.h
strings/ctype-euc_kr.c:
Include strings_def.h
strings/ctype-eucjpms.c:
Include strings_def.h
strings/ctype-extra.c:
Include strings_def.h
strings/ctype-gbk.c:
Include strings_def.h
strings/ctype-latin1.c:
Include strings_def.h
strings/ctype-mb.c:
Include strings_def.h
strings/ctype-simple.c:
Include strings_def.h
strings/ctype-sjis.c:
Include strings_def.h
strings/ctype-tis620.c:
Include strings_def.h
strings/ctype-uca.c:
Include strings_def.h
strings/ctype-ucs2.c:
Include strings_def.h
strings/ctype-ujis.c:
Include strings_def.h
strings/ctype-utf8.c:
Include strings_def.h
strings/ctype-win1250ch.c:
Include strings_def.h
strings/ctype.c:
Include strings_def.h
strings/decimal.c:
Include strings_def.h
strings/do_ctype.c:
Include strings_def.h
strings/int2str.c:
Include strings_def.h
strings/is_prefix.c:
Include strings_def.h
strings/llstr.c:
Include strings_def.h
strings/longlong2str.c:
Include strings_def.h
strings/longlong2str_asm.c:
Include strings_def.h
strings/my_strchr.c:
Include strings_def.h
strings/my_strtoll10.c:
Include strings_def.h
strings/my_vsnprintf.c:
Include strings_def.h
strings/r_strinstr.c:
Include strings_def.h
strings/str2int.c:
Include strings_def.h
strings/str_alloc.c:
Include strings_def.h
strings/str_test.c:
Include strings_def.h
Fixed compiler warnings
strings/strappend.c:
Include strings_def.h
strings/strcend.c:
Include strings_def.h
strings/strcont.c:
Include strings_def.h
strings/strend.c:
Include strings_def.h
strings/strfill.c:
Include strings_def.h
strings/strinstr.c:
Include strings_def.h
strings/strmake.c:
Include strings_def.h
strings/strmov.c:
Include strings_def.h
strings/strmov_overlapp.c:
Include strings_def.h
strings/strnlen.c:
Include strings_def.h
strings/strnmov.c:
Include strings_def.h
strings/strstr.c:
Include strings_def.h
strings/strto.c:
Include strings_def.h
strings/strtod.c:
Include strings_def.h
strings/strtol.c:
Include strings_def.h
strings/strtoll.c:
Include strings_def.h
strings/strtoul.c:
Include strings_def.h
strings/strtoull.c:
Include strings_def.h
strings/strxmov.c:
Include strings_def.h
strings/strxnmov.c:
Include strings_def.h
strings/uctypedump.c:
Include strings_def.h
Fixed compiler warnings
Removed double include of m_ctype.h
strings/udiv.c:
Include strings_def.h
strings/xml.c:
Include strings_def.h
configure.in:
* don't use assembler when building with native linker and --with-embedded.
Embedded uses PIC and our assembler sources aren't PIC
* workaround for OpenSolaris Bug 6611808
extra/libevent/devpoll.c:
compiler warning
extra/yassl/src/buffer.cpp:
include config.h first to make sure that _FILE_OFFSET_BITS is defined
before including system headers
extra/yassl/taocrypt/benchmark/benchmark.cpp:
include config.h first to make sure that _FILE_OFFSET_BITS is defined
before including system headers
extra/yassl/taocrypt/test/test.cpp:
include config.h first to make sure that _FILE_OFFSET_BITS is defined
before including system headers
include/my_pthread.h:
workaround for OpenSolaris Bug 6611808
- Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
- Fixed compiler warnings
- Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails)
BUILD/SETUP.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
BUILD/build_mccge.sh:
Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables.
client/mysqltest.cc:
Fixed bug in remove_files_wildcards (the orignal code never removed anything)
extra/libevent/devpoll.c:
Fixed compiler warning
include/thr_lock.h:
Added a name for each thr_lock to get better error messages.
mysql-test/suite/maria/t/maria3.test:
Speed up test.
mysys/thr_lock.c:
Added a name for each thr_lock to get better error messages.
Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'.
sql/lock.cc:
Added a name for each thr_lock to get better error messages.
storage/xtradb/fil/fil0fil.c:
Fixed compiler warning
This makes the keys smaller (no row pointer) and gives us proper errors if we
use the table wrongly.
sql/sql_select.cc:
Use NO_RECORD for tables that doesn't need row data.
storage/maria/Makefile.am:
Added ma_norec.c
storage/maria/ma_check.c:
Added support for NO_RECORD record format (don't store any row data)
storage/maria/ma_norec.c:
Added support for NO_RECORD record format
storage/maria/ma_open.c:
Added support for NO_RECORD record format
storage/maria/ma_search.c:
Added support for 0 size row pointers (used with NO_RECORD)
storage/maria/ma_test1.c:
Added testing of NO_RECORD record format.
storage/maria/maria_chk.c:
Added support for NO_RECORD
storage/maria/maria_def.h:
Added support for NO_RECORD
storage/maria/unittest/ma_test_all-t:
Added testing of NO_RECORD record format
This was needed as the old code caused us to have LOTS of duplicate
hash values when used by optimizer.
include/m_ctype.h:
Made my_hash_sort_bin() exernal
storage/maria/ma_unique.c:
Better hash for packed numeric data for unique handling.
This was needed as the old code caused us to have LOTS
of duplicate hash values when used by optimizer.
Added key and file version numbers to MEMORY tables so that we can detect if someone has changed them between HANDLER calls.
mysql-test/suite/handler/aria.result:
Fixed result after test changes
mysql-test/suite/handler/handler.inc:
Changed test to use combined key to ensure rows are returned in a pre-determinated order.
mysql-test/suite/handler/heap.result:
New result
mysql-test/suite/handler/heap.test:
Added test for HANDLER + HEAP
mysql-test/suite/handler/innodb.result:
Fixed result after test changes
mysql-test/suite/handler/myisam.result:
Fixed result after test changes
sql/sql_handler.cc:
Fixed wrong parameter to ha_index_next_same()
storage/heap/ha_heap.cc:
Abort key scan if table has changed.
Abort table scan if table has been recreated.
storage/heap/ha_heap.h:
Added support for HANDLER
storage/heap/hp_clear.c:
Increase version number so that we can notice changes if using HANDLER
storage/heap/hp_delete.c:
Increase key data version number on key changes.
storage/heap/hp_rfirst.c:
Remember version of key data
Give error if using read-first on hash key.
storage/heap/hp_rkey.c:
Remember version of key data
storage/heap/hp_rlast.c:
Remember version of key data
Give error if using read-last on hash key.
storage/heap/hp_rnext.c:
Fixed that we get next key from last search.
storage/heap/hp_rprev.c:
Fixed that we get previous key from last search.
storage/heap/hp_scan.c:
Remember version of key and file data
storage/heap/hp_update.c:
Increase key data version number on key changes.
storage/heap/hp_write.c:
Increase key data version number on key changes.
From a user perspective, the problem is that a FLUSH LOGS or SIGHUP
signal could end up associating the stdout and stderr to random
files. In the case of this bug report, the streams would end up
associated to InnoDB ibd files.
The freopen(3) function is not thread-safe on FreeBSD. What this
means is that if another thread calls open(2) during freopen()
is executing that another thread's fd returned by open(2) may get
re-associated with the file being passed to freopen(3). See FreeBSD
PR number 79887 for reference:
http://www.freebsd.org/cgi/query-pr.cgi?pr=79887
This problem is worked around by substituting a internal hook within
the FILE structure. This avoids the loss of atomicity by not having
the original fd closed before its duplicated.
Patch based on the original work by Vasil Dimov.
include/my_sys.h:
Export my_freopen.
mysys/my_fopen.c:
Add a my_freopen abstraction to workaround bugs in specific OSes.
Add a prototype for getosreldate() as older FreeBSD versions did
not define one.
sql/log.cc:
Move freopen abstraction code over to mysys.
The streams are now only reopened for writing.
It includes speed optimizations for HANDLER READ by caching as much as possible in HANDLER OPEN
Other things:
- Added mysqld option --disable-thr-alarm to be able to benchmark things without thr_alarm
- Changed 'Locked' state to 'System lock' and 'Table lock' (these where used in the code but never shown to end user)
- Better error message if mysql_install_db.sh fails
- Moved handler function prototypes to sql_handler.h
- Remove not anymore used 'thd->locked' member
include/thr_alarm.h:
Added my_disable_thr_alarm
include/thr_lock.h:
Add new member to THR_LOCK_DATA to remember original lock type state. This is needed as thr_unlock() resets type to TL_UNLOCK.
mysql-test/include/check_no_concurrent_insert.inc:
Locked -> Table lock
mysql-test/include/handler.inc:
Locked -> Table lock
mysql-test/r/handler_innodb.result:
Updated results for new tests
mysql-test/r/handler_myisam.result:
Updated results for new tests
mysql-test/r/sp-threads.result:
Locked -> Table lock
mysql-test/suite/binlog/t/binlog_stm_row.test:
Locked -> Table lock
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
Locked -> Table lock
mysql-test/suite/pbxt/t/lock_multi.test:
Locked -> Table lock
mysql-test/suite/sys_vars/r/concurrent_insert_func.result:
Locked -> Table lock
mysql-test/suite/sys_vars/t/concurrent_insert_func.test:
Locked -> Table lock
mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test:
Locked -> Table lock
mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test:
Locked -> Table lock
mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test:
Locked -> Table lock
mysql-test/t/insert_notembedded.test:
Locked -> Table lock
mysql-test/t/lock_multi.test:
Locked -> Table lock
mysql-test/t/merge-big.test:
Locked -> Table lock
mysql-test/t/multi_update.test:
Locked -> Table lock
mysql-test/t/query_cache_28249.test:
Locked -> Table lock
mysql-test/t/sp_notembedded.test:
Locked -> Table lock
mysql-test/t/sp_sync.test:
Locked -> Table lock
mysql-test/t/status.test:
Locked -> Table lock
mysql-test/t/trigger_notembedded.test:
Locked -> Table lock
mysys/thr_alarm.c:
Added option to disable thr_alarm
mysys/thr_lock.c:
Detect loops
scripts/mysql_install_db.sh:
Give better error message if something goes wrong
sql/Makefile.am:
Added sql_handler.h
sql/lock.cc:
Split functions to allow one to cache value if store_lock() (for HANDLER functions).
- Split mysql_lock_tables() into two functions, where first one allocates MYSQL_LOCK and other other one uses it.
- Made get_lock_data() an external function.
- Added argument to mysql_unlock_tables() to not free sql_lock.
- Added argument to reset_lock_data() to reset lock structure to initial state (as after get_lock_data())
sql/mysql_priv.h:
Moved handler function prototypes to sql_handler.h
Added new lock functions.
sql/mysqld.cc:
Added --thread-alarm startup option
sql/net_serv.cc:
Don't call vio_blocking() if not needed
sql/sql_base.cc:
include sql_handler.h
sql/sql_class.cc:
include sql_handler.h
Remove not anymore used 'thd->locked' member
sql/sql_class.h:
Remove not anymore used 'thd->locked' member
sql/sql_db.cc:
include sql_handler.h
sql/sql_delete.cc:
include sql_handler.h
sql/sql_handler.cc:
Rewrote all code to use SQL_HANDLER instead of TABLE_LIST (original interface)
Rewrote mysql_ha_open() to cache all things from TABLE_LIST and items for field list, where etc.
In mysql_ha_open() also cache MYSQL_LOCK structure from get_lock_data().
Split functions into smaller sub functions (needed to be able to implement mysql_ha_read_prepare())
Added mysql_ha_read_prepare() to allow one to prepare HANDLER READ.
sql/sql_handler.h:
Interface to sql_handler.cc
sql/sql_parse.cc:
include sql_handler.h
sql/sql_prepare.cc:
Added mysql_test_handler_read(), prepare for HANDLER READ
sql/sql_rename.cc:
include sql_handler.h
sql/sql_show.cc:
Removed usage of thd->locked
sql/sql_table.cc:
include sql_handler.h
sql/sql_trigger.cc:
include sql_handler.h
- Removed files specific to compiling on OS/2
- Removed files specific to SCO Unix packaging
- Removed "libmysqld/copyright", text is included in documentation
- Removed LaTeX headers for NDB Doxygen documentation
- Removed obsolete NDB files
- Removed "mkisofs" binaries
- Removed the "cvs2cl.pl" script
- Changed a few GPL texts to use "program" instead of "library"
On this platform we seem to get lots of other signals
while waiting for SIGKILL to be delivered.
Solution: use sigsuspend(<all signals blocked>)
dbug/dbug.c:
New function _db_suicide_() which does kill(myself, -9) and then waits forever.
include/my_dbug.h:
Let DBUG_SUICE wait forever until the KILL signal is delivered, and process dies.
- This allows us to detect missing my_afree() calls and also find overruns (when running with valgrind) to alloca() areas.
- Added missing my_afree() calls
- Fixed wrong call to my_afree()
include/my_sys.h:
When compiling with valgrind, change my_alloca() to use my_malloc()
mysql-test/suite/innodb/t/innodb_bug57255.test:
Speed up taste case (patch from Stewart Smith)
mysql-test/suite/innodb_plugin/t/innodb_bug57255.test:
Speed up taste case (patch from Stewart Smith)
sql/ha_partition.cc:
Removed casts from my_afree()
sql/opt_range.cc:
Add missing my_afree() calls.
storage/maria/ma_rt_split.c:
Fixed wrong parameter to my_afree()
my_seek() and my_tell() functions now honour MY_WME flag.
include/mysys_err.h:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/errors.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/my_seek.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- my_seek() and my_tell() handle MY_WME flag.
mysys/my_symlink.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- __attribute__((unused)) removed, as myf MyFlags is
actually used in the my_realpath() function.
storage/myisam/ha_myisam.cc:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- check my_seek() result.
- Fixed problem with oqgraph and 'make dist'
Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
- Remove all mentioning of /MAP /MAPINFO link options (does not work in VS2010).
Remove map files from packaging.
- Fix warning about ETIMEDOUT being redefined.
- Fix warning about FSP_EXTENT_SIZE in xtradb (32/64 bit right shift mismatch)
- Silence warnings coming from generated code (flex/bison) in xtradb/innodb_plugin.
- Be nice to people without cygwin (me) and add win/configure-mariadb.bat with options suitable for quick compilation, e.g no embedded
When installing plugins, there is a missing check
for slash (/) in the path on Windows. Note that on
Windows, both / and \ can be used to separate
directories.
This patch fixes the issue by:
- Adding a FN_DIRSEP symbol for all platforms
consisting of a string of legal directory
separators.
- Adding a charset-aware version of strcspn().
- Adding a check_valid_path() function that uses
my_strcspn() to check if any FN_DIRSEP character
is in the supplied string.
- Using the check_valid_path() function in
sql_plugin.cc and sql_udf.cc (which means
replacing the existing test there).
include/config-netware.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
include/config-win.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
include/m_ctype.h:
Adding my_strspn() and my_strcspn().
******
Adding my_strspn() and my_strcspn().
include/my_global.h:
Adding FN_DIRSEP
******
Adding FN_DIRSEP
mysql-test/t/plugin_not_embedded.test:
Adding test that file names containing / is
disallowed on *all* platforms.
******
Adding test that file names containing / is
disallowed on *all* platforms.
sql/sql_plugin.cc:
Introducing check_if_path() function for
checking if filename is a path to include
/ on Windows.
******
Introducing check_if_path() function for
checking if filename is a path to include
/ on Windows.
sql/sql_udf.cc:
Switching to use check_if_path() function.
******
Switching to use check_if_path() function.
strings/my_strchr.c:
Adding my_strspn() and my_strcspn().
******
Adding my_strspn() and my_strcspn().
The problem is that the logic which checks if a pointer is
valid relies on a poor heuristic based on the start and end
addresses of the data segment and heap.
Apart from miscalculating the heap bounds, this approach also
suffers from the fact that memory can come from places other
than the heap. See Bug#58528 for a more detailed explanation.
On Linux, the solution is to access the process's memory
through /proc/self/task/<tid>/mem, which allows for retrieving
the contents of pages within the virtual address space of
the calling process. If a address range is not mapped, a
input/output error is returned.
client/mysqltest.cc:
Use new interface to my_safe_print_str.
include/my_stacktrace.h:
Drop name from my_safe_print_str.
mysys/stacktrace.c:
Access the process's memory through a file descriptor and
dump the contents of the memory range. The file descriptor
offset is equivalent to a offset into the address space.
Do not print the name of the variable associated with the
address. It can be better accomplished at a higher level.
sql/mysqld.cc:
Put the variable dumping information within its own newline block.
Use symbolic names which better convey information to the user.
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
- Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255
- Werror is disabled; Should be enabled after merge with xtradb.
Use __builtin_stpcpy only if the system supports stpcpy.
This is necessary as in some cases a call to stpcpy will
be emitted if the built-in can not optimized.
include/m_string.h:
The expansion of stpcpy (in glibc) causes warnings if the
return value of strmov is not being used. Since stpcpy is
a GNU extension and the expansion ends up using a built-in
provided by GCC, use the compiler provided built-in directly
when possible. Nonetheless, the C library must have stpcpy
as a call be emitted if the built-in can not optimized.
Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c
Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c
Bug#57994: Compiler flag change build error : my_redel.c
Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c
Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c
Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc
Fix assorted compiler generated warnings.
cmd-line-utils/readline/bind.c:
Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c
Initialize variable to work around a false positive warning.
include/m_string.h:
Bug#57994: Compiler flag change build error : my_redel.c
The expansion of stpcpy (in glibc) causes warnings if the
return value of strmov is not being used. Since stpcpy is
a GNU extension and the expansion ends up using a built-in
provided by GCC, use the compiler provided built-in directly
when possible.
include/my_compiler.h:
Define a dummy MY_GNUC_PREREQ when not compiling with GCC.
libmysql/libmysql.c:
Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure
Variable might not be used in some cases. So, tag it as unused.
mysys/mf_keycache.c:
Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c
Use UNINIT_VAR to work around a false positive warning.
mysys/my_getncpus.c:
Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c
Declare variable in the same block where it is used.
regex/regexec.c:
Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c
Work around a compiler bug which causes the cast to not be enforced.
sql/debug_sync.cc:
Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc
Use UNINIT_VAR to work around a false positive warning.
sql/handler.cc:
Use UNINIT_VAR to work around a false positive warning.
sql/slave.cc:
Use UNINIT_VAR to work around a false positive warning.
sql/sql_partition.cc:
Use UNINIT_VAR to work around a false positive warning.
storage/myisam/ft_nlq_search.c:
Use UNINIT_VAR to work around a false positive warning.
storage/myisam/mi_create.c:
Use UNINIT_VAR to work around a false positive warning.
storage/myisammrg/myrg_open.c:
Use UNINIT_VAR to work around a false positive warning.
tests/mysql_client_test.c:
Change function to take a pointer to const, no need for a cast.
Quoting from the bug report:
The pstack library has been included in MySQL since version
4.0.0. It's useless and should be removed.
Details: According to its own documentation, pstack only works
on Linux on x86 in 32 bit mode and requires LinuxThreads and a
statically linked binary. It doesn't really support any Linux
from 2003 or later and doesn't work on any other OS.
The --enable-pstack option is thus deprecated and has no effect.
Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in Aria log handler.
extra/replace.c:
Updated call to my_redel()
include/maria.h:
Updated prototype for maria_change_to_newfile
include/my_sys.h:
Updated prototypes
Added my_create_backup_name
include/myisam.h:
Updated prototypes
include/myisamchk.h:
Added 'backup_time' to st_handler_check_param to be able to generate same name for backuped data and index file
mysys/my_redel.c:
Added time_t option to my_redel() to be able to generate same backup extensions for many files
sql/handler.cc:
Added start_time to st_ha_check_opt
sql/handler.h:
Added start_time to HA_CHECK_OPT
sql/mysqld.cc:
Added option BACKUP_ALL to --myisam-recover
storage/maria/ha_maria.cc:
Remember start time for repair
storage/maria/ma_check.c:
Use remembered start time for backup file names
Removed some dead code
storage/maria/ma_loghandler.c:
Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in log handler.
storage/maria/maria_chk.c:
Removed dead code (O_NEW_INDEX was never set)
Report if table was 'crashed on repair'
storage/maria/maria_pack.c:
Updated parameters to my_redel()
storage/myisam/ha_myisam.cc:
Added recover option BACKUP_ALL to get a backup of the index file before it's repaired.
Print information to log if we make a backup of data as part of repair.
storage/myisam/ha_myisam.h:
Added HA_RECOVER_FULL_BACKUP
storage/myisam/mi_check.c:
Use remembered start time for backup file names
Added mi_make_backup_of_index()
storage/myisam/myisamchk.c:
Removed dead code (O_NEW_INDEX was never set)
Report if table was 'crashed on repair'
storage/myisam/myisampack.c:
Updated call to my_redel()
Added locking of lock mutex when updating status in external_unlock() for Aria and MyISAM tables.
Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards. (Allows one to run --debug with mysql-test-run scripts that uses @debug)
Fixed several core dump, deadlock and crashed table bugs in handling of LOCK TABLE with MERGE tables:
- Added priority of locks to avoid crashes with MERGE tables.
- Added thr_lock_merge() to allow one to merge two results of thr_lock().
Fixed 'not found row' bug in REPLACE with Aria tables.
Mark MyISAM tables that are part of MERGE with HA_OPEN_MERGE_TABLE and set the locks to have priority THR_LOCK_MERGE_PRIV.
- By sorting MERGE tables last in thr_multi_unlock() it's safer to release and relock them many times (can happen when TRIGGERS are created)
Avoid printing (null) in debug file (to easier find out wrong NULL pointer usage with %s).
client/mysql.cc:
Fixed that 'source' command doesn't cause mysql command line tool to exit on error.
client/mysqltest.cc:
Don't send NULL to fn_format(). (Can cause crash on Solaris when using --debug)
dbug/dbug.c:
DEBUG_EXECUTE() and DEBUG_EVALUATE_IF() should not execute things based on wildcards.
include/my_base.h:
Added flag to signal if one opens a MERGE table.
Added extra() command to signal that one is not part of a MERGE table anymore.
include/thr_lock.h:
Added priority for locks (needed to fix bug in thr_lock when using MERGE tables)
Added option to thr_unlock() if get_status() should be called.
Added prototype for thr_merge_locks().
mysql-test/mysql-test-run.pl:
Ignore crashed table warnings for tables named 'crashed'.
mysql-test/r/merge.result:
Renamed triggers to make debugging easier.
Added some CHECK TABLES to catch errors earlier.
Additional tests.
mysql-test/r/merge_debug.result:
Test of error handling when reopening MERGE tables.
mysql-test/r/udf_query_cache.result:
Added missing flush status
mysql-test/suite/parts/r/partition_repair_myisam.result:
Update results
mysql-test/t/merge.test:
Renamed triggers to make debugging easier.
Added some CHECK TABLES to catch errors earlier.
Additional tests.
mysql-test/t/merge_debug.test:
Test of error handling when reopening MERGE tables.
mysql-test/t/udf_query_cache.test:
Added missing flush status
mysys/my_getopt.c:
Removed not used variable
mysys/my_symlink2.c:
Changed (null) to (NULL) to make it easier to find NULL arguments to DBUG_PRINT() functions.
(On linux, NULL to sprintf is printed 'null')
mysys/thr_lock.c:
Added priority of locks to avoid crashes with MERGE tables.
Added thr_lock_merge() to allow one to merge two results of thr_lock().
- This is needed for MyISAM as all locked table must share the same status. If not, you will not see newly inserted rows in other instances of the table.
If calling thr_unlock() with THR_UNLOCK_UPDATE_STATUS, call update_status() and restore_status() for the locks. This is needed in some rare cases where we call thr_unlock() followed by thr_lock() without calling external_unlock/external_lock in between.
Simplify loop in thr_multi_lock().
Added 'start_trans', which is called at end of thr_multi_lock() when all locks are taken.
- This was needed by Aria to ensure that transaction is started when we got all locks, not at get_status(). Without this, some rows could not be visible when we lock two tables at the same time, causing REPLACE using two tables to fail unexpectedly.
sql/handler.cc:
Add an assert() in handler::print_error() for "impossible errors" (like table is crashed) when --debug-assert-if-crashed-table is used.
sql/lock.cc:
Simplify mysql_lock_tables() code if get_lock_data() returns 0 locks.
Added new parameter to thr_multi_unlock()
In mysql_unlock_read_tables(), call first externa_unlock(), then thr_multi_unlock(); This is same order as we do in mysql_unlock_tables().
Don't abort locks in mysql_lock_abort() for merged tables when a MERGE table is deleted; Would cause a spin lock.
Added call to thr_merge_locks() in mysql_lock_merge() to ensure consistency in thr_locks().
- New locks of same type and table is stored after the old lock to ensure that we get the status from the original lock.
sql/mysql_priv.h:
Added debug_assert_if_crashed_table
sql/mysqld.cc:
Added --debug-assert-if-crashed-table
sql/parse_file.cc:
Don't print '(null)' in DBUG_PRINT of no dir given
sql/set_var.cc:
Increase default size of buffer for @debug variable.
sql/sql_base.cc:
In case of error from reopen_table() in reopen_tables(), call unlock_open_table() and restart loop.
- This fixed bug when we twice deleted same table from open_cache.
Don't take name lock for already name locked table in open_unireg_entry().
- Fixed bug when doing repair in reopen_table().
- In detach_merge_children(), always detach if 'clear_refs' is given. We can't trust parent->children_attached as this function can be called twice, first time with clear_refs set to 0.
sql/sql_class.cc:
Changed printing of (null) to "" in set_thd_proc_info()
sql/sql_parse.cc:
Added DBUG
sql/sql_trigger.cc:
Don't call unlink_open_table() if reopen_table() fails as the table may already be freed.
storage/maria/ma_bitmap.c:
Fixed DBUG_ASSERT() in allocate_tail()
storage/maria/ma_blockrec.c:
Fixed wrong calculation of row length for very small rows in undo_row_update().
- Fixes ASSERT() when doing undo.
storage/maria/ma_blockrec.h:
Added _ma_block_start_trans() and _ma_block_start_trans_no_versioning()
storage/maria/ma_locking.c:
Call _ma_update_status_with_lock() when releasing write locks.
- Fixes potential problem with updating status without the proper lock.
storage/maria/ma_open.c:
Changed to use start_trans() instead of get_status() to ensure that we see all rows in all locked tables when we got the locks.
- Fixed 'not found row' bug in REPLACE with Aria tables.
storage/maria/ma_state.c:
Added _ma_update_status_with_lock() and _ma_block_start_trans().
This is to ensure that we see all rows in all locked tables when we got the locks.
storage/maria/ma_state.h:
Added _ma_update_status_with_lock()
storage/maria/ma_write.c:
More DBUG_PRINT
storage/myisam/mi_check.c:
Fixed error message
storage/myisam/mi_extra.c:
Added HA_EXTRA_DETACH_CHILD:
- Detach MyISAM table to not be part of MERGE table (remove flag & lock priority).
storage/myisam/mi_locking.c:
Call mi_update_status_with_lock() when releasing write locks.
- Fixes potential problem with updating status without the proper lock.
Change to use new HA_OPEN_MERGE_TABLE flag to test if MERGE table.
Added mi_fix_status(), called by thr_merge().
storage/myisam/mi_open.c:
Added marker if part of MERGE table.
Call mi_fix_status() in thr_lock() for transactional tables.
storage/myisam/myisamdef.h:
Change my_once_flag to uint, as it stored different values than just 0/1
Added 'open_flag' to store state given to mi_open()
storage/myisammrg/ha_myisammrg.cc:
Add THR_LOCK_MERGE_PRIV to THR_LOCK_DATA to get MERGE locks sorted after other types of locks.
storage/myisammrg/myrg_locking.c:
Remove windows specific code.
storage/myisammrg/myrg_open.c:
Use HA_OPEN_MERGE_TABLE to mi_open().
Set HA_OPEN_MERGE_TABLE for linked MyISAM tables.
storage/xtradb/buf/buf0buf.c:
Fixed compiler warning
storage/xtradb/buf/buf0lru.c:
Initialize variable that could be used not initialized.
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.
This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.
include/my_compiler.h:
Use GCC's __builtin_unreachable if available. It allows
GCC to deduce the unreachability of certain code paths,
thus avoiding warnings that, for example, accused that a
variable could be used without being initialized (due to
unreachable code paths).
Fix assorted compiler warnings.
include/my_pthread.h:
Like for pthread_cond_timedwait, the abstime is constant.
mysys/my_gethwaddr.c:
Instead of using a manual copy that introduce warnings due to
type mismatch, copy the buffer using memcpy and use memcmp to
check whether all bytes of the buffer are zeroed.
mysys/thr_mutex.c:
Like for pthread_cond_timedwait, the abstime is constant.
unittest/mytap/tap.h:
Introduce a ok() variant that does not take a format argument.
Since ok() is tagged with a printf attribute, GCC complains if
the fmt argument is NULL.
For crash testing: kill the server without generating core file.
include/my_dbug.h
Use kill(getpid(), SIGKILL) which cannot be caught by signal handlers.
All DBUG_XXX macros should be no-ops in optimized mode, do that for DBUG_ABORT as well.
sql/handler.cc
Kill server without generating core.
sql/log.cc
Kill server without generating core.
The reason for this was that some bitmap test functions changed the bitmap, which caused problems when the same bitmap was used by multiple threads.
include/my_bitmap.h:
Changed order of elements to get better alignment.
mysys/my_bitmap.c:
Change bitmap test functions to not modify the bitmap.
Fixed compiler errors in test_bitmap
Fixed failing pbxt test
include/maria.h:
Added maria_upgrade()
mysql-test/suite/pbxt/r/select.result:
Don't print number of rows as this is not constant over different runs
mysql-test/suite/pbxt/t/select.test:
Don't print number of rows as this is not constant over different runs
storage/maria/ha_maria.cc:
Run maria_upgrade() before maria_init()
storage/maria/ma_init.c:
Move maria_upgrade() out of maria_init() as in standalone programs maria_data_root is not set.
Fix cleanup to really remove 'aria_log' files. Fixes failures in maria unit tests on some platforms.
Fixed compiler warnings
include/mysql/plugin.h:
Changed def_val back to const, to remove compiler warnings.
storage/maria/ma_init.c:
Rename control file and log files from maria_xxx to aria_xxx when upgrading from MariaDB 5.1
storage/maria/unittest/ma_maria_log_cleanup.c:
Fix cleanup to really remove 'aria_log' files. Fixes failures in maria unit tests on some platforms.
for a prepared statement.
include/mysql.h:
enumerator MYSQL_STATUS_STATEMENT_GET_RESULT was added
into mysql_status enum.
include/mysql.h.pp:
enumerator MYSQL_STATUS_STATEMENT_GET_RESULT was added
into mysql_status enum.
libmysql/libmysql.c:
Introduce a separate mysql state to distinguish the situation
when we have a binary result set pending on the server from the
situation when the result set is in text protocol.
execute() modified: if mysql->status == MYSQL_STATUS_GET_RESULT
before return then set it to value MYSQL_STATUS_STATEMENT_GET_RESULT.
stmt_read_row_unbuffered() and mysql_stmt_store_result()
were modified: added checking for mysql->status against
MYSQL_STATUS_STATEMENT_GET_RESULT value instead of MYSQL_STATUS_GET_RESULT.
tests/mysql_client_test.c:
added test_bug47485()
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
This will give a smoother experience when using the Aria engine by those that are using default limits
without still causing a notable problem for desktop users.
Make the my_compiler.h header, like my_attribute.h, part of
the distribution. This is required due to the dependency of
the former on the latter (which can undefine __attribute__).
Fixed LP#613418 (M)aria recovery failure: ma_key_recover.c:981: _ma_apply_redo_index: Assertion `check_page_length == page_length' failed
include/my_sys.h:
Added my_disable_sync
mysql-test/mysql-test-run.pl:
Added --sync-sys=0 to run test suite faster
mysys/my_static.c:
Added my_disable_sync
mysys/my_sync.c:
Added my_disable_sync
sql/mysqld.cc:
Added -sync-sys=0 option for mysqld to skip sync() calls for faster testing
storage/maria/ma_key_recover.c:
More DBUG_ASSERT()
Added logging of KEY_OP_DEBUG to make examening of logs easier
Fixed testing of page length in recovery to ensure we don't overwrite checksum (previous tests was too relaxed)
Fixed bug in recovery logging of split pages which caused failure during recovery:
- Length was not adjusted properly for pages to be split
- Added KEY_OP_MAX_PAGELENGTH to tell recovery that page is now full length
- This fixed LP#613418
storage/maria/ma_key_recover.h:
Changed prototype for ma_log_change() for KEY_OP_DEBUG
storage/maria/ma_loghandler.h:
Added new enums for better debugging of recovery logs
storage/maria/ma_rt_index.c:
Added debugging information to calls to ma_log_change()
storage/maria/ma_write.c:
Added debugging information to calls to ma_log_change() and ma_log_split()
Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
client/mysqltest.cc:
longlong2str() -> longlong10_to_str()
include/m_string.h:
Added extra argument to longlong2str() to make it have same prototype is int2str()
mysys/charset.c:
Fixed compiler warning
mysys/mf_soundex.c:
Fixed compiler warning
mysys/my_getopt.c:
longlong2str() -> longlong10_to_str()
sql/create_options.cc:
Fixed compiler warning
sql/item_strfunc.cc:
Added extra argument to longlong2str
sql/opt_range.cc:
longlong2str() -> longlong10_to_str()
sql/partition_info.cc:
longlong2str() -> longlong10_to_str()
sql/slave.cc:
longlong2str() -> longlong10_to_str()
sql/sql_bitmap.h:
Added extra argument to longlong2str
sql/sql_partition.cc:
Added extra argument to longlong2str
sql/sql_select.cc:
longlong2str() -> longlong10_to_str()
sql/sql_show.cc:
Added extra argument to longlong2str
storage/innodb_plugin/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
storage/maria/ma_dbug.c:
longlong2str() -> longlong10_to_str()
storage/maria/maria_chk.c:
Added extra argument to longlong2str
storage/myisam/mi_dbug.c:
longlong2str() -> longlong10_to_str()
storage/myisam/myisamchk.c:
Added extra argument to longlong2str
storage/xtradb/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
strings/longlong2str.c:
Added extra argument to longlong2str() to make it have same prototype is int2str()
strings/my_vsnprintf.c:
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
Added cast to get rid of compiler warnings
This was triggered by innodb.innodb_multi_update, where we had a static length row without nulls and xtradb didn't fill in the delete-marker byte
include/my_bitmap.h:
Added prototype for bitmap_union_is_set_all()
mysys/my_bitmap.c:
Added function to check if union of two bit maps covers all bits.
sql/mysql_priv.h:
Updated protype for compare_record()
sql/sql_insert.cc:
Send to compare_record() flag if all fields are used.
sql/sql_select.cc:
Set share->null_bytes_for_compare.
sql/sql_update.cc:
In compare_record() don't use the fast cmp_record() (which is basically memcmp) if we don't know that all fields exists.
Don't compare the null_bytes if there is no data there.
sql/table.cc:
Store in share->null_bytes_for_compare the number of bytes that has null or bit fields (but not delete marker)
Store in can_cmp_whole_record if we can use memcmp() (assuming all rows are read) to compare rows in compare_record()
sql/table.h:
Added two elements in table->share to speed up checking how updated rows can be compared.
Reverted the ulong->uint diff
Re-applied the first diff.
The original commit message follows:
enum plugin system variables are ulong internally, not int.
On systems where long is not the same as an int it causes
problems.
Fixed by correct typecasting. Removed the test from the
experimental list.
The enum system variables were handled inconsistently
as ints, unsigned int and unsigned long on various places.
This caused problems on platforms on which
sizeof(int) != sizeof(long).
Fixed by homogenizing the type of the enum variables
to unsigned int, since it's size compatible with the C enum
type.
Removed the test from the experimental list.
Speed up some PBXT tests by adding begin...commit around creating of testing tables.
include/my_base.h:
Fixed wrong constant
mysql-test/mysql-test-run.pl:
Print MariaDB instead of MySQL
mysql-test/r/range.result:
Move test that required partitions to parts.optimizer
mysql-test/suite/innodb_plugin/t/disabled.def:
Disable test that causes valgrind warning about not released memory in xtradb
mysql-test/suite/parts/r/optimizer.result:
Moved from range.result
mysql-test/suite/parts/t/optimizer.test:
Moved from range.test
mysql-test/suite/pbxt/r/join_nested.result:
Updated results after optimizer changes
mysql-test/suite/pbxt/r/renamedb.result:
Updated test for new error message
mysql-test/suite/pbxt/t/check.test:
Speed up test
mysql-test/suite/pbxt/t/count_distinct2.test:
Speed up test
mysql-test/suite/pbxt/t/derived.test:
Speed up test
mysql-test/suite/pbxt/t/renamedb.test:
Updated test for new error message
mysql-test/suite/rpl/r/rpl_log_pos.result:
Updated results
mysql-test/suite/rpl/t/rpl_log_pos.test:
Update test to read from a position that has 'known wrong' data.
The orignal test read a timestamp, so the error message could differ between runs.
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
Sync to slave to make test predictable
mysql-test/t/events_time_zone.test:
Extend wait to make test predictable
mysql-test/t/range.test:
Move test that required partitions to parts.optimizer
sql/sql_list.h:
Fixed compiler warning
sql/sql_load.cc:
buffer was not freed in some error conditions
tests/mysql_client_test.c:
Fixed compiler warning
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
client/mysql.cc:
Meaningless pointer dereferences.
client/mysql_upgrade.c:
Check whether reading from the file succeeded.
extra/comp_err.c:
Unused.
extra/yassl/src/yassl_imp.cpp:
Skip instead of reading data that is discarded.
include/my_pthread.h:
Variable is only used in debug builds.
include/mysys_err.h:
Add new error messages.
mysys/errors.c:
Add new error message for permission related functions.
mysys/mf_iocache.c:
Variable is only checked under THREAD.
mysys/my_copy.c:
Raise a error if chmod or chown fails.
mysys/my_redel.c:
Raise a error if chmod or chown fails.
regex/engine.c:
Use a equivalent variable for the assert.
server-tools/instance-manager/instance_options.cc:
Unused.
sql/field.cc:
Unused.
sql/item.cc:
Unused.
sql/log.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
Adjust doxygen comment to the right function.
Pass message lenght to log function.
sql/mysqld.cc:
Do not ignore the return value of freopen: only set buffer if
reopening succeeds.
sql/partition_info.cc:
Unused.
sql/slave.cc:
No need to set pointer to the address of '\0'.
sql/spatial.cc:
Unused. Left for historical purposes.
sql/sql_acl.cc:
Unused.
sql/sql_base.cc:
Pointers are always set to the same variables.
sql/sql_parse.cc:
End statement if reading fails.
Store the buffer after it has actually been updated.
sql/sql_repl.cc:
No need to set pointer to the address of '\0'.
sql/sql_show.cc:
Put variable under the same ifdef block.
sql/udf_example.c:
Set null pointer flag appropriately.
storage/csv/ha_tina.cc:
Meaningless dereferences.
storage/example/ha_example.cc:
Return the error since it's available.
storage/myisam/mi_locking.c:
Remove unused and dead code.
due to GCC preprocessor change
The problem is that newer GCC versions treats missing headers
as fatal errors. The solution is to use a guard macro to prevent
the inclusion of system headers when checking the ABI with the
C Preprocessor.
Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
Makefile.am:
Define guard macro.
configure.in:
Remove workaround.
include/mysql.h:
Guard the header inclusion.
include/mysql.h.pp:
Header is not included anymore.
Fixed compiler warnings.
queues.h and queues.c are now based on the UNIREG code and thus made BSD.
Fix code to use new queue() interface. This mostly affects how you access elements in the queue.
If USE_NET_CLEAR is not set, don't clear connection from unexpected characters. This should give a speed up when doing a lot of fast queries.
Fixed some code in ma_ft_boolean_search.c that had not made it from myisam/ft_boolean_search.c
include/queues.h:
Use UNIREG code base (BSD)
Changed init_queue() to take all initialization arguments.
New interface to access elements in queue
include/thr_alarm.h:
Changed to use time_t instead of ulong (portability)
Added index_in_queue, to be able to remove random element from queue in O(1)
mysys/queues.c:
Use UNIREG code base (BSD)
init_queue() and reinit_queue() now takes more initialization arguments. (No need for init_queue_ex() anymore)
Now one can tell queue_insert() to store in the element a pointer to where element is in queue. This allows one to remove elements from queue in O(1) instead of O(N)
mysys/thr_alarm.c:
Use new option in queue() to allow fast removal of elements.
Do less inside LOCK_alarm mutex.
This should give a major speed up of thr_alarm usage when there is many threads
sql/create_options.cc:
Fixed wrong printf
sql/event_queue.cc:
Use new queue interface()
sql/filesort.cc:
Use new queue interface()
sql/ha_partition.cc:
Use new queue interface()
sql/ha_partition.h:
Fixed compiler warning
sql/item_cmpfunc.cc:
Fixed compiler warning
sql/item_subselect.cc:
Use new queue interface()
Removed not used variable
sql/net_serv.cc:
If USE_NET_CLEAR is not set, don't clear connection from unexpected characters.
This should give a speed up when doing a lot of fast queries at the disadvantage that if there is a bug in the client protocol the connection will be dropped instead of being unnoticed.
sql/opt_range.cc:
Use new queue interface()
Fixed compiler warnings
sql/uniques.cc:
Use new queue interface()
storage/maria/ma_ft_boolean_search.c:
Copy code from myisam/ft_boolean_search.c
Use new queue interface()
storage/maria/ma_ft_nlq_search.c:
Use new queue interface()
storage/maria/ma_sort.c:
Use new queue interface()
storage/maria/maria_pack.c:
Use new queue interface()
Use queue_fix() instead of own loop to fix queue.
storage/myisam/ft_boolean_search.c:
Use new queue interface()
storage/myisam/ft_nlq_search.c:
Use new queue interface()
storage/myisam/mi_test_all.sh:
Remove temporary file from last run
storage/myisam/myisampack.c:
Use new queue interface()
Use queue_fix() instead of own loop to fix queue.
storage/myisam/sort.c:
Use new queue interface()
storage/myisammrg/myrg_queue.c:
Use new queue interface()
storage/myisammrg/myrg_rnext.c:
Use new queue interface()
storage/myisammrg/myrg_rnext_same.c:
Use new queue interface()
storage/myisammrg/myrg_rprev.c:
Use new queue interface()
POSIX requires that a signal handler defined with sigaction()
is not reset on delivering a signal unless SA_NODEFER or
SA_RESETHAND is set. It is therefore unnecessary to redefine
the handler on signal delivery on platforms where sigaction()
is used without those flags.
include/my_alarm.h:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY.
include/my_global.h:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY. The latter is now defined
only on non-BSD platforms missing the POSIX sigaction()
function.
libmysql/libmysql.c:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
mysys/thr_alarm.c:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
sql/mysqld.cc:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
The default value of the myisam_max_extra_sort_file_size could be
higher than the maximum accepted value, leading to warnings upon
the server start.
The solution is to simply set the value to the maximum value in a
32-bit built (2147483647, one less than the current). This should
be harmless as the option is currently unused in 5.1.
include/myisam.h:
Remove now-unused macro.
sql/mysqld.cc:
Set max value to INT_MAX32.
Most of the changes are backports from MySQL 5.5. Please note
that the 64-bit build fails with VS 2010 and the 32-bit build
has problems running mysql-test-run.pl.
* Added files for compiling with VS 2010 and added them
to Makefile.am.
* ifdef'ed ETIMEDOUT, because it is defined by VS 2010 now
* Removed not needed /MAP's from cmake files
strict aliasing violations.
Post-merge fix: include my_compiler.h before my_attribute.h
as the latter will undef __attribute__ if the compiler is not
GCC. Based on the compiler version, in my_compiler.h we know
for sure whether the aligned attribute is supported. Furthermore,
undefining attribute might cause bugs if some system header
uses it.
include/my_compiler.h:
Drop aligned attribute support from Sun Studio C++ compiler
as its not clear exactly which version of it supports the
attribute.
strict aliasing violations.
Another rather noisy violation of strict aliasing rules
is the spatial code which makes use of stack-based memory
(of type Geometry_buffer) to provide placement for Geometry
objects. Although a placement new is allowed to dynamically
change the type of a object, the object returned by the
new placement was being ignored and the original stack-based
object was being casted to the new type, thus violating strict
aliasing rules.
The solution is to reorganize the code so that the object
returned by the new placement is used instead of casting the
original object. Also, to ensure that the stack-based object
is properly aligned with respect to the objects it provides
placement for, a set of compiler-dependent macros and types
are introduced so that the alignment of objects can be inquired
and specified.
include/Makefile.am:
Add new header.
include/my_compiler.h:
Add new header.
include/my_global.h:
Remove now-unnecessary macros.
sql/spatial.cc:
Make object creation functions return the object whose type
was dynamically changed by the new placement.
Move static method from the header in order to avoid having
to access a forward declaration.
sql/spatial.h:
Object creation callbacks now take a array of chars as the
storage area.
Move create_by_typeid to a source file as to not access the
forward declaration of Geometry_buffer.
Ensure that Geometry_buffer is properly aligned.
sql/sql_show.cc:
Use newly added aligned storage helper.
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
The atomic operations implementation on 5.1 has a few problems,
which might cause tests to abort randomly. Since no code in 5.1
uses atomic operations, simply remove the code.
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.
One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.
There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.
BUILD/SETUP.sh:
Remove flags that are implied by -Wall and -Wextra.
Do not warn about unused parameters in C++.
BUILD/check-cpu:
Print only the compiler version instead of verbose banner.
Although the option is gcc specific, the check was only
being used for GCC specific checks anyway.
client/mysql.cc:
bcmp is no longer defined.
client/mysqltest.cc:
Pass a string to function expecting a format string.
Replace use of bcmp with memcmp.
cmd-line-utils/readline/Makefile.am:
Always define _GNU_SOURCE when compiling GNU readline.
Required to make certain prototypes visible.
cmd-line-utils/readline/input.c:
Condition for the code to be meaningful.
configure.in:
Remove check for bcmp.
extra/comp_err.c:
Use appropriate type.
extra/replace.c:
Replace use of bcmp with memcmp.
extra/yassl/src/crypto_wrapper.cpp:
Do not ignore the return value of fgets. Retrieve the file
position if fgets succeed -- if it fails, the function will
bail out and return a error.
extra/yassl/taocrypt/include/blowfish.hpp:
Use a single array instead of accessing positions of the sbox_
through a subscript to pbox_.
extra/yassl/taocrypt/include/runtime.hpp:
One definition of such functions is enough.
extra/yassl/taocrypt/src/aes.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/algebra.cpp:
Rename arguments to avoid shadowing related warnings.
extra/yassl/taocrypt/src/blowfish.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/integer.cpp:
Do not define type within a anonymous union.
Use a variable to return a value instead of
leaving the result in a register -- compiler
does not know the logic inside the asm.
extra/yassl/taocrypt/src/misc.cpp:
Define handler for pure virtual functions.
Remove unused code.
extra/yassl/taocrypt/src/twofish.cpp:
Avoid potentially ambiguous conditions.
extra/yassl/testsuite/test.hpp:
Function must have C language linkage.
include/m_string.h:
Remove check which relied on bcmp being defined -- they weren't
being used as bcmp is only visible when _BSD_SOURCE is defined.
include/my_bitmap.h:
Remove bogus helpers which were used only in a few files and
were causing warnings about dead code.
include/my_global.h:
Due to G++ bug, always silence false-positive uninitialized
variables warnings when compiling C++ code with G++.
Remove bogus helper.
libmysql/Makefile.shared:
Remove built-in implementation of bcmp.
mysql-test/lib/My/SafeProcess/safe_process.cc:
Cast pid to largest possible type for a process identifier.
mysys/mf_loadpath.c:
Leave space of the ending nul.
mysys/mf_pack.c:
Replace bcmp with memcmp.
mysys/my_bitmap.c:
Dead code removal.
mysys/my_gethwaddr.c:
Remove unused variable.
mysys/my_getopt.c:
Silence bogus uninitialized variable warning.
Do not cast away the constant qualifier.
mysys/safemalloc.c:
Cast to expected type.
mysys/thr_lock.c:
Silence bogus uninitialized variable warning.
sql/field.cc:
Replace bogus helper with a more appropriate logic which is
used throughout the code.
sql/item.cc:
Remove bogus logical condition which always evaluates to TRUE.
sql/item_create.cc:
Simplify code to avoid signedness related warnings.
sql/log_event.cc:
Replace use of bcmp with memcmp.
No need to use helpers for simple bit operations.
sql/log_event_old.cc:
Replace bmove_align with memcpy.
sql/mysqld.cc:
Move use declaration of variable to the ifdef block where it
is used. Remove now-unnecessary casts and arguments.
sql/set_var.cc:
Replace bogus helpers with simple and classic bit operations.
sql/slave.cc:
Cast to expected type and silence bogus warning.
sql/sql_class.h:
Don't use enum values as bit flags, the supposed type safety is
bogus as the combined bit flags are not a value in the enumeration.
sql/udf_example.c:
Only declare variable when necessary.
sql/unireg.h:
Replace use of bmove_align with memcpy.
storage/innobase/os/os0file.c:
Silence bogus warning.
storage/myisam/mi_open.c:
Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
char.
storage/myisam/mi_page.c:
Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
char.
strings/bcmp.c:
Remove built-in bcmp.
strings/ctype-ucs2.c:
Silence bogus warning.
tests/mysql_client_test.c:
Use a appropriate type as expected by simple_command().
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
client/mysqldump.c:
Fixed memory leaks
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
(OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
This did speed up logging to cvs with a magnitude for large strings.
strict aliasing violations.
Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.
As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.
The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
client/mysql.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysql_upgrade.c:
Remove now-unnecessary casts.
client/mysqladmin.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysqlbinlog.cc:
Remove now-unnecessary casts.
client/mysqlcheck.c:
Remove now-unnecessary casts.
client/mysqldump.c:
Remove now-unnecessary casts.
client/mysqlimport.c:
Remove now-unnecessary casts.
client/mysqlshow.c:
Remove now-unnecessary casts.
client/mysqlslap.c:
Remove now-unnecessary casts.
client/mysqltest.cc:
Remove now-unnecessary casts.
extra/comp_err.c:
Remove now-unnecessary casts.
extra/my_print_defaults.c:
Remove now-unnecessary casts.
Break up large strings.
extra/mysql_waitpid.c:
Remove now-unnecessary casts.
extra/perror.c:
Remove now-unnecessary casts.
extra/resolve_stack_dump.c:
Remove now-unnecessary casts.
extra/resolveip.c:
Remove now-unnecessary casts.
include/my_getopt.h:
Use a void pointer type as the opaque type to avoid problems with type
incompatibility -- GCC issues warnings when the type name is not type
compatible with a operand. As a side bonus, a explicit cast won't be
necessary anymore.
include/sslopt-longopts.h:
Remove now-unnecessary casts.
Break up large strings.
mysys/my_getopt.c:
Update opaque type and introduce a type definition for the
argument to my_getopt_register_get_addr.
server-tools/instance-manager/options.cc:
Remove now-unnecessary casts.
sql/mysqld.cc:
Remove now-unnecessary casts.
Break up large strings.
Update mysql_getopt_value prototype (the old prototype
was different from the definition anyway).
sql/sql_plugin.cc:
The type of a pointer to a function must be compatible with the
pointed-to function type, otherwise the behavior is undefined.
sql/table.cc:
The variable buf pointer to pointer to pointer to constant char
could improperly alias a incompatible type in call to fix_type_
pointers. Since this was actually dead code, it is simply removed.
sql/unireg.cc:
Remove call to get_form_pos. The code creates a new FRM file which
is always truncated and writes the form position as 0. Hence, no
need to retrieve it, we now for sure it is 0.
storage/archive/archive_reader.c:
Remove now-unnecessary casts.
storage/myisam/ft_nlq_search.c:
Read weight directly from the buffer.
storage/myisam/fulltext.h:
Add explanation about the type duality of a key buffer.
Add accessor macro to retrieve a FT float value.
storage/myisam/mi_test1.c:
Remove now-unnecessary casts.
storage/myisam/myisam_ftdump.c:
Read weight directly from the buffer.
storage/myisam/myisamchk.c:
Remove now-unnecessary casts.
storage/myisam/myisamlog.c:
A pointer to char was used to alias a pointer to pointer to
unsigned char, thus violating strict aliasing rules.
storage/myisam/myisampack.c:
Remove now-unnecessary casts.
strings/decimal.c:
Remove aliasing violation, printing the value is enough for
debugging purposes.
tests/mysql_client_test.c:
Remove now-unnecessary casts.
config/ac-macros/ssl.m4:
Enable yaSSL thread safety if linking with the server or a
thread safe client library. Avoids building a thread safe
yaSSL when only building a non-thread safe client library.
* remove handler::index_read_last()
* create handler::keyread_read_time() (was get_index_only_read_time() in opt_range.cc)
* ha_show_status() allows engine's show_status() to fail
* remove HTON_FLUSH_AFTER_RENAME
* fix key_cmp_if_same() to work for floats and doubles
* set table->status in the server, don't force engines to do it
* increment status vars in the server, don't force engines to do it
mysql-test/r/status_user.result:
correct test results - innodb was wrongly counting internal
index searches as handler_read_* calls.
sql/ha_partition.cc:
compensate for handler incrementing status counters -
we want to count only calls to underlying engines
sql/handler.h:
inline methods moved to sql_class.h
sql/key.cc:
simplify the check
sql/opt_range.cc:
move get_index_only_read_time to the handler class
sql/sp.cc:
don't use a key that's stored in the record buffer -
the engine can overwrite the buffer with anything, destroying the key
sql/sql_class.h:
inline handler methods that need to see THD and TABLE definitions
sql/sql_select.cc:
no ha_index_read_last_map anymore
sql/sql_table.cc:
remove HTON_FLUSH_AFTER_RENAME
sql/table.cc:
set HA_CAN_MEMCMP as appropriate
sql/tztime.cc:
don't use a key that's stored in the record buffer -
the engine can overwrite the buffer with anything, destroying the key
storage/myisam/ha_myisam.cc:
engines don't need to update table->status or use ha_statistic_increment anymore
storage/myisam/ha_myisam.h:
index_read_last_map is no more
include/Makefile.am:
Make my_valgrind.h global (as it's used by my_global.h)
include/my_global.h:
Include my_valgrind.h
include/my_sys.h:
TRASH() moved to my_valgrind.h
include/my_valgrind.h:
Add VALGRIND defines to mark memory
mysys/my_alloc.c:
Mark internal freed memory as undefined
Fixed some bugs introduced in 5.1.47
Disabled some tests until we have merged with latest Xtradb
configure.in:
Added testing if valgrind/memcheck.h exists
storage/pbxt/src/ha_pbxt.cc:
LOCK_plugin is not anymore locked in init
BUILD/*: Add valgrind_configs=--with-valgrind.
BUILD/*: Remove -USAFEMALLOC from valgrind_flags.
configure.in: Add AC_ARG_WITH(valgrind) and HAVE_VALGRIND.
include/my_sys.h: Define a number of MEM_ wrappers for VALGRIND_ functions.
include/my_sys.h: Make TRASH do MEM_UNDEFINED().
include/m_string.h: Remove unused macro bzero_if_purify(A,B).
_mymalloc(): Declare MEM_UNDEFINED() on the allocated memory.
_myfree(): Declare MEM_NOACCESS() on the freed memory.
storage/innobase/include/univ.i: Enable UNIV_DEBUG_VALGRIND based on
HAVE_VALGRIND rather than HAVE_purify.
Possible things to do:
* In my_global.h, remove the defined(HAVE_purify) condition
from the _WIN32 uint3korr().
* In my_global.h *int*korr(), use | instead of +
in order to keep the Valgrind V bits accurate
* Consider replacing HAVE_purify with HAVE_VALGRIND
* Use VALGRIND_CREATE_BLOCK, VALGRIND_DISCARD in mem_root and similar places
The server could be tricked to read packets indefinitely if it
received a packet larger than the maximum size of one packet.
This problem is aggravated by the fact that it can be triggered
before authentication.
The solution is to no skip big packets for non-authenticated
sessions. If a big packet is sent before a session is authen-
ticated, a error is returned and the connection is closed.
include/mysql_com.h:
Add skip flag. Only used in server builds.
sql/net_serv.cc:
Control whether big packets can be skipped.
Docs/sp-imp-spec.txt:
New sql_mode added.
include/my_base.h:
Flag in frm of create options.
libmysqld/CMakeLists.txt:
New files added.
libmysqld/Makefile.am:
New files added.
mysql-test/r/events_bugs.result:
New sql_mode added.
mysql-test/r/information_schema.result:
New sql_mode added.
mysql-test/r/sp.result:
New sql_mode added.
mysql-test/r/system_mysql_db.result:
New sql_mode added.
mysql-test/suite/funcs_1/r/is_columns_mysql.result:
New sql_mode added.
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result:
New sql_mode added.
mysql-test/t/events_bugs.test:
New sql_mode added.
mysql-test/t/sp.test:
New sql_mode added.
scripts/mysql_system_tables.sql:
New sql_mode added.
scripts/mysql_system_tables_fix.sql:
New sql_mode added.
sql/CMakeLists.txt:
New files added.
sql/Makefile.am:
New files added.
sql/event_db_repository.cc:
New sql_mode added.
sql/field.cc:
Create options support added.
sql/field.h:
Create options support added.
sql/ha_partition.cc:
Create options support added.
sql/handler.cc:
Create options support added.
sql/handler.h:
Create options support added.
sql/log_event.h:
New sql_mode added.
sql/mysql_priv.h:
New sql_mode added.
sql/mysqld.cc:
New sql_mode added.
sql/share/errmsg.txt:
New error messages added.
sql/sp.cc:
New sql_mode added.
sql/sp_head.cc:
Create options support added.
sql/sql_class.cc:
Create options support added.
Debug added.
sql/sql_class.h:
Create options support added.
sql/sql_insert.cc:
my_safe_a* moved to mysqld_priv.h
sql/sql_lex.h:
Create options support added.
sql/sql_parse.cc:
Create options support added.
sql/sql_show.cc:
Create options support added.
sql/sql_table.cc:
Create options support added.
sql/sql_view.cc:
New sql_mode added.
sql/sql_yacc.yy:
Create options support added.
sql/structs.h:
Create options support added.
sql/table.cc:
Create options support added.
sql/table.h:
Create options support added.
sql/unireg.cc:
Create options support added.
storage/example/ha_example.cc:
Create options example.
storage/example/ha_example.h:
Create options example.
storage/pbxt/src/discover_xt.cc:
Create options support added.
Interface for maria extensions.
Alternative plugin interface with additional info (maturity and string version).
CMakeLists.txt:
Maria plugin interface used.
config/ac-macros/plugins.m4:
Maria plugin interface used.
configure.in:
Maria plugin interface used.
include/mysql/plugin.h:
Maria plugin interface added.
include/mysql/plugin_auth.h.pp:
Maria plugin interface added.
plugin/auth/auth_socket.c:
Maria plugin interface added.
plugin/auth/dialog.c:
Maria plugin interface added.
plugin/daemon_example/daemon_example.cc:
Maria plugin interface added.
plugin/fulltext/plugin_example.c:
Maria plugin interface added.
sql/ha_ndbcluster.cc:
Maria plugin interface added.
sql/ha_partition.cc:
Maria plugin interface added.
sql/log.cc:
Maria plugin interface added.
sql/sql_acl.cc:
Maria plugin interface added.
sql/sql_builtin.cc.in:
Maria plugin interface used.
sql/sql_plugin.cc:
Maria plugin interface added.
sql/sql_plugin.h:
Maria plugin interface used.
sql/sql_show.cc:
Maria plugin interface added.
storage/archive/ha_archive.cc:
Maria plugin interface added.
storage/blackhole/ha_blackhole.cc:
Maria plugin interface added.
storage/csv/ha_tina.cc:
Maria plugin interface added.
storage/example/ha_example.cc:
Maria plugin interface added.
storage/federated/ha_federated.cc:
Maria plugin interface added.
storage/federatedx/ha_federatedx.cc:
Maria plugin interface added.
storage/heap/ha_heap.cc:
Maria plugin interface added.
storage/ibmdb2i/ha_ibmdb2i.cc:
Maria plugin interface added.
storage/innobase/handler/ha_innodb.cc:
Maria plugin interface added.
storage/innodb_plugin/handler/i_s.cc:
Maria plugin interface added.
storage/maria/ha_maria.cc:
Maria plugin interface added.
storage/myisam/ha_myisam.cc:
Maria plugin interface added.
storage/myisammrg/ha_myisammrg.cc:
Maria plugin interface added.
storage/pbxt/src/ha_pbxt.cc:
Maria plugin interface added.
storage/xtradb/handler/ha_innodb.cc:
Maria plugin interface added.
storage/xtradb/handler/i_s.cc:
Maria plugin interface added.
storage/xtradb/handler/i_s.h:
Maria plugin interface added.
to cleanup open connections
It was possible to UNINSTALL storage engine plugin when binding
between THD object and storage engine is still active (e.g. in
the middle of transaction).
To avoid unclean deactivation (uninstall) of storage engine plugin
in the middle of transaction, additional storage engine plugin
lock is acquired by thd_set_ha_data().
If ha_data is not null and storage engine plugin was not locked
by thd_set_ha_data() in this connection before, storage engine
plugin gets locked.
If ha_data is null and storage engine plugin was locked by
thd_set_ha_data() in this connection before, storage engine
plugin lock gets released.
If handlerton::close_connection() didn't reset ha_data, server does
it immediately after calling handlerton::close_connection().
Note that this is just a framework fix, storage engines must switch
to thd_set_ha_data() from thd_ha_data() if they want to see fit.
include/mysql/plugin.h:
As thd_{get|set}_ha_data() have some extra logic now, they
must be implemented on server side.
include/mysql/plugin.h.pp:
As thd_{get|set}_ha_data() have some extra logic now, they
must be implemented on server side.
sql/handler.cc:
Make sure ha_data is reset and ha_data lock is released.
sql/handler.h:
hton is not supposed to be updated by ha_lock_engine(),
make it const.
sql/sql_class.cc:
As thd_{get|set}_ha_data() have some extra logic now, they
must be implemented on server side.
sql/sql_class.h:
Added ha_data lock.
Several problems addressed:
1. The maximum value for --open_files_limit on non-windows boxes
is now raised to UINT_MAX (the maximum possible without significant
changes in the code). The maximum value on windows is kept to be
2048 due to a known limitation (bug 24509).
2. mysqld_safe now supports --open_files_limit=xx in addition to
--open-files-limit=xx
3. mysqld_safe always passes through --open[_-]files[_-]limit
to the underlying mysqld. It used to pass it through only if it
the user running the script has access to the root directory or
there was an --user argument specified.
4. Fixed a prototype in my_file.c to match its counterpart in
the other #ifdef branch.
Fixed valgrind warnings found from running main.connect under valgrind
sql/sp_head.cc:
Ensure that vcol_info is reset
sql/sql_acl.cc:
Fixed usage of wrong memroot for password
sql/sql_yacc.yy:
Ensure that vcol_info is reset
include/m_ctype.h:
MY_UNICASE_INFO already includes 'const'
plugin/auth/dialog.c:
Fixed parameters to have correct signed/unsigned type
sql/sql_acl.cc:
old_password_plugin is not used for EMBEDDED_LIBRARY
storage/pbxt/src/ha_pbxt.cc:
Remove not used variable
Makefile.am:
add new API files to the check_abi rule,
remove duplicates
client/CMakeLists.txt:
now a client can use dlopen too
client/Makefile.am:
be csh-friendly
include/my_global.h:
add dummy plugs for dlopen and co.
for the code that needs them to work in static builds
mysys/Makefile.am:
be csh-friendly
plugin/auth/dialog.c:
typo fixed
Add some extra error output and code cleanup in an attempt to fix/debug
a rare random testsuite problem in check_warnings, where the exit code
from mysqltest is somehow corrupted inside mysql-test-run.pl.
include/my_global.h:
Fix compiler warnings on some platforms.
mysql-test/lib/My/SafeProcess.pm:
Move dereference of $? subprocess exit code closer to where it is generated,
to make the code more robust and on the chance that this will fix the
occasional problems in check_warnings we see in Buildbot.
mysql-test/mysql-test-run.pl:
When check_warnings failed, also log the mysqld server for which it failed.
sql/sql_lex.cc:
Fix compiler warning about possibly uninitialised value, by rewriting a for()
loop that is always executed at least once into a do .. while() loop with an
assert.
sql/table.cc:
Fix compiler warning about uninitialised value.
storage/federatedx/ha_federatedx.cc:
Fix uninitialised variable.
storage/maria/ma_delete.c:
Fix compiler warning about uninitialised value.
storage/maria/ma_loghandler.c:
Fix compiler warning about uninitialised value.
storage/myisam/ft_stopwords.c:
Fix compiler warning.
storage/myisam/mi_write.c:
Fix compiler warning about possibly uninitialised value, by rewriting a while()
loop that is always executed at least once into a do .. while() loop with an
assert.
storage/xtradb/btr/btr0cur.c:
Fix compiler warning about possibly uninitialised value.
support-files/compiler_warnings.supp:
Fix warning suppression to cover all cases in yassl.
vio/viossl.c:
Fix compiler warning.
tmp_table_size can now be set to 0 (to disable in memory internal temp tables)
Improved speed for internal Maria temp tables:
- Don't use packed keys, except with long text fields.
- Don't copy key all accessed pages during key search.
Some new benchmark tests to sql-bench (for group by)
BUILD/compile-pentium64-gcov:
Update script to use same pentium_config flags as other tests
BUILD/compile-pentium64-gprof:
Update script to use same pentium_config flags as other tests
include/my_sys.h:
Added count of my_sync calls
mysql-test/r/variables.result:
tmp_table_size can now be set to 0
sql-bench/test-select.sh:
Added some new test for GROUP BY on a not key field and group by with different order by
sql/mysqld.cc:
Added count of my_sync calls
tmp_table_size can now be set to 0 (to disable in memory internal temp tables)
sql/sql_select.cc:
If tmp_table_size is 0, don't use in memory temp tables (good for benchmarking MyISAM/Maria temp tables)
Don't pack keys for Maria tables; The 8K page size makes packed keys too slow for temp tables.
storage/maria/ma_key_recover.h:
Moved definition to maria_def.h
storage/maria/ma_page.c:
Moved code used to simplify comparing of identical Maria tables to own function (page_cleanup())
Fixed that one can read a page with a read lock.
storage/maria/ma_rkey.c:
For not exact key reads, cache the page where we found key (to speed up future read-next/read-prev calls)
storage/maria/ma_search.c:
Moved code to cache last key page to separate function.
Instead of copying pages, only get a link to the page. This notable speeds up key searches on bigger tables.
storage/maria/ma_write.c:
Added comment
storage/maria/maria_def.h:
Moved page_cleanup() to separate function.
A client doing multiple mysql_library_init() and
mysql_library_end() calls over the lifetime of the process may
experience lost character set data, potentially even a
SIGSEGV.
This patch reinstates the reloading of character set data when
a mysql_library_init() is done after a mysql_library_end().
myisam-recover options changed from OFF to 'DEFAULT' to get less change of data loss when using MyISAM.
(The disadvantage is that changed MyISAM tables will be checked at access time; Use --myisam-recover=OFF for old behavior)
Don't call extra(HA_EXTRA_FORCE_REOPEN) in ALTER TABLE if table is locked as this will mark table as crashed!
Added assert to detect if we accidently would use MyISAM versioning in MySQL
include/my_base.h:
Mark NOT_USED as USED, as we now use this as a flag to not call extra()
mysql-test/mysql-test-run.pl:
Don't write all options when there is something wrong with the arguments
mysql-test/r/sp-destruct.result:
Add missing flush of mysql.proc (as the test copied live tables)
mysql-test/r/variables.result:
myisam-recover options changed to 'default'
mysql-test/r/view.result:
Don't show create time in result
mysql-test/suite/maria/t/maria-recovery2-master.opt:
Don't run test with myisam-recover (as this produces extra warnings during simulated death)
mysql-test/t/sp-destruct.test:
Add missing flush of mysql.proc (as the test copied live tables)
mysql-test/t/view.test:
Don't show create time in result
sql/lock.cc:
Added marker if table was deleted to argument list
sql/mysql_priv.h:
Added marker if table was deleted to argument list
sql/mysqld.cc:
myisam-recover options changed from OFF to 'DEFAULT' to get less change of data loss when using MyISAM
Allow one to specify OFF as argument to myisam-recover (was default before but one couldn't specify it)
sql/sql_base.cc:
Mark if table is going to be deleted
sql/sql_delete.cc:
Mark if table is going to be deleted
sql/sql_table.cc:
Mark if table is going to be deleted
Don't call extra(HA_EXTRA_FORCE_REOPEN) in ALTER TABLE if table is locked as this will mark table as crashed!
sql/table.cc:
Signal to handler if table is getting deleted as part of getting droped from table cache.
sql/table.h:
Added marker if table is going to be deleted.
storage/maria/ha_maria.cc:
Don't search for transaction handler if file is not transactional or outside of transaction
(Fixed possible core dump)
storage/maria/ma_blockrec.c:
Don't write changed information if table is going to be deleted.
storage/maria/ma_close.c:
Don't write changed information if table is going to be deleted.
storage/maria/ma_extra.c:
Mark tables that are deleted as crased, to ensure good behavior on restart if we suddenly crash.
storage/maria/ma_locking.c:
Cleanup
storage/maria/ma_recovery.c:
We need trnman to be inited during redo phase (to be able to open tables checked with maria_chk)
storage/maria/maria_def.h:
Added marker if table is going to be deleted.
storage/myisam/mi_close.c:
Don't write changed information if table is going to be deleted.
storage/myisam/mi_extra.c:
Mark tables that are deleted as crased, to ensure good behavior on restart if we suddenly crash.
storage/myisam/mi_open.c:
Added assert to detect if we accidently would use MyISAM versioning in MySQL
storage/myisam/myisamdef.h:
Added marker if table is going to be deleted.
Fixed bug in Yassle to get correct error messages in case of errors
Provide better error messages in case of ssl connect failure
Updated out-of-date ssl certificates to fix failing mysql-test-system (certificates now active for 10 years)
Fixed bug in query_cache that could cause asserts and hangs in DEBUG builds.
Fixed bug where one connection did not see changes done by another connection.
configure.in:
Changed version number from RC to stable
extra/yassl/src/yassl_error.cpp:
Fixed bug in Yassle to get correct error messages in case of errors
- 'error' is an enum that hold more error numbers than the enum was defined for
include/violite.h:
Added error output string for sslaccept() and sslconnect() to get reason for connect failure
mysql-test/mysql-test-run.pl:
Write failed test cases if mysql-test-run fails because of too many errors
mysql-test/r/grant.result:
Update results to reflect new certificates
mysql-test/r/openssl_1.result:
Update results to reflect new certificates
mysql-test/std_data/cacert.pem:
Update ssl certificate
mysql-test/std_data/client-cert.pem:
Update ssl certificate
mysql-test/std_data/client-key.pem:
Update ssl certificate
mysql-test/std_data/server-cert.pem:
Update ssl certificate
mysql-test/std_data/server-key.pem:
Update ssl certificate
mysql-test/t/grant.test:
Update test to reflect new certificates
mysql-test/t/openssl_1.test:
Update test to reflect new certificates
mysql-test/t/query_cache_debug.test:
Remove 'big_test' as test is now fast
sql-common/client.c:
Give a better error message if ssl connect fails
sql/net_serv.cc:
Fixed compiler warnings
sql/slave.cc:
Give a better error message in logs if ssl connect fails
sql/sql_cache.cc:
debug_wait_for_kill() now removes the set watch variable after kill signal
This is needed as invalidate_table() may be called twice for one query.
Ensure that net->query_cache_query is reset after query. This fixes assert in
query_cache_end_of_result() if query_cache_query holds results from previous query.
Removed DBUG_ASSERT(0), as this code can be run by query_cache_debug.test
sql/sql_connect.cc:
Give a better error message if ssl connect fails
sql/sql_parse.cc:
Fixed bug where one connection did not see changes done by another connection.
For statements that changes tables, close_thread_tables() MUST be called before
sending OK as a table handler may not make the changes available for other connections
before unlock_tables().
vio/viossl.c:
Give a better error message if ssl connect fails
include/ft_global.h:
Changed string size to 'size_t' (to avoid compiler warnings later)
include/maria.h:
Changed string size to 'size_t' (to avoid compiler warnings later)
mysql-test/r/show_check.result:
Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
Use HIGH_PRIORITY inserts to avoid problem with concurrent inserts on the slave.
mysql-test/t/show_check-master.opt:
Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables'
sql/item.cc:
Fixed compiler warning
storage/maria/ft_maria.c:
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_boolean_search.c:
Fixed compiler warnings
storage/myisam/ft_myisam.c:
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_nlq_search.c:
Changed string size to 'size_t' (to avoid compiler warnings later)
storage/myisam/ft_parser.c:
Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ft_stopwords.c:
Changed string size to 'size_t' (to avoid compiler warnings)
storage/myisam/ftdefs.h:
Changed string size to 'size_t' (to avoid compiler warnings)
- Marked a couple of tests with --big
- Fixed xtradb/handler/ha_innodb.cc to call explain_filename()
storage/xtradb/handler/ha_innodb.cc:
Call explain_filename() to get proper names for partitioned tables