summaryrefslogtreecommitdiff
path: root/tests/mysql_client_test.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-161-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-081-2/+22
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2019-03-081-2/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | fix memory leaks in mysql_client_testSergei Golubchik2019-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes main.mysql_client_test, main.mysql_client_test_comp, main.mysql_client_test_nonblock failures in ASAN_OPTIONS="abort_on_error=1" runs
| * | | | | fix memory leaks in mysql_client_testSergei Golubchik2019-03-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes main.mysql_client_test, main.mysql_client_test_comp, main.mysql_client_test_nonblock failures in ASAN_OPTIONS="abort_on_error=1" runs
* | | | | | MDEV-18408 Assertion `0' failed in Item::val_native_result / ↵Alexander Barkov2019-02-251-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery The problem happened because Item_ident_for_show did not implement val_native(). Solution: - Removing class Item_ident_for_show - Implementing a new method Protocol::send_list_fields() instead, which accepts a List<Field> instead of List<Item> as input. Now no any Item creation is done during mysqld_list_fields(). Adding helper methods, to reuse the code easier: - Moved a part of Protocol::send_result_set_metadata(), responsible for sending an individual field metadata, into a new method Protocol_text::store_field_metadata(). Reusing it in both send_list_fields() and send_result_set_metadata(). - Adding Protocol_text::store_field_metadata() - Adding Protocol_text::store_field_metadata_for_list_fields() Note, this patch also automatically fixed another bug: MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns The reason for this bug was that Item_ident_for_show::val_xxx() and get_date() did not check field->is_null() before calling field->val_xxx()/get_date(). Now the default value is correctly sent by Protocol_text::store(Field*).
* | | | | | Merge branch '10.4' into bb-10.4-mdev16188Igor Babaev2019-02-031-1/+61
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-141-1/+61
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-16278: Missing DELETE operation in COM_STMT_BULK_STMTOleksandr Byelkin2018-12-141-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | Allow array binding for DELETE, test it.
* | | | | | MDEV-16188 Use in-memory PK filters built from range index scansIgor Babaev2019-02-031-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains a full implementation of the optimization that allows to use in-memory rowid / primary filters built for range   conditions over indexes. In many cases usage of such filters reduce   the number of disk seeks spent for fetching table rows. In this implementation the choice of what possible filter to be applied   (if any) is made purely on cost-based considerations. This implementation re-achitectured the partial implementation of the feature pushed by Galina Shalygina in the commit 8d5a11122c32f4d9eb87536886c6e893377bdd07. Besides this patch contains a better implementation of the generic   handler function handler::multi_range_read_info_const() that takes into account gaps between ranges when calculating the cost of range index scans. It also contains some corrections of the implementation of the handler function records_in_range() for MyISAM. This patch supports the feature for InnoDB and MyISAM.
* | | | | Merge 10.2 into 10.3Marko Mäkelä2018-10-091-0/+15
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-14581 Server does not clear diagnostics between sessionsVladislav Vaintroub2018-10-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Amend previous patch, so it works in all cases (also for "change user" command, and for RESET CONNECTION in 10.3)
* | | | | Removed even more warning that was found with -WunusedMonty2018-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed test if HA_FT_WTYPE == HA_KEYTYPE_FLOAT as this never worked (HA_KEYTYPE_FLOAT is an enum) - Define HA_FT_MAXLEN to 126 (was tested before but never defined)
* | | | | Fixed a compiler errorIgor Babaev2018-04-251-1/+2
| | | | |
* | | | | MDEV-11975: SQLCOM_PREPARE of EXPLAIN & ANALYZE statement do not return ↵Oleksandr Byelkin2018-04-251-0/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct metadata info Added metadate info after prepare EXPLAIN/ANALYZE.
* | | | | MDEV-15079: Parameter array operation inserts wrong values in autoincrement ↵Oleksandr Byelkin2018-04-251-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | field if indicator was specified test added (bug is fixed)
* | | | | Mdev-10664 Add statuses about optimistic parallel replication stallsSachin Setiya2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit we are adding three more status variable to SHOW SLAVE STATUS. Slave_DDL_Events and Slave_Non_Transactional_Events. Slave_DDL_Groups:- This status variable counts the occurrence of DDL statements Slave_Non_Transactional_Groups:- This variable count the occurrence of non-transnational event group. Slave_Transactional_Groups:- This variable count the occurrence of transnational event group. Patch Credit:- Kristian Nielsen
* | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-03-281-12/+4
|\ \ \ \ \ | |/ / / /
| * | | | After-merge fix for commit 98eb9518db1da854048b09d94244a982a1d32f9aMarko Mäkelä2018-03-161-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge only covered 10.1 up to commit 4d248974e00eb915a2fc433cc6b2fb5146281594. Actually merge the changes up to commit 0a534348c75cf435d2017959855de2efa798fd0b. Also, remove the unused InnoDB field trx_t::abort_type.
* | | | | MDEV-15501 : Make `proxy_protocol_networks` variable read-write.Vladislav Vaintroub2018-03-231-0/+12
| | | | |
* | | | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-191-0/+114
|\ \ \ \ \
| * \ \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-161-0/+114
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-15289 Binding an out-of-range DATETIME value in binary protocol breaks ↵Alexander Barkov2018-02-161-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | replication
* | | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-301-0/+80
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-14454 Binary protocol returns wrong collation ID for SP OUT parametersAlexander Barkov2017-11-211-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_param::set_value() did not set Item::collation and Item_param::str_value_ptr.str_charset properly. So both metadata and data for OUT parameters were sent in a wrong way to the client. This patch removes the old implementation of Item_param::set_value() and rewrites it using Type_handler::Item_param_set_from_value(), so now setting IN and OUT parameters share the a lot of code. 1. Item_param::set_str() now: - accepts two additional parameters fromcs, tocs - sets str_value_ptr, to make sure it's always in sync with str_value, even without Item_param::convert_str_value() - does collation.set(tocs, DERIVATION_COERCIBLE), to make sure that DTCollation is valid even without Item_param::convert_str_value() 2. Item_param::set_value(), which is used to set OUT parameters, now reuses Type_handler::Item_param_set_from_value(). 3. Cleanup: moving Item_param::str_value_ptr to private, as it's not needed outside. 4. Cleanup: adding a new virtual method Settable_routine_parameter::get_item_param() and using it a few new DBUG_ASSERTs, where Item_param cannot appear. After this change: 1. Assigning of IN parameters works as before: a. Item_param::set_str() is called and sets the value as a binary string b. The original value is sent to the query used for binary/general logging c. Item_param::convert_str_value() converts the value from the client character set to the connection character set 2. Assigning of OUT parameters works in the new way: a. Item_param::set_str() and sets the value using the source Item's collation, so both Item::collation and Item_param::str_value_ptr.str_charset are properly set. b. Protocol_binary::send_out_parameters() sends the value to the client correctly: - Protocol::send_result_set_metadata() uses Item::collation.collation (which is now properly set), to detect if conversion is needed, and sends a correct collation ID. - Protocol::send_result_set_row() calls Type_handler::Item_send_str(), which uses Item_param::str_value_ptr.str_charset (which is now properly set) to actually perform the conversion.
* | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-10-301-0/+225
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | TODO: enable MDEV-13049 optimization for 10.3
| * | | | | MDEV-14013 : sql_mode=EMPTY_STRING_IS_NULLhalfspawn2017-10-141-0/+225
| | | | | |
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-041-3/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-021-3/+3
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-281-3/+3
| | | | | |
* | | | | | In test_proxy_header(), use IP address 192.0.2.1 .mariadb-10.3.1Vladislav Vaintroub2017-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This address is from reserved range (rfc5737), and this ensures that DNS won't resolve it into a name
* | | | | | mysql_client_test: don't use 192.168.0.1Sergei Golubchik2017-08-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the test expects 192.168.0.1 not to resolve to anything. this is a fragile assumption. use 127.0.0.2 instead (which only marginally better)
* | | | | | fix compile errorsVladislav Vaintroub2017-08-231-1/+1
| | | | | |
* | | | | | MDEV-11159 Server proxy protocol supportVladislav Vaintroub2017-08-221-0/+181
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | accept proxy protocol header from client connections. The new server variable 'proxy_protocol_networks' contains list of networks from which proxy header is accepted.
* | | | | Merge 10.2 into bb-10.2-extMarko Mäkelä2017-06-271-0/+35
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-12579: Incorrect arguments to mysqld_stmt_execute when using LOBsOleksandr Byelkin2017-06-221-0/+35
| | | | | | | | | | | | | | | | | | | | Parameters can be MYSQL_TYPE_VARCHAR for long data load.
* | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-06-151-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-231-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.0 into 10.1Marko Mäkelä2017-05-231-0/+1
| | |\ \ \ | | | |/ /
| | | * | MDEV-6262 analyze the coverity report on mariadbSergei Golubchik2017-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
* | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-03-311-2/+48
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-2/+48
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.0 into 10.1Marko Mäkelä2017-03-091-2/+48
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, implement MDEV-11027 a little differently from 5.5 and 10.0: recv_apply_hashed_log_recs(): Change the return type back to void (DB_SUCCESS was always returned). Report progress also via systemd using sd_notifyf().
| | | * | Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-031-2/+48
| | | |\ \ | | | | |/
| | | | * MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_listSergei Golubchik2017-02-271-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left with pointers to invalid MYSQL.
| | * | | MDEV-11082 mysql_client_test: test_ps_query_cache fails with ↵Elena Stepanova2016-10-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | group-concat-max-len=1M test_bug14169 was setting session group_concat_max_len=1024 and did not clean it up. Because of that test_ps_query_cache, when run with group-concat-max-len != 1024, had different values in connections, and was inserting into query cache when a hit was expected. Fixed by adding a clean-up for the value in test_bug14169
* | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-03-181-0/+28
|\ \ \ \ \ | |/ / / /
| * | | | fix test for windows 64Oleksandr Byelkin2017-03-101-5/+13
| | | | |