Commit graph

14 commits

Author SHA1 Message Date
Aleksey Midenkov
d324c03d0c Vanilla cleanups and refactorings
Dead code cleanup:

part_info->num_parts usage was wrong and working incorrectly in
mysql_drop_partitions() because num_parts is already updated in
prep_alter_part_table(). We don't have to update part_info->partitions
because part_info is destroyed at alter_partition_lock_handling().

Cleanups:

- DBUG_EVALUATE_IF() macro replaced by shorter form DBUG_IF();
- Typo in ER_KEY_COLUMN_DOES_NOT_EXITS.

Refactorings:

- Splitted write_log_replace_delete_frm() into write_log_delete_frm()
  and write_log_replace_frm();
- partition_info via DDL_LOG_STATE;
- set_part_info_exec_log_entry() removed.

DBUG_EVALUATE removed

DBUG_EVALUTATE was only added for consistency together with
DBUG_EVALUATE_IF. It is not used anywhere in the code.

DBUG_SUICIDE() fix on release build

On release DBUG_SUICIDE() was statement. It was wrong as
DBUG_SUICIDE() is used in expression context.
2021-10-26 17:07:46 +02:00
Eugene Kosov
28325b0863 add WITH_DBUG_TRACE CMake variable
This is a way do disable DBUG_ENTER()/DBUG_EXIT() stuff which is
needed to dbug trace. Those who doesn't need it may avoid tests
slowdown with -DWITH_DBUG_TRACE=OFF

dbug/tests.c: add define which is neede always in this test

innodb.log_file_name_debug.test: do not depend on DBUG trace stuff
in test

Benchmark results: each test eats less CPU and you can have more
parallel jobs in MTR.

patched:
./mtr -mem -par=8 -suite=innodb  185.34s user 86.85s system 133% cpu 3:23.27 total
./mtr -mem -par=8 -suite=main    80.96s  user 36.01s system 182% cpu 1:04.07 total

main.select                              [ pass ]   1660
main.select                              [ pass ]   1513
main.select                              [ pass ]   1543
main.select                              [ pass ]   1660
main.select                              [ pass ]   1521
main.select                              [ pass ]   1511
main.select                              [ pass ]   1508
main.select                              [ pass ]   1520
main.select                              [ pass ]   1514
main.select                              [ pass ]   1522

vanilla:
./mtr -mem -par=8 -suite=innodb  203.61s user 92.16s system 140% cpu 3:30.16 total
./mtr -mem -par=8 -suite=main    94.11s  user 35.51s system 206% cpu 1:02.69 total

main.select                              [ pass ]   2032
main.select                              [ pass ]   2017
main.select                              [ pass ]   2040
main.select                              [ pass ]   2183
main.select                              [ pass ]   2253
main.select                              [ pass ]   2075
main.select                              [ pass ]   2109
main.select                              [ pass ]   2080
main.select                              [ pass ]   2098
main.select                              [ pass ]   2114
2020-04-29 20:13:14 +03:00
Sergei Golubchik
5ce6fb59a0 disable LeakSanitizer for unit.dbug test 2019-03-06 15:12:11 +01: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
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +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
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
Jon Olav Hauglid
aee88a4cc6 Bug#12779790 COMPILATION FAILS OS X 10.7 - IMPLICIT DECLARATION OF
FUNCTION 'PTHREAD_INIT' 

The problem was that compilation would fail with a warning:
Implicit declaration of function 'pthread_init' if MySQL was
compiled on OS X 10.7 (Lion). The reason was that pthread_init()
is now part of an internal OS X pthread library so it was found
by CMake.

This patch fixes the problem by removing HAVE_PTHREAD_INIT and
related code. pthread_init() was specific to MIT-pthreads which
has not been supported since 4.1 and was therefore no longer
relevant.

No test case added.
2011-07-21 17:45:38 +02:00
Magne Mahre
8ede0759c3 Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Sergei Golubchik
319847a4ec backport of dbug extensions from 6.0:
function/ syntax
  glob(7) wildcards
  unit tests
2009-10-30 19:13:58 +01:00
unknown
0e4659bcd1 skip dbug tests if DBUG_OFF
include/my_dbug.h:
  warnings
2008-02-13 20:29:29 +01:00
unknown
fe7287f8f7 dbug: function/ (a.k.a. SUBDIR) syntax
dbug/dbug.c:
  function/ (a.k.a. SUBDIR) syntax
dbug/tests-t.pl:
  1. add support for test comments
  2. add test comments
  3. move tests around
  4. add SUBDIR tests
dbug/tests.c:
  support code for SUBDIR testing
include/my_dbug.h:
  comments. change in _db_set_ prototype
dbug/user.r:
  negative lists and function/ syntax.
2008-02-03 20:58:47 +01:00
unknown
d79e70597a negative lists in dbug (-#-d,info => everything but "info").
unit tests for dbug


dbug/Makefile.am:
  unit tests for dbug
dbug/dbug.c:
  negative lists (-#-d,info => everything but "info")
include/my_dbug.h:
  negative lists (-#-d,info => everything but "info")
unittest/Makefile.am:
  unit tests for dbug
dbug/tests-t.pl:
  unit tests for dbug
dbug/tests.c:
  unit tests for dbug
2008-02-01 16:21:44 +01:00