Commit graph

1722 commits

Author SHA1 Message Date
Anton Blanchard
c82bc561b5 crc32-vpmsum: Restore non volatile registers on zero length CRC
This is never hit in practice, because the wrapper code catches it,
but fix the zero length exit to restore all the non volatile registers.

From: aaf0ac48a4

Signed-off-by: Anton Blanchard <anton@samba.org>
2016-08-05 11:50:46 +04:00
Daniel Black
a2c826b6aa MDEV-9872: New Power8 crc32(ieee) optimized functions
These are different from the existing crc32 functions which
where really crc32c.
2016-08-05 11:50:46 +04:00
Sergey Vojtovich
9c2215e022 MDEV-9872 - Add common optimized CRC32 function interface
Move crc32-vpmsum to extra.
Compile static crc32-vpmsum instead of adding sources directly.
Make use of crc32-vpmsum via my_checksum().

Based on contribution by Daniel Black.
2016-08-04 10:45:20 +04:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Michael Widenius
2fe8dd0f90 various cleanups 2016-06-30 11:43:02 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Monty
4dc5075860 Fixed compiler warnings and test failures found by buildbot
Fixed ccfilter to detect errors where the column is included in the error message
2016-06-24 02:25:14 +03:00
Sergei Golubchik
c081c978a2 Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
Sergei Golubchik
ae29ea2d86 Merge branch 'mysql/5.5' into 5.5 2016-06-14 13:55:28 +02:00
Dan Ungureanu
3c77a00d55 MDEV-8012: Wrong exit code when asking for help
`--help` is a perfectly valid parameter and both `mysqladmin` and
`mysql_waitpid` should exit with success (zero errror code).

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2016-06-12 22:47:18 +03:00
Vicențiu Ciorbaru
416006a3d8 MDEV-8012: Wrong exit code when asking for help
Make mysql_waitpid return exit code 0 when -V flag is supplied.
2016-06-12 22:46:53 +03:00
Vladislav Vaintroub
3a7bc23a16 MDEV-9154 : Remove workarounds (mainly dynamic function loading)
for running obsolete versions of Windows
2016-06-01 20:29:10 +02:00
Shishir Jaiswal
9d72fb4af0 Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUES
DESCRIPTION
===========
Buffer overflow is reported in a lot of code sections
spanning across server, client programs, Regex libraries
etc. If not handled appropriately, they can cause abnormal
behaviour.

ANALYSIS
========
The reported casea are the ones which are likely to result
in SEGFAULT, MEMORY LEAK etc.

FIX
===
- sprintf() has been replaced by my_snprintf() to avoid
buffer overflow.
- my_free() is done after checking if the pointer isn't
  NULL already and setting it to NULL thereafter at few
  places.
- Buffer is ensured to be large enough to hold the data.
- 'unsigned int' (aka 'uint') is replaced with 'size_t'
to avoid wraparound.
- Memory is freed (if not done so) after its alloced and
used.
- Inserted assert() for size check in InnoDb memcached
code (from 5.6 onwards)
- Other minor changes

(cherry picked from commit 3487e20959c940cbd24429afa795ebfc8a01e94f)
2016-05-16 11:33:57 +02:00
Sergei Golubchik
87e3e67f43 Merge branch '10.0' into 10.1 2016-05-04 15:23:26 +02:00
Sergei Golubchik
872649c7ba Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
Sergei Golubchik
0991e19e9d Merge branch 'bb-5.5-serg' into 5.5 2016-04-20 20:25:46 +02:00
Vladislav Vaintroub
2a45fa900b MDEV-9836 Connection lost when using SSL
Don't read from socket in yassl in SSL_pending().
Just return size of the buffered processed data.
This is what OpenSSL is documented to do too:

  SSL_pending() returns the number of bytes which have been processed,
  buffered and are available inside ssl for immediate read.
2016-04-20 19:03:59 +02:00
Sergei Golubchik
b069d19284 Merge branch 'mysql/5.5' into 5.5 2016-04-20 15:25:55 +02:00
Monty
c0eebb831e Fixed but when generating .sys files 2016-04-06 01:18:38 +03:00
Monty
d0b178fb45 Added new range of MariaDB error messages, starting from 3000
This is done by splitting variables.errmsg and locale.errmsg to
variables.errmsg_extra and locale.errmsg_extra

The ER() macros in unireg.h now looks more complex than before, but this
isn't critical as most usage of them are with constants and the compiler
will remove most of the test code.
2016-04-05 18:00:03 +03:00
Sergei Golubchik
f67a2211ec Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
Vladislav Vaintroub
e6921f28c1 Fix valgrind error - memory leak in yassl's SSL_remove_state 2016-03-22 19:02:05 +01:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Otto Kekäläinen
1777fd5f55 Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
Yashwant Sahu
e7061f7e5a Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. 2016-02-26 11:53:56 +05:30
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Sergei Golubchik
271fed4106 Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
Sergei Golubchik
f3444df415 Merge branch 'mysql/5.5' into 5.5
reverted about half of commits as either not applicable or
outright wrong
2016-02-09 11:27:40 +01:00
Daniel Black
f602c3938c innodbchecksum: add fclose and handle errors 2016-01-19 14:19:31 +11:00
V S Murthy Sidagam
8c65e082f3 Description: yaSSL was only handling the cases of zero or
one leading zeros for the key agreement instead of
potentially any number.
There is about 1 in 50,000 connections to fail
when using DHE cipher suites.  The second problem was the
case where a server would send a public value shorter than
the prime value, causing about 1 in 128 client connections
to fail, and also caused the yaSSL client to read off the
end of memory.
All client side DHE cipher suite users should update.
Note: The patch is received from YaSSL people
2016-01-04 15:31:45 +05:30
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Daniel Black
e4e2d9dd3c Do not build optimised power crc32 on bigendian 2015-12-18 17:15:06 +11:00
Daniel Axtens
2538c7cf89 Use POWER8 accelerated crc32
- Make accelerated checksum available to InnoDB and XtraDB.
 - Fall back to slice-by-eight if not available. The mode used is printed on startup.
 - Will only build on POWER systems at the moment until CMakeLists are modified
   to only add the crc32_power8/ files when building on POWER.

running MySQL-5.7 unittest/gunit/innodb/ut0crc32-t

Before:

1..2
Using software crc32 implementation, CPU is little-endian
ok 1
Using software crc32 implementation, CPU is little-endian
    normal CRC32: real    0.148006 sec
    normal CRC32: user    0.148000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.144293 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

After:

1..2
Using POWER8 crc32 implementation, CPU is little-endian
ok 1
Using POWER8 crc32 implementation, CPU is little-endian
    normal CRC32: real    0.008097 sec
    normal CRC32: user    0.008000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.147043 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

Author CRC32 ASM code: Anton Blanchard <anton@au.ibm.com>
ref: https://github.com/antonblanchard/crc32-vpmsum

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2015-12-15 15:11:17 +11:00
Monty
c3018b0ff4 Fixes to get all test to run on MacosX Lion 10.7
This includes fixing all utilities to not have any memory leaks,
as safemalloc warnings stopped tests from passing on MacOSX.

- Ensure that all clients takes character-set-dir, as the
  libmysqlclient library will use it.
- mysql-test-run now passes character-set-dir to all external clients.
- Changed dynstr_free() so that it can be called twice (made freeing code easier)
- Changed rpl_global_gtid_slave_state to be allocated dynamicly as it
  includes a mutex that needs to be initizlied/destroyed before my_end() is called.
- Removed rpl_slave_state::init() and rpl_slave_stage::deinit() as
  their job are better handling by constructor and delete.
- Print alias instead of table_name in check_duplicate_key as
  table_name may have been converted to lower case.

Other things:
- Fixed a case in time_to_datetime_with_warn() where we where
  using && instead of & in tests
2015-11-29 17:51:23 +02:00
Sergei Golubchik
dfb74dea30 Merge branch '10.0' into 10.1 2015-10-12 00:37:58 +02:00
Sergei Golubchik
cfeedbfd3e Merge branch '5.5' into 10.0 2015-10-09 17:12:26 +02:00
Sergei Golubchik
82e9f6d948 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
Sergei Golubchik
9554342d16 Merge branch '10.1' into pull-request-97
Merge downstream Debian packaging (MDEV-6284)
2015-09-25 10:24:14 +02:00
Jan Lindström
161db7c18f MDEV-8773: InnoDB innochecksum does not work with encrypted or page compressed tables 2015-09-19 11:31:39 +03:00
Robert Golebiowski
b9768521bd Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
2015-09-18 16:13:38 +02:00
Robert Golebiowski
0243a2d432 Bug #21025377 CAN'T CONNECT TO SSL ENABLED SERVER FIRST 30 SEC AFTER
INITIAL STARTUP

Updated yassl to yassl-2.3.7e

(cherry picked from commit 6e21c8c04b922bdb60b6a7c174709d2e1bdd3618)
2015-09-18 16:13:18 +02:00
Robert Golebiowski
259cf3dc60 Updated yassl to yassl-2.3.8 2015-09-18 11:18:25 +02:00
Robert Golebiowski
0632dae73f Bug #21025377 CAN'T CONNECT TO SSL ENABLED SERVER FIRST 30 SEC AFTER
INITIAL STARTUP

Updated yassl to yassl-2.3.7e
2015-09-18 10:43:05 +02:00
Otto Kekäläinen
a273f016a1 Fix spelling errors 2015-08-27 00:39:44 +03:00
Robert Golebiowski
7255ae6ceb Bug #20774956: THREAD_POOL.THREAD_POOL_CONNECT HANGS WHEN RUN ON A
YASSL-COMPILED SERVER/CLIENT

Description: thread_pool.thread_pool_connect hangs when the server and
client are compiled with yaSSL.

Bug-fix: Test thread_pool.thread_pool_connect was temporary disabled for
yaSSL. However, now that yaSSL is fixed it runs OK. The bug was
introduced by one of the yaSSL updates. set_current was not working for
i == 0. Now this is fixed. YASSL is updated to 2.3.7d
2015-07-08 13:51:06 +02:00
Robert Golebiowski
e7ff2040d7 Bug #21025377 CAN'T CONNECT TO SSL ENABLED SERVER FIRST 30 SEC AFTER
INITIAL STARTUP

Description: By using mysql_ssl_rsa_setup to get SSL enabled server
(after running mysqld --initialize) server don't answer properly
to "mysqladmin ping" first 30 secs after startup.

Bug-fix: YASSL validated certificate date to the minute but should have
to the second. This is why the ssl on the server side was not up right
away after new certs were created with mysql_ssl_rsa_setup. The fix for
that was submitted by Todd. YASSL was updated to 2.3.7c.
2015-07-08 12:21:51 +02:00
Robert Golebiowski
c9685a78c3 Bug #20168526 YASSL: CORRUPT SSL-KEY CRASHES CLIENT
Affects at least 5.6 and 5.7. In customer case, the "client" happened to
be a replication slave, therefore his server crashed.

Bug-fix:
The bug was in yassl. Todd Ouska has provided us with the patch.

(cherry picked from commit 42ffa91aad898b02f0793b669ffd04f5c178ce39)
2015-07-08 11:59:27 +02:00
Sergei Golubchik
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Sergei Golubchik
66fd45afce MDEV-7398 mysqld segfaults on FreeBSD 10.1 i386 when built with clang 3.4
in cmake tests let's treat clang like gcc (same options,
same builtins) in many cases.

* don't check the compiler when
  * testing for -fvisibility=hidden support
  * testing for HAVE_ABI_CXA_DEMANGLE
  * testing for HAVE_GCC_ATOMIC_BUILTINS
  * when removing options with string(replace)
  * when running ${CC} --version (ignore the error instead)
* run ABI checks for clang
* use "canonical" gcc flags for clang
* fix groonga too

Also:

* add cmake detection for gcc __atomic_* builtins. they might be
  supported (__ATOMIC_SEQ_CST is defined), but not for all operand
  sizes. In particular, 64-bit atomic load is problematic on i386
* cache check results for Windows
* remove the test for HAVE_CXXABI_H (HAVE_ABI_CXA_DEMANGLE is
  suffifient)
2015-06-16 23:58:21 +02:00
Sergei Golubchik
2db62f686e Merge branch '10.0' into 10.1 2015-03-07 13:21:02 +01:00