Commit graph

179637 commits

Author SHA1 Message Date
Marko Mäkelä
9eb3fcc9fb Follow-up fix of MDEV-14717 RENAME TABLE in InnoDB is not crash-safe
trx_undo_page_report_rename(): Return a pointer to the start of the
undo log record, not to the start of the (not yet written) next free
record. The wrong return value would sometimes cause ROLLBACK to crash
in an assertion failure (trying to parse garbage from the free area at
the end of the insert_undo log page) if the TRX_UNDO_RENAME_TABLE record
was the very last thing that was written to the insert_undo log. This
would occasionally happen when an ALTER TABLE operation is rolled
back due to invalid FOREIGN KEY constraints in the innodb.innodb test.
In these tests, the error ER_ERROR_ON_RENAME (1025) would be returned
at the end of the ALGORITHM=COPY operation of ALTER TABLE.
2018-01-03 14:54:15 +02:00
Monty
c2c2173727 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-01-03 02:59:32 +02:00
Monty
16cd55a33a Fixed crashing bug in mysqlbinlog
- The fix in mf_iocache2.c was just to fix a compiler warning
2018-01-03 01:05:25 +02:00
Monty
6f28f78429 More output in galera.query_cache.test
This is to be able to better track where things goes wrong
2018-01-03 01:01:53 +02:00
Monty
83a8b0e9d3 Fixed compiler warning 2018-01-03 01:01:53 +02:00
Monty
22b4f469ca MDEV-14813 rpl.rpl_ctype_latin1 fails in buildbot on Mac with wrong result
Make rpl_ctype_latin1 more portable by printing names in hex
Also only run if lower_case_table_names is 0, as this affects the result
2018-01-03 01:01:53 +02:00
Varun Gupta
b2115ce235 Rocksdb fails to build when the source and build directory are not the same. This is a follow
up fix for MDEV-12458
2018-01-02 21:50:40 +02:00
Monty
14e01bd868 Fixed simple failures:
- openssl_1 errors where system dependent
- Used not portable UINT32_MAX instead of UINT_MAX32
2018-01-02 02:03:12 +02:00
Monty
fbab79c9b8 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	cmake/make_dist.cmake.in
	mysql-test/r/func_json.result
	mysql-test/r/ps.result
	mysql-test/t/func_json.test
	mysql-test/t/ps.test
	sql/item_cmpfunc.h
2018-01-01 19:39:59 +02:00
Monty
b32b22baba Disable warnings in partion_alter_myisam
Disabled warnings for directory option as this is depending on compilation
options.
2018-01-01 19:38:58 +02:00
Monty
aed2050e40 Ignore generated file rdb_source_revision.h 2018-01-01 15:01:20 +02:00
Monty
7e882a60bf Ensure that table->vcol_set is properly restored if used
Code in QUICK_RANGE_SELECT::init_ror_merged_scan() could theoretically
have caused crashes if this was ever called from an update or delete

This also found a bug in the vcol/range.result. file.
2018-01-01 14:44:20 +02:00
Monty
08ff39dca2 Write location of core when doing core dump 2018-01-01 14:12:18 +02:00
Monty
322c637c1c Fixed compiler warnings about possible uninitialized variables 2018-01-01 14:10:22 +02:00
Varun Gupta
7703095d2e MDEV-12458: Variable and log records to indicate RocksDB version are missing
Added a system variabe rocsdb_git_hash to MyRocks which tell us the version of RocksDB being used
2017-12-31 21:58:50 +02:00
Varun Gupta
a118c20c81 MDEV-10844: EXPLAIN FORMAT=JSON doesn't show order direction for filesort
Currently explain format=json does not show the order direction of fields used during filesort.
This patch would remove this limitation
2017-12-30 10:18:22 +05:30
Elena Stepanova
8bcbcac053 Updated list of unstable tests for 10.2.12 2017-12-29 17:25:21 +02:00
Monty
afbb72b3b6 Made IO_CACHE safe for reading big blocks (> 2G)
The reason for adding this was that while testing mysqlbinlog on
a replication event with 3G event output, Linux failed reading
the whole file in memory with one read (only got 2G on first read
even if file had just been written).

- Don't reset info->error on write error in IO_CACHE.
- In case of write_error in IO_CACHE , always return -1
- Fixed wrong result from my_read when using MY_FULL_IO. Also don't give
  an error in case of retry.
2017-12-29 13:38:55 +02:00
Monty
e64184134a mysqlbinlog now prints "# Number of rows" and stops on errors
Main problem was that no log-event print function checked for disk
full error on the IO_CACHE.
All changes in this patch only affects mysqlbinlog, not the server!

- Changed all log-event print functions to return 1 on error
- Fixed memory usage when not using --flashback.
- Added printing of number of rows in row events. Can be disabled with
  --print-row-count=0
- Print annotated rows when using mysqlbinlog --short-form
- Fixed that mysqlbinlog --debug works
- Fixed create_drop_binlog.test test failure
- Reorganized fields in PRINT_EVENT_INFO to be according to size to
  optimize storage
- Don't change print_row_event_position or print_row_counts if set by user
- Remove some testing of argument to my_free is 0
- base64-output=never is now supported and works in all context
- Updated help information for --base64-output and --short-form
- print_row_count is now on by default. Reset automatically if --short-form
  is used
- Removed obsolote warning for mysql 5.6.0
- More DBUG_PRINT for mysqltest.cc
- my_b_write_byte() now checks for flush failures. This fixed a memory
  overrun on disk full
- my_b_printf() now returns 1 on failure, 0 on ok.  This simplifies code
  and no old code was using the old return value of my_b_printf().
- my_b_Write_backtick_quote() now returns 1 on failure and 0 on ok
- Fixed some error conditions in log printing that was not previously
  handled.
- Slave_rows_error_report() can now handle longlong positions
- Write_on_release_cache() rewritten so that we can detect errors
  on flush. Not depending on automatic release anymore.
- Changed types for Pos and End_log_pos to 64 bit in SHOW BINLOG EVENTS
- Fixed that copy_event_cache_to_string_and_reinit() works with strings
  longer than 4G (Changed to use LEX_STRING instead of String)
- Restricted binlog_rows_event_max_size to UINT32_MAX-1 as String's are
  anyway restricted to UINT32_MAX
- Fixed bug in rpl_binlog_state::write_to_iocache() which hide write
  failures (duplicate variable name)
- Fixed bug in String::append if original string was not allocated
- Stop mysqlbinlog output at once if there is an error.
- Before printing error message, flush result file. This ensures that
  the error message is printed last. (Easier to find)
2017-12-29 13:35:41 +02:00
Sergey Vojtovich
f5c479565d MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in
Locked_tables_list::unlock_locked_tables

Similarly to regular DROP TABLE, don't leave locked tables mode if CREATE OR
REPLACE dropped temporary table but failed to cerate new one.

The problem is that there's no track of which temporary table was "locked" by
LOCK TABLES.
2017-12-29 11:40:23 +04:00
Vicențiu Ciorbaru
24774fba65 Update galera_gtid_slave result file post merge 2017-12-29 09:33:30 +02:00
Vicențiu Ciorbaru
6c4cf79d94 MDEV-13683: crash in Item_window_func::update_used_tables
Window definitions are resolved during fix fields. Updating used tables
for window functions must be done after all window functions have had a
chance to be resolved.

There was an additional problem with the implementation: expressions that
contained window functions never updated the expression's used tables.
To fix both these issues, make sure to call "update_used_tables" on all
items that contain window functions after we have passed through all
items.
2017-12-28 20:04:23 +02:00
Vicențiu Ciorbaru
8e9d8ffd1a Update main.innodb test result post-merge 2017-12-28 19:59:04 +02:00
Vicențiu Ciorbaru
1a9728d901 Update Connector/C 2017-12-28 19:27:07 +02:00
Vicențiu Ciorbaru
9aeb5d01d6 Merge remote-tracking branch 'origin/10.1' into bb-10.2-vicentiu 2017-12-28 19:27:00 +02:00
Monty
14de2ad3cb Removed curr_bitmap_pos++ from possible macro 2017-12-28 11:47:03 +02:00
Sergei Golubchik
7e4c185c77 MDEV-14272 Mariadb crashes with signal 11 when using federatedx engine and galera
cherry-pick e6ce97a592
2017-12-28 02:13:25 +01:00
Igor Babaev
bbb8c9d773 Fixed the bug MDEV-14755 Crash when executing prepared statement
for a query that uses CTE

The first reference to a CTE in the processed query uses the unit
built by the parser for the CTE specification. This unit is
considered as the specification of the derived table created for
the first reference of the CTE. This requires some transformation of
the original query tree: the unit of the specification must be moved
to a new position as a slave of the select where the first reference
to the CTE occurs. The transformation is performed by the function
st_select_lex_node::move_as_slave(). There was an obvious bug in this
function. As a result of this bug in many cases the moved unit turned
out to be lost in the query tree. This could cause different problems.
In particular the prepared statements for queries that used CTEs could
miss cleanup for some selects that was performed at the end of the
preparation/execution of the PSs. If such cleanup is not done for a PS
the next execution of the PS causes an assertion abort or a crash.
2017-12-27 10:37:13 -08:00
Vicențiu Ciorbaru
d1c2cd30b7 Merge remote-tracking branch '10.0' into 10.1 2017-12-27 17:50:39 +02:00
Alexander Barkov
02b7dc7bec MDEV-14249 Wrong character set info of Query_log_event and the query in Query_log_event constructed by different charsets cause error when slave apply the event. 2017-12-27 12:30:05 +04:00
Sergei Golubchik
5377242fff MDEV-14026 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for partitioned MyISAM table with DATA DIRECTORY/INDEX DIRECTORY options
set data_file_name and index_file_name in HA_CREATE_INFO
before calling check_if_incompatible_data()
2017-12-25 15:18:21 +01:00
Sergei Golubchik
6d8b1bd620 cleanup: ha_partition::update_create_info 2017-12-25 15:18:21 +01:00
Sergei Golubchik
c881d82c93 cleanup: ha_myisam::data_file_name and index_file_name
don't allocate them on THD::mem_root on every init(HA_STATUS_CONST) call,
do it once in open() (because they don't change) on TABLE::mem_root
(so they stay valid until the table is closed)
2017-12-25 15:18:21 +01:00
Daniel Black
c3bd0b0301 Appveyor: apply feedback from wlad, timeout=4
PKG_CONFIG does not really work on Windows, Strawberry perl's uses mingw
libraries, which VS compiler cannot use,

BOOST not used.

Tests main.query_cache_debug and main.mdev-504 timed out on debug build
at 2 minutes so increase the timeout to 4 minutes.

Overall build time was 30 min 44 seconds so plenty of time currently.

Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
2017-12-25 12:00:52 +01:00
Daniel Black
e8182df142 MDEV-12386: Use AppVeyor for public Windows CI
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-12-25 12:00:52 +01:00
Sergei Golubchik
76056559ac MDEV-9869 INSTALL SONAME 'ha_connect'
fix 011497bd60

in RPM and DEB: storage engine packages must require the server
package of exactly correct version.
2017-12-25 12:00:52 +01:00
Sergei Golubchik
9631d933fb debian: don't be smart about skipping plugins 2017-12-25 12:00:51 +01:00
Sachin Setiya
2fe6186124 MDEV-10715 Galera: Replicate MariaDB GTID to other nodes in the cluster
Problem:- Gtid are not transferred in Galera Cluster.

Solution:- We need to transfer gtid in the case on either when cluster is
slave/master in async replication. In normal Gtid replication gtid are generated on
recieving node itself and it is always on sync with other nodes. Because galera keeps
node in sync , So all nodes get same no of event groups. So the issue arises when
say galera is slave in async replication.
A
|    (Async replication)
D <-> E <-> F  {Galera replication}
So what should happen is that all node should apply the master gtid but this does
node happen, becuase node E, F does not recieve gtid from D in write set , So what E(or F)
does is that it applies wsrep_gtid_domain_id, D server-id , E gtid next seq no. This
generated gtid does not always work when say A has different domain id.

So In this commit, on galera node when we see that this event is recieved from master
we simply write Gtid_Log_Event in write_set and send it to other nodes.
2017-12-25 13:57:42 +05:30
Alexey Botchkov
f0f3b6549a MDEV-13970 crash in Item_func_json_extract::read_json.
Item_func_json_extract::val_int fixed.
        It wasn't tested yet as it's called in exotic cases only.
2017-12-25 08:10:48 +04:00
Monty
6e7ca6b0b2 MDEV-13719 Assertion `bit < (map)->n_bits' failed in bitmap_is_set
Problem was that MAX_SLAVE_ERROR didn't cover all possible errors.
2017-12-23 14:53:12 +02:00
Sergei Petrunia
068b1d0eb8 Merge branch '10.2' into bb-10.2-mariarocks 2017-12-23 13:32:54 +03:00
Daniel Bartholomew
db3bdca7c2 bump the VERSION 2017-12-22 16:45:20 -05:00
Vicențiu Ciorbaru
985d2d393c Merge remote-tracking branch 'origin/10.1' into 10.2 2017-12-22 12:23:39 +02:00
Sergei Petrunia
8c3a1b15e6 Fix a typo in previous commit 2017-12-22 13:22:59 +03:00
Sergey Vojtovich
4b8cd4536a MDEV-13626 Merge InnoDB test cases from MySQL 5.7
Coverage for temporary tables modifications in read-only transactions.
Introduced in 5.7 by 325cdf426
2017-12-22 14:03:25 +04:00
Alexander Barkov
a76a2522ec MDEV-14426 Assertion in Diagnostics_area::set_error_status when using a bad datetime with PS and SP 2017-12-22 08:23:33 +04:00
Sergei Petrunia
5426f6e30f Better comments: explain why slave_use_idempotent_for_recovery is disabled 2017-12-22 02:30:32 +03:00
Sergei Petrunia
ab0a7e13b2 More fixes in MyRocks' rocksdb_rpl testsuite
- Make my.cnf to include rpl_1slave_base.cnf (needed for tests that
  actually use replication, i.e. need a functioning slave)
- Adjust and enable singledelete_idempotent_table.test
- More edits in disabled.def
2017-12-22 02:21:27 +03:00
Sergei Petrunia
aed781ef7f Cleanup in storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def 2017-12-22 01:13:43 +03:00
Sergei Petrunia
9c28fd7a33 Merge branch '10.2' into bb-10.2-mariarocks 2017-12-21 23:34:49 +03:00