Commit graph

251 commits

Author SHA1 Message Date
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Marko Mäkelä
2d0dd62cf7 Merge 10.2 into 10.3 2019-03-08 00:26:55 +02:00
Marko Mäkelä
913e33e423 Merge 10.1 into 10.2
Rewrite the MDEV-13818 fix to prevent heap-use-after-free.

Add a test case for MDEV-18272.
2019-03-07 17:52:27 +02:00
Sergei Golubchik
5ce6fb59a0 disable LeakSanitizer for unit.dbug test 2019-03-06 15:12:11 +01:00
luz.paz
3dd01669b4 Misc. typos
Found via `codespell -i 3 -w --skip="./debian/po" -I ../mariadb-server-word-whitelist.txt  ./cmake/ ./debian/ ./Docs/ ./include/ ./man/ ./plugin/ ./strings/`
2018-04-05 15:26:57 +04:00
Monty
139e8afc2c Re-enable 'S' for --debug (sf_sanity checking for each call)
- Fixed also a wrong comment and a wrong argument to printf
2017-12-22 14:56:58 +02:00
Monty
550c8bdb81 Make debug multi thread safe
Fixes crashes in InList when calling _db_set_init (part of SET debug_dbug
in the test suite) from another thread.

Patch backported from 10.3
2017-10-26 13:49:55 +03:00
Marko Mäkelä
2c1067166d Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00
Vladislav Vaintroub
eba44874ca MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)

- Also fix printf-format warnings

Make the above mentioned warnings fatal.

- fix pthread_join on Windows to set return value.
2017-09-28 17:20:46 +00:00
Monty
0eef1735b6 Make debug multi thread safe
Fixes crashes in InList when calling _db_set_init (part of SET debug_dbug
in the test suite) from another thread.
2017-09-08 13:24:42 +03:00
Monty
536215e32f Added DBUG_ASSERT_AS_PRINTF compile flag
If compiling a non DBUG binary with
-DDBUG_ASSERT_AS_PRINTF asserts will be
changed to printf + stack trace (of stack
trace are enabled).

- Changed #ifndef DBUG_OFF to
  #ifdef DBUG_ASSERT_EXISTS
  for those DBUG_OFF that was just used to enable
  assert
- Assert checking that could greatly impact
  performance where changed to DBUG_ASSERT_SLOW which
  is not affected by DBUG_ASSERT_AS_PRINTF
- Added one extra option to my_print_stacktrace() to
  get more silent in case of stack trace printing as
  part of assert.
2017-08-24 01:05:50 +02:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Sergei Golubchik
5d40ed864e MDEV-11752 Unsafe strmov - function definition in include/m_string.h
assert that strmov() cannot be used on overlapping strings.
(because strpcpy cannot)
2017-03-10 18:21:29 +01:00
Marko Mäkelä
89d80c1b0b Fix many -Wconversion warnings.
Define my_thread_id as an unsigned type, to avoid mismatch with
ulonglong.  Change some parameters to this type.

Use size_t in a few more places.

Declare many flag constants as unsigned to avoid sign mismatch
when shifting bits or applying the unary ~ operator.

When applying the unary ~ operator to enum constants, explictly
cast the result to an unsigned type, because enum constants can
be treated as signed.

In InnoDB, change the source code line number parameters from
ulint to unsigned type. Also, make some InnoDB functions return
a narrower type (unsigned or uint32_t instead of ulint;
bool instead of ibool).
2017-03-07 19:07:27 +02:00
Sergei Golubchik
3d12587ca4 MDEV-11611 fix Ninja build
ninja doesn't like when a dummy target name matches a generated file name
2017-01-29 23:05:10 +01:00
Marko Mäkelä
bf35deda09 MDEV-11713 Optimize DBUG_PRINT and introduce DBUG_LOG
MariaDB Server is unnecessarily evaluating the arguments of
DBUG_PRINT() macros when the label is not defined.

The macro DBUG_LOG() for C++ operator<< output which was added for
InnoDB diagnostics in MySQL 5.7 is missing from MariaDB. Unlike the
MySQL 5.7 implementation, MariaDB will avoid allocating and
initializing the output string when the label is not defined.

Introduce DBUG_OUT("crypt") and DBUG_OUT("checksum") for some InnoDB
diagnostics, replacing some use of ib::info().
2017-01-05 10:51:18 +02:00
Sergei Golubchik
1fc49d3d1a Add C/C as a submodule in libmariadb/
also
* fix includes
* rename cmake macros and targets to avoid name clashes
2016-09-12 17:46:35 +02:00
Sergei Golubchik
29dd634a4c dbug: correct trace for DBUG_RETURN(func()); -- gcc only
when func1 calls func2 from DBUG_RETURN, dbug shows the trace as
| > func1
| < func1
| > func2
| < func2
because DBUG_LEAVE happens before func2(). Change that to invoke
DBUG_LEAVE when the local variable goes out of scope. This uses
gcc specific __attribute__((cleanup)).
2015-11-16 07:55:55 +01:00
Sergei Golubchik
528c1111ad MDEV-6410 Cross-compile fixes
https://code.launchpad.net/~chewi/maria/mysql-fix-bug61340/+merge/217351
2014-07-08 19:34:53 +02:00
Sergei Golubchik
e27c338634 5.5.38 merge 2014-06-06 00:07:27 +02:00
Sergei Golubchik
77ec219d58 cmake: mark AIO_LIBRARY, EVENT_LIBRARY, GROFF, NROFF as advanced;
use -ggdb3 if supported
2014-06-03 10:57:57 +02:00
James Le Cuirot
cdc38712e4 MySQL Bug #61340: Use CMake EXPORT feature to aid cross-compiling.
This technique is documented at:
http://www.cmake.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build
  
Basic steps are:
# mkdir native cross
# cd native
# cmake /path/to/maria
# make IMPORT_EXECUTABLES
# cd ../cross
# cmake -DCMAKE_TOOLCHAIN_FILE=foo -DIMPORT_EXECUTABLES=/path/to/native/import_executables.cmake /path/to/maria
# make
2014-04-27 00:02:19 +01:00
Sergei Golubchik
10740939eb 5.5 merge 2014-03-26 22:25:38 +01:00
Sergei Golubchik
434bbc34ad MDEV-5913 Windows: 10.0 crashes on shutdown
add pthread_mutex_destroy(&THR_LOCK_dbug); that was apparently
forgotten since the very first MySQL version
2014-03-24 20:02:08 +01:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Vladislav Vaintroub
3ef0157daa MDEV-4815 - allow multiple mysql_server_init() / mysql_server_end() in the same process, for embedded library.
- Reset  static variables that are used to signal "init done"  for DBUG, in dbug_end()
- Set string server variables to NULL after memory for the value is freed - avoids double free()
- fix DBUG_ASSERTs that happened during reinitialization.
2013-07-29 16:03:41 +02:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Sergei Golubchik
ec263757b6 remove duplicate code from the factorial dbug example 2012-08-23 15:30:43 +02:00
Michael Widenius
cee888acb3 Fixed compiler warnings (A few of these was bugs)
client/mysqldump.c:
  Slave needs to be initialized with 0
dbug/dbug.c:
  Removed not existing function
plugin/semisync/semisync_master.cc:
  Fixed compiler warning
sql/opt_range.cc:
  thd needs to be set early as it's used in some error conditions.
sql/sql_table.cc:
  Changed to use uchar* to make array indexing portable
storage/innobase/handler/ha_innodb.cc:
  Removed not used variable
storage/maria/ma_delete.c:
  Fixed compiler warning
storage/maria/ma_write.c:
  Fixed compiler warning
2012-08-13 22:23:28 +03:00
Michael Widenius
960f6600c8 Fixed compile warnings
Fixed some mtr test problems



dbug/tests.c:
  Fixed compiler warnings
mysql-test/r/handlersocket.result:
  Fixed that plugin_license is written
mysql-test/suite/innodb/t/innodb_bug60196.test:
  Force sorted results as it was sometimes different on windows
mysql-test/suite/rpl/t/rpl_heartbeat_basic.test:
  Prolong test as this failed on windows
mysql-test/t/handlersocket.test:
  Fixed that plugin_license is written
plugin/handler_socket/handlersocket/handlersocket.cpp:
  Use maria_declare_plugin
plugin/handler_socket/handlersocket/mysql_incl.hpp:
  Fixed compiler warning
plugin/handler_socket/libhsclient/auto_addrinfo.hpp:
  Fixed compiler warning
sql/handler.h:
  Fixed typo
sql/sql_plugin.cc:
  Fixed bug that caused plugin library name twice in error message
storage/maria/ma_checkpoint.c:
  Fixed compiler warning
storage/maria/ma_loghandler.c:
  Fixed compiler warning
unittest/mysys/base64-t.c:
  Fixed compiler warning
unittest/mysys/bitmap-t.c:
  Fixed compiler warning
unittest/mysys/my_malloc-t.c:
  Fixed compiler warning
2012-05-18 16:40:16 +03:00
Vladislav Vaintroub
2451628923 Fixed some simple warnings on Windows. 2012-04-13 19:44:22 +02:00
Vladislav Vaintroub
f544b21fcb Fix build on OSX
- Workaround linker bug that prevents linking aria test executables
   using -fno-common on OSX
- Skip system readline detection (OSX readline is incompatible one)
- Make Xcode generator work
2012-04-12 01:33:43 +02:00
Sergei Golubchik
6f79b3fa83 fix a memory leak in dbug 2012-03-24 21:51:10 +01:00
Sergei Golubchik
619f67b1b4 mdev-200 set session dbug resets the output to stderr.
it makes "./mtr --debug" unusable

revert the mysql fix for bug#46165.
implement shared FILE's with reference counting
2012-03-23 20:49:47 +01:00
unknown
9305f2b52f Merge latest MariaDB 5.5 into MWL#192: Non-blocking client library. 2012-02-22 12:14:34 +01:00
unknown
f6b68a1070 Merge MWL#192: Non-blocking client library, into MariaDB 5.5. 2012-02-21 22:15:44 +01:00
unknown
a03d846576 Fix memory leak when one +O debug on top of another. 2012-02-08 21:55:40 +01:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Sergei Golubchik
506984181b fixes for opensolaris compilation failures 2012-01-05 18:56:31 +01:00
Sergei Golubchik
6cc9d0ffa0 move safemalloc out of dbug.
remeber a real backtrace for every allocation.
make safemalloc to tract C++ new/delete too.
collateral fixes to make the test suite pass.
2011-12-12 22:58:24 +01:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Vladislav Vaintroub
5beb816a7e Make it possible to compile without SAFEMALLOC in debug builds
Default to no SAFEMALLOC on Windows, because C runtime malloc
has this functionslity already
2011-12-02 14:35:26 +01:00
Michael Widenius
47575bd0e0 Fixed compiler warnings
dbug/tests.c:
  Added __attribute__((unused)) to get rid of compiler warning
server-tools/instance-manager/guardian.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/filesort.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/slave.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_load.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_table.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_blockrec.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_check.c:
  Added missing cast
storage/maria/ma_loghandler.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_recovery.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/pbxt/src/cache_xt.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/xtradb/fil/fil0fil.c:
  Removed not used variable
storage/xtradb/handler/ha_innodb.cc:
  Use unused variable
vio/viosocket.c:
  Remove usage of not used variable
vio/viosslfactories.c:
  Added cast
2011-11-30 00:34:05 +02:00
Sergei Golubchik
6edd76785c merge 2011-11-03 23:39:53 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
f6483d3fec ignore troff failures - they are not fatal 2011-10-28 17:25:20 +02:00
Sergei Golubchik
7714adaef8 build on windows 2011-11-02 12:26:30 +01:00