summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | MDEV-11672 mysql_list_field() returns wrong default values for VIEWAlexander Barkov2016-12-291-0/+71
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem happened because Item_ident_for_show::field_type() always returned MYSQL_TYPE_DOUBLE and ignored the actual data type of the referenced Field. As a result, the execution always used Item_ident_for_show::val_real() to send the default value of the field, so most default values for non-numeric types were displayed as '0'. This patch: 1. Cleanup: a. Removes Send_field::charsetnr, as it's been unused since introduction of Item::charset_for_protocol() in MySQL-5.5. b. Adds the "const" qualifier to Field::char_length(). This is needed for (5.a), see below. 2. Introduces a new virtual method Type_handler::charset_for_protocol(), returning item->collation.collation for string data types, or &my_charset_bin for non-string data types. 3. Changes Item::charset_for_protocol() from virtual to non-virtual. It now calls type_handler()->charset_for_protocol(). As a good side effect, duplicate code in Item::charset_for_protocol() and Item_temporal_hybrid_func::charset_for_protocol() is now gone. 4. Fixes Item_ident_for_show::field_type() to correctly return its data type according to the data type of the referenced field. This actually fixes the problem reported in MDEV-11672. Now the default value is sent using a correct method, e.g. val_str() for VARCHAR/TEXT, or val_int() for INT/BIGINT. This required additional changes: a. in DBUG_ASSERT in Protocol::store(const char *,size_t,CHARSET_INFO), This method is now used by mysqld_list_fields(), which (unlike normal SELECT queries) does not set field_types/field_pos/field_count. b. Item_ident_for_show::Item_ident_for_show() now set standard attributes (collation, decimals, max_length, unsigned_flag) according to the referenced field, to make charset_for_protocol() return the correct value and to make mysqld_list_fields() correctly send default values. 5. In order to share the code between Item_field::set_field() and Item_ident_for_show::Item_ident_for_show(): a. Introduces a new method Type_std_attributes::set(const Field*) b. To make (a) possible, moves Item::fix_char_length() from Item to Type_std_attributes, also moves char_to_byte_length_safe() from item.h to sql_type.h c. Additionally, moves Item::fix_length_and_charset() and Item::max_char_length() from Item to Type_std_attributes. This is not directly needed for the fix and is done just for symmetry with fix_char_length(), as these three methods are directly related to each other.
* | | | MDEV-11082: Fix mysql_client_test.c (by Elena)Nirbhay Choubey2016-12-191-0/+3
| | | |
* | | | store/show vcols as item->print()Sergei Golubchik2016-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | otherwise we'd need to store sql_mode *per vcol* (consider CREATE INDEX...) and how SHOW CREATE TABLE would support that? Additionally, get rid of vcol::expr_str, just to make sure the string is always generated and never leaked in the original form.
* | | | MDEV-7145: Delayed replicationKristian Nielsen2016-10-161-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge feature into 10.2 from feature branch. Delayed replication adds an option CHANGE MASTER TO master_delay=<seconds> Replication will then delay applying events with that many seconds. This creates a replication slave that reflects the state of the master some time in the past. Feature is ported from MySQL source tree. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
| * | | | MDEV-7145: Delayed replication, fixing test failures.Kristian Nielsen2016-10-141-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Two merge error fixed, and testsuite updated to removed some other test failues. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
* | | | Merge branch '10.2' into bb-10.2-connector-c-integ-submSergei Golubchik2016-09-211-1/+2
|\ \ \ \
| * \ \ \ Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-1/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-1/+2
| | |\ \ \ | | | |/ /
| | | * | MDEV-10559: main.mysql_client_test_nonblock crashes in buildbot on 10.0Oleksandr Byelkin2016-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | fix for async operations
| | | * | MDEV-10559: main.mysql_client_test_nonblock crashes in buildbot on 10.0Oleksandr Byelkin2016-08-151-4/+5
| | | | | | | | | | | | | | | | | | | | Fix tests which possibly fail connects in non_blocking mode.
* | | | | After-review changesSergei Golubchik2016-09-122-43/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove redundant code * fix tests * move declarations and defines where they belong
* | | | | Add C/C as a submodule in libmariadb/Sergei Golubchik2016-09-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also * fix includes * rename cmake macros and targets to avoid name clashes
* | | | | MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-254-34/+55
|/ / / /
* | | | Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-194-55/+34
| | | | | | | | | | | | | | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* | | | MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-194-34/+55
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-7/+9
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-05-041-7/+9
| |\ \ \ | | |/ /
| | * | tests -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ciSergei Golubchik2016-04-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: MDEV-7693 MariaDB - mysql-test - SUITE:funcs_1 - funcs_1.is_tables_mysql is failing on TABLE_COLLATION /DATABASE_COLLATION MDEV-8487 mysql-test - main.information_schema 'xtradb' fails MDEV-8486 mysql-test - main.bootstrap fails
* | | | Cleanups:Monty2016-04-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed some QQ markers - Removed some rows not compatible with valgrind 3.9.0 - Made mysql_install_db.sh more silent by default. --verbose now gives more information - Added assert that auto-increment doesn't generate 0 (safety) - Removed thd->set_time() in some places as it's set in init_for_queries() - Fixed some --big tests in tokudb - Fixed a bug in mysql_client_test.cc where sql_mode was not properly reset
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-233-6/+6
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-213-6/+6
| |\ \ \ | | |/ /
| | * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-043-6/+6
| | | |
* | | | Merge branch '10.1' into 10.2Monty2016-02-061-0/+49
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-281-0/+14
| | | | | | | | | | | | | | | | SHOW CREATE PROCEDURE/FUNCTION fixed.
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-281-0/+7
| | | | | | | | | | | | | | | | SHOW MASTER STATUS fixed.
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-281-0/+7
| | | | | | | | | | | | | | | | SHOW SLAVE STATUS fixed.
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-281-0/+7
| | | | | | | | | | | | | | | | Fix for SHOW GRANTS statement.
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-281-1/+6
| | | | | | | | | | | | | | | | Fix for SHOW CREATE DATABASE.
| * | | MDEV-5273 Prepared statement doesn't return metadata after prepare.Alexey Botchkov2016-01-261-0/+9
| | | | | | | | | | | | | | | | | | | | The metadata creation part of the mysqld_shww_create separated to be used on the mysqld_stmt_prepare stage.
* | | | MDEV-9117: Client Server capability negotiation for MariaDB specific ↵Oleksandr Byelkin2016-02-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality New capability flags space. Removed old progress flag, added new one.
* | | | Fix client unit test to drop all used tables.Oleksandr Byelkin2016-02-021-1/+1
|/ / /
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-212-0/+9
|\ \ \ | |/ /
| * | Fixes to get all test to run on MacosX Lion 10.7Monty2015-11-292-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | add missing DBUG_RETURN-sSergei Golubchik2015-11-161-1/+1
| | |
* | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-041-3/+19
| | | | | | | | | | | | stopped with no-zero size)
* | | remove a google specific scriptSergei Golubchik2015-04-081-119/+0
| | |
* | | Push for testing of encryptionMonty2015-02-101-0/+119
|/ /
* | 5.5 mergeSergei Golubchik2015-01-212-2/+2
|\ \ | |/
| * mysql-5.5.41 mergeSergei Golubchik2014-12-192-2/+2
| |\
| | * Changing the copyright headers a bit to be complaint with the standardsMurthy Narkedimilli2014-08-272-2/+2
| | |
* | | 5.5.40+ mergeSergei Golubchik2014-10-091-5/+5
|\ \ \ | |/ /
| * | MDEV-5120 Test suite test maria-no-logging failsSergei Golubchik2014-10-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | stat structure (from <sys/stat.h>) is conditionally defined to have different layout and size depending on the defined macros. The correct macro is defined in my_config.h, which means it MUST be included first (or, at least before <features.h> - so, practically, before including any system headers).
* | | MDEV-6647 MariaDB CLI client doesnt show CREATE INDEX progressSergei Golubchik2014-09-101-1/+19
| | | | | | | | | | | | SQLCOM_CREATE_INDEX was missing CF_REPORT_PROGRESS flag
* | | Fixed assert in perfschema/pfs.cc::start_idle_wait_v1 when using performance ↵Michael Widenius2014-07-191-1/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | schema and big packets in debug version. The bug was that my_real_read() called net_before_header_psi() multiple times for long packets. Fixed by adding a flag when we are reading a header. Did also some cleanups to interface of my_net_read() to avoid unnecessary calls if performance schema is not used. - Added my_net_read_packet() as a replacement for my_net_read(). my_net_read() is still in the client library for old clients. - Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet() - Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server. - Added tests for compressed protocol and big packets include/mysql.h.pp: Added my_net_read_packet() as a replacement for my_net_read() include/mysql_com.h: Added my_net_read_packet() as a replacement for my_net_read() mysql-test/r/mysql_client_test_comp.result: New test mysql-test/t/mysql_client_test-master.opt: Added max_allowed_packet to be able to test big packets and packet size overflows. mysql-test/t/mysql_client_test_comp-master.opt: New test mysql-test/t/mysql_client_test_nonblock-master.opt: Added max_allowed_packet to be able to test big packets and packet size overflows. sql-common/client.c: Use my_net_read_packet() sql/mf_iocache.cc: Use my_net_read_packet() sql/mysqld.cc: Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet() sql/net_serv.cc: Added argument to my_real_read() to indicte if we are reading the first block of the next statement and should call performance schema. Added 'compatibilty function' my_net_read(). Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server. sql/sql_class.cc: Removed m_server_idle (not needed anymore) sql/sql_class.h: Removed m_server_idle (not needed anymore) sql/sql_parse.cc: Removed m_server_idle (not needed anymore) tests/mysql_client_test.c: Added tests for compressed protocol and big packets
* | | MDEV-5995 MySQL Bug#12750920: EMBEDDED SERVER START/STOP.Alexey Botchkov2014-06-112-11/+175
| | | | | | | | | | | | | | | | | | Some variables weren't cleared properly so consequitive embedded server start/stop failed. Cleanups added. Also mysql_client_test.c extended to test that (taken from Mattias Johnson's patch)
* | | 5.5.38 mergeSergei Golubchik2014-06-061-0/+1
|\ \ \ | |/ /
| * | cmake: mark AIO_LIBRARY, EVENT_LIBRARY, GROFF, NROFF as advanced;Sergei Golubchik2014-06-031-0/+1
| | | | | | | | | | | | use -ggdb3 if supported
* | | 5.5 mergeSergei Golubchik2014-05-0912-0/+12
|\ \ \ | |/ /
| * | mysql-5.5.37 selective mergeSergei Golubchik2014-03-2712-0/+12
| |\ \ | | |/
| | * Updated/added copyright header. Added line "use is subject to license terms" Murthy Narkedimilli2014-02-1712-0/+12
| | | | | | | | | | | | | | | to copyright header.