summaryrefslogtreecommitdiff
path: root/unittest
Commit message (Collapse)AuthorAgeFilesLines
* Simple cleanups (no logic changes)Monty2018-12-091-1/+1
|
* Merge 10.2 into 10.3Marko Mäkelä2018-11-061-1/+87
|\ | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| * Merge 10.1 into 10.2Marko Mäkelä2018-11-061-1/+87
| |\
| | * MDEV-17133 follow-up patch to fix mf_iocache-t unittestAndrei Elkin2018-11-011-1/+1
| | | | | | | | | | | | | | | | | | which did not always correctly simulated io-cache::end_of_file. The error was caused by implicit cast to unsigned of an intemediate term in a formula.
| | * MDEV-17133 dump thread reads from a past positionAndrei Elkin2018-10-211-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to logs analysis the Dump thread attempted to read again data which was already sent. The reason of regressed read turns out in an _my_b_cache_read() early exit branch which missed to distinguish between total zero size read (e.g ineffective read when Count argument is zero) from a case when the requested amount of data is fully read out by sole accessing the cache's file. In the latter case such then *effective* reading was not reflected in the cache's state to screw the cache's state. Fixed with a check introduced of whether the file reading was effective prior to early exit. When this is the case conduct standard cache state change to account the actual read size. Notice the bug can show up also as an error to read binlog event e.g through BINLOG_GTID_POS() (of MDEV-16886).
| | * compiler warnings (clang 4.0.1 on i386)Sergei Golubchik2018-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extra/mariabackup/fil_cur.cc:361:42: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] extra/mariabackup/fil_cur.cc:376:9: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] sql/handler.cc:6196:45: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] sql/log.cc:1681:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/log.cc:1687:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/wsrep_sst.cc:1388:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] sql/wsrep_sst.cc:232:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] storage/connect/filamdbf.cpp:450:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/filamdbf.cpp:970:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/inihandl.cpp:197:16: warning: address of array 'key->name' will always evaluate to 'true' [-Wpointer-bool-conversion] storage/innobase/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/buf/buf0buf.cc:5085:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/innobase/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/handler/ha_innodb.cc:18685:7: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] storage/innobase/row/row0mysql.cc:3319:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/row/row0mysql.cc:3327:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/maria/ma_norec.c:35:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_norec.c:42:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_test2.c:1009:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/maria/ma_test2.c:1010:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/mroonga/ha_mroonga.cpp:9189:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] storage/mroonga/vendor/groonga/lib/expr.c:4987:22: warning: comparison of constant -1 with expression of type 'grn_operator' is always false [-Wtautological-constant-out-of-range-compare] storage/xtradb/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/buf/buf0buf.cc:5047:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/xtradb/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3324:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3332:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:120:35: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:96:35: note: expanded from macro 'INFO_TAIL'
| | * MDEV-14014 Multi-Slave Replication Fail: bogus data in log eventAndrei Elkin2018-06-281-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-7257 made a dump thread to read from binlog concurrently with writers as long as the read bytes are below a water-mark (MYSQL_BIN_LOG::binlog_end_pos). However it appeared to be possible a dump thread reader reach out for bytes past the water mark through a feature of IO_CACHE that fills in the internal buffer and while doing so it could read what the reader is not supposed to see (the bytes above MYSQL_BIN_LOG::binlog_end_pos). The issue is fixed with constraining the IO_CACHE buffer fill to respect the watermark. An added unit test proves reading from file is bound to an external parameter passed to {IO_CACHE::end_of_file} cache member.
* | | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-301-1/+36
|\ \ \ | |/ /
| * | MDEV-14014 Multi-Slave Replication Fail: bogus data in log eventAndrei Elkin2018-06-281-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-7257 made a dump thread to read from binlog concurrently with writers as long as the read bytes are below a water-mark (MYSQL_BIN_LOG::binlog_end_pos). However it appeared to be possible a dump thread reader reach out for bytes past the water mark through a feature of IO_CACHE that fills in the internal buffer and while doing so it could read what the reader is not supposed to see (the bytes above MYSQL_BIN_LOG::binlog_end_pos). The issue is fixed with constraining the IO_CACHE buffer fill to respect the watermark. An added unit test proves reading from file is bound to an external parameter passed to {IO_CACHE::end_of_file} cache member.
* | | MDEV-16478: mysql_real_connect() from libmariadbd.so always crashOleksandr Byelkin2018-06-252-0/+98
| | | | | | | | | | | | | | | | | | | | | Returned accidentally removed undefinition of MYSQL_SERVER in net_serv.cc inside embedded server (embedded server uses real_net_read/write only as a client) Prevented attempt to clean up embedded server if it was not initialized
* | | After-merge fixesMarko Mäkelä2018-05-301-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix type mismatches in the unit test mdev10259(). btr_search_info_get_ref_count(): Do not return early if !table->space. We can simply access table->space_id even after the tablespace has been discarded. btr_get_search_latch(): Relax a debug assertion to allow !index->table->space.
* | | Merge 10.2 into 10.3Marko Mäkelä2018-05-291-1/+71
|\ \ \ | |/ /
| * | Fix conversion warnings/errors.Vladislav Vaintroub2018-05-241-1/+1
| | |
| * | Merge remote-tracking branch 'origin/10.1' into 10.2Monty2018-05-241-1/+71
| |\ \ | | |/
| | * MDEV-10259 mysqld crash with certain statement length and...sachin2018-05-221-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order with Galera and encrypt-tmp-files=1 Problem:- If trans_cache (IO_CACHE) uses encrypted tmp file then on next DML server will crash. Case:- Lets take a case , we have a table t1 , We try to do 2 inserts in t1 1. A really long insert so that trans_cache has to use temp_file 2. Just a small insert Analysis:- Actually server crashes from inside of galera library. /lib64/libc.so.6(abort+0x175)[0x7fb5ba779dc5] /usr/lib64/galera/libgalera_smm.so(_ZN6galera3FSMINS_9TrxHandle5State... mysys/stacktrace.c:247(my_print_stacktrace)[0x7fb5a714940e] sql/signal_handler.cc:160(handle_fatal_signal)[0x7fb5a715c1bd] sql/wsrep_hton.cc:257(wsrep_rollback)[0x7fb5bcce923a] sql/wsrep_hton.cc:268(wsrep_rollback)[0x7fb5bcce9368] sql/handler.cc:1658(ha_rollback_trans(THD*, bool))[0x7fb5bcd4f41a] sql/handler.cc:1483(ha_commit_trans(THD*, bool))[0x7fb5bcd4f804] but actual issue is not in galera but in mariadb, because for 2nd insert we should never call rollback. We are calling rollback because log_and_order fails it fails because write_cache fails , It fails because after reinit_io_cache(trans_cache) , my_b_bytes_in_cache says 0 so we look into tmp_file for data , which is obviously wrong since temp was used for previous insert and it no longer exist. wsrep_write_cache_inc() reads the IO_CACHE in a loop, filling it with my_b_fill() until it returns "0 bytes read". Later MYSQL_BIN_LOG::write_cache() does the same. wsrep_write_cache_inc() assumes that reading a zero bytes past EOF leaves the old data in the cache Solution:- There is two issue in my_b_encr_read 1st we should never equal read_end to info->buffer. I mean this does not make sense read_end should always point to end of buffer. 2nd For most of the case(apart from async IO_CACHE) info->pos_in_file should be equal to info->buffer position wrt to temp file , since in this case we are not changing info->buffer it should remain unchanged.
* | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-0/+3
|\ \ \ | |/ /
| * | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-0/+3
| |\ \ | | |/
| | * Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-0/+3
| | |\
| | | * Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-0/+3
| | | |\
| | | | * Free memory in unit tests. Makes ASAN happier.Sergei Golubchik2018-01-221-0/+3
| | | | |
* | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | | MDEV-13728 - Import MySQL 5.7 atomic operations for MSVC and SolarisSergey Vojtovich2017-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | gcc_sync.h, solaris.h, generic-msvc.h copied verbatim.
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-10-302-2/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | TODO: enable MDEV-13049 optimization for 10.3
| * | | | Fix warnings in Win64Vladislav Vaintroub2017-10-112-2/+2
| | | | |
* | | | | Enusure that my_global.h is included firstMichael Widenius2017-08-242-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-07-051-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Simplify IO_CACHE by removing current_pos and end_pos as self-referencesVicențiu Ciorbaru2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These self references were previously used to avoid having to check the IO_CACHE's type. However, a benchmark shows that on x86 5930k stock, the type comparison is marginally faster than the double pointer dereference. For 40 billion my_b_tell calls, the difference is .1 seconds in favor of performing the type check. (Basically there is no measurable difference) To prevent bugs from copying the structure using the equals(=) operator, and having to do the bookkeeping manually, remove these "convenience" variables.
* | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-06-191-0/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-231-0/+3
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.0 into 10.1Marko Mäkelä2017-05-231-0/+3
| | |\ \ \ | | | |/ /
| | | * | MDEV-6262 analyze the coverity report on mariadbSergei Golubchik2017-05-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-04-034-4/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-304-4/+3
| |\ \ \ \ | | |/ / /
| | * | | Correct FSF addressiangilfillan2017-03-103-3/+3
| | | | |
| | * | | base64 serviceSergei Golubchik2017-03-101-1/+0
| | | | |
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2016-12-171-4/+4
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-11469 JSON_SEARCH returns incorrect results.Alexey Botchkov2016-12-091-4/+4
| | | | | | | | | | | | | | | | | | | | Support for '**' in json path expressions added.
* | | | | MDEV-11212 - Clean-up MariaDB atomic operationsSergey Vojtovich2016-12-133-13/+3
|/ / / / | | | | | | | | | | | | Removed my_atomic_initialize(): it doesn't make sense anymore.
* | | | MDEV-9143 JSON_xxx functions.Alexey Botchkov2016-10-192-0/+209
| | | | | | | | | | | | | | | | | | | | strings/json_lib.c added as a JSON library. SQL frunction added with sql/item_jsonfunc.h/cc
* | | | MDEV-7769 MY_CHARSET_INFO refactoring# On branch 10.2Alexander Barkov2016-10-101-6/+6
| | | | | | | | | | | | | | | | Part 3 (final): removing MY_CHARSET_HANDLER::well_formed_len().
* | | | Merge branch '10.2' into bb-10.2-connector-c-integ-submSergei Golubchik2016-09-211-23/+23
|\ \ \ \
| * | | | fix some quoting in error messagesSergei Golubchik2016-09-161-23/+23
| | | | | | | | | | | | | | | | | | | | add_identifier change comes from 5.7, everything else is a follow-up
* | | | | name clash with gnutls on on base64_encodeSergei Golubchik2016-09-121-6/+6
| | | | |
* | | | | MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-2/+1
| | | | |
* | | | | Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-1/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* | | | | MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-2/+1
|/ / / /
* | | | Fixed compiler warnings and test failures found by buildbotMonty2016-06-241-1/+1
| | | | | | | | | | | | | | | | Fixed ccfilter to detect errors where the column is included in the error message
* | | | Added new range of MariaDB error messages, starting from 3000Monty2016-04-051-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_differenceAlexander Barkov2016-03-311-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removing the "diff_if_only_endspace_difference" argument from MY_COLLATION_HANDLER::strnncollsp(), my_strnncollsp_simple(), as well as in the function template MY_FUNCTION_NAME(strnncollsp) in strcoll.ic - Removing the "diff_if_only_space_different" from ha_compare_text(), hp_rec_key_cmp(). - Adding a new function my_strnncollsp_padspace_bin() and reusing it instead of duplicate code pieces in my_strnncollsp_8bit_bin(), my_strnncollsp_latin1_de(), my_strnncollsp_tis620(), my_strnncollsp_utf8_cs(). - Adding more tests for better coverage of the trailing space handling. - Removing the unused definition of HA_END_SPACE_ARE_EQUAL
* | | Merge branch '10.0' into 10.1Oleksandr Byelkin2016-03-241-1/+43
|\ \ \ | |/ /