Commit graph

85813 commits

Author SHA1 Message Date
Praveenkumar Hulakund
1d9ae547f3 Bug#14117012 - CHILD PROCESS MYSQL UTILITIES PICKING UP LOCAL
CONFIG FILES CAUSES TEST

Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching
"mysql_upgrade" shows following calls after forking "mysql" or
"mysql_check" when configuration file information is passed as
first argument to "mysql_upgrade".

strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f

[pid  6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0
[pid  6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3


But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed
as first argument. Before forking, in function "find_tool" of
"mysql_upgrade", check is made to verify whether tool can be
executable or not by calling "mysqlcheck --help" and "mysql --help".
But argument "--no-defaults", "--defaults-file" or
"defaults-extra-file" is not passed to "mysql" and "mysqlcheck".
So my.cnf is searched in default paths.

Fix:
------
Modified code to pass "--no-defaults" as first argument to "mysql"
and "mysqlcheck" while checking tool can be executed or not.
2014-01-31 09:19:12 +05:30
Nirbhay Choubey
30b6b39d0b Updating test result. 2014-01-30 19:08:00 -05:00
Ritheesh Vedire
bebb3427f2 Bug#16814264: FILTER OUT THE PERFORMANCE_SCHEMA RELAY LOG EVENTS FROM RELAY LOG
Performance schema tables are local to a server and they should not
  be allowed to be executed by the slave from the relay log.
  From 5.6.10, P_S events are not written into the binary log.
  But prior to that, from mysql 5.5 onwards, P_S events are written 
  to the binary log by master.
  The following are problematic scenarios:
      
  1. Master 5.5 -> Slave 5.5
     ========================
    A) RBR: Slave crashes
    B) SBR: P_S statements are replicated.
      
  2.Master 5.5 -> Slave 5.6
    ========================
    A) RBR: SQL thd generates error
    B) SBR : P_S statements are replicated
      
  3. 5.5 binlog executed on a server 5.5 using mysqlbinlog|mysql
     =================================================================
     A) RBR: Server crash  (because of BINLOG'... statement)
     B) SBR: P_S statements are executed
      
  4. 5.5 binlog executed on server 5.6 using mysqlbinlog|mysql
     ================================================================
     A) RBR: SQL error (because of BINLOG'... statement)
     B) SBR: P_S statements are executed.
      
      
    The generalized behaviour should be:
    a) Slave SQL thread should certainly ignore P_S events read from
       the relay log.
    b) mysqlbinlog|mysql should replay the binlog succesfully.
2014-01-31 04:25:39 +05:30
Annamalai Gurusami
d13408f8e4 Bug #14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
Problem:

The function row_upd_changes_ord_field_binary() is used to decide whether to
use row_upd_clust_rec_by_insert() or row_upd_clust_rec().  The function
row_upd_changes_ord_field_binary() does not make use of charset information.
Based on binary comparison it decides that r1 and r2 differ in their ordering
fields.

In the function row_upd_clust_rec_by_insert(), an update is done by delete +
insert.  These operations internally make use of cmp_dtuple_rec_with_match()
to compare records r1 and r2.  This comparison takes place with the use of
charset information.

This means that it is possible for the deleted record to be reused in the
subsequent insert.  In the given scenario, the characters 'a' and 'A' are
considered equal in the my_charset_latin1.  When this happens, the ownership
information of externally stored blobs are not correctly handled.

Solution:

When an update is done by delete followed by insert, disown the relevant
externally stored fields during the delete marking itself (within the same
mtr).  If the insert succeeds, then nothing with respect to blob ownership
needs to be done.  If the insert fails, then the disown done earlier will be
removed when the operation is rolled back.

rb#4479 approved by Marko.
2014-01-30 12:38:13 +05:30
Yoni Fogel
4d9ba2645a fixes Tokutek/ft-index#163 frwlock is properly split into .h and .cc. Users only include .h 2014-01-29 22:09:33 -08:00
Yoni Fogel
198b4d60bd Refs Tokutek/ft-index#46 Updated comments in dmt.h 2014-01-29 20:59:40 -08:00
Yoni Fogel
a5e7b6aca6 Refs Tokutek/ft-index#46 Rename dmt_size->num_klpairs, dmt_iterate*->iterate* 2014-01-29 20:59:36 -08:00
Yoni Fogel
4d3451acd0 Refs Tokutek/ft-index#46 Unify toku_mempool_*_(size|space) to be toku_mempool_*_size 2014-01-29 20:59:34 -08:00
Yoni Fogel
5c9a1a4ca1 Refs Tokutek/ft-index#46 don't (malloc|alloca)+memcpy before le_pack;
Instead just keep mempool around a little longer (like pre-refactoring).  This should
reduce large mallocs and remove a memcpy
2014-01-29 20:59:32 -08:00
Yoni Fogel
7a2e9511a3 Refs Tokutek/ft-index#46 improve test coverage, minor formatting 2014-01-29 20:59:28 -08:00
Yoni Fogel
51d75f315d Refs Tokutek/ft-index#46 cleaned up serialization, upped version to 26 2014-01-29 20:59:26 -08:00
Yoni Fogel
db9ef1a573 Refs Tokutek/ft-index#46 Comments, minor renames, reworked bn_data::move_leafentries s.t. splits do not significantly increase memory usage of basement nodes and to be cleaner 2014-01-29 20:59:24 -08:00
Yoni Fogel
7f2e8e728b Refs Tokutek/ft-index#46 reimplemented bn_data::move_leafentries_to for speed
now uses dmt iterate_on_range and the dmt builder instead of a for loop
2014-01-29 20:59:22 -08:00
Yoni Fogel
3b661a4ba9 Refs Tokutek/ft-index#46 fix overactive inequality assertion in mempool 2014-01-29 20:59:19 -08:00
Yoni Fogel
6b0c108cff Refs Tokutek/ft-index#46 Killed dmt_functor<> template. Added dmtwriter_t template parameter to dmt and some documentation 2014-01-29 20:59:17 -08:00
Yoni Fogel
eef0ab7812 Refs Tokutek/ft-index#46 documentation/comments 2014-01-29 20:59:15 -08:00
Yoni Fogel
12937dc284 Refs Tokutek/ft-index#46 Finish verify (find purpose). Restore old verify_in_mempool functionality 2014-01-29 20:59:10 -08:00
Yoni Fogel
7e32e7c7f8 Refs Tokutek/ft-index#46 Minor optimizations, added some todos for code review. WILL NOT COMPILE 2014-01-29 20:59:08 -08:00
Yoni Fogel
8d45bea397 Refs Tokutek/ft-index#46 Add some comments. Improve dmt::verify() to check for more types of corruption. More static checks 2014-01-29 20:59:05 -08:00
Yoni Fogel
7fb84ea746 Refs Tokutek/ft-index#46 Remove ctree/dtree/mnode/cnode/base node/dnode/marks/etc... That is, removed all items that
were designed to allow us to upgrade the dmt later (e.g. fixed-length nodes for tree form) or merge with old omt (e.g. supporting marks)
2014-01-29 20:58:46 -08:00
Yoni Fogel
8e04352397 Refs Tokutek/ft-index#46 Added some comments, deleted unused/commented out code, renamed variables 2014-01-29 20:58:35 -08:00
Yoni Fogel
b0ccec783a Refs Tokutek/ft-index#46 Add dmt (dynamic OMT)
Use dmt to replace omt in bn_data class for storing leafentries.
Optimization for serial inserts and mempool
2014-01-29 20:53:35 -08:00
Nirbhay Choubey
ecc2c96c9d Merge of maria/5.5 into maria-5.5-galera.
bzr merge -r tag:mariadb-5.5.35 maria/5.5
2014-01-29 19:00:43 -05:00
Leif Walsh
5a61f34453 added passthrough scoped_malloc impl for osx #160
osx doesn't support __thread well so scoped_malloc breaks it.  Rather than
fix it, we implement a correct but poorly-performing implementation for
now that will be used on osx machines.

fixes #160
2014-01-29 18:40:27 -05:00
Yoni Fogel
00d69605eb fixes Tokutek/ft-index#57 Rewrite test. 2014-01-29 12:28:43 -08:00
Rich Prohaska
2ea52a40ca #172 map ydb errors to handler errors in prelocking functions 2014-01-29 14:03:00 -05:00
unknown
84e7f2c23b merge of MDEV-5369 (5.3->5.5) 2014-01-29 00:19:53 +02:00
unknown
08293a35e6 MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of PS with LEFT JOIN, TEMPTABLE view
Set of JOIN_TYPE_OUTER made only once to avoid interference with optimization joins which made only once per query.
2014-01-28 23:23:14 +02:00
Sergei Golubchik
6b6d40fa6c 5.3 merge 2014-01-28 10:58:18 +01:00
Sergei Golubchik
52340eee1a 5.2 merge 2014-01-28 10:27:52 +01:00
Sergei Golubchik
19b24f8f53 5.1 merge 2014-01-28 10:23:11 +01:00
Sergei Golubchik
16e0cae0cc fixed a client-side overflow in mysql cli 2014-01-28 10:21:47 +01:00
Alexander Barkov
f189ed5009 MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c
on server shutdown after SELECT with CONVERT_TZ

It's wrong to return my_empty_string from val_str().
Removing my_empty_string. Using make_empty_result() instead.
2014-01-28 12:25:29 +04:00
Sergey Vojtovich
e1e5ce0da2 MDEV-5345 - Deadlock between mysql_change_user(), SHOW VARIABLES and
INSTALL PLUGIN

There was mixed lock order between LOCK_plugin, LOCK_global_system_variables
and LOCK_system_variables_hash. This patch ensures that write-lock on
LOCK_system_variables_hash doesn't intersect with LOCK_plugin.

Fixed by moving initialization/deinitialization of plugin options from
plugin_add()/plugin_del() to plugin_initialize()/plugin_deinitalize().
So that plugin options are handled without protection of LOCK_plugin.
2014-01-28 11:12:43 +04:00
Alexander Barkov
94868914b8 merge 5.3 -> 5.5 2014-01-28 13:00:50 +04:00
Yoni Fogel
168e12c7e9 Refs Tokutek/ft-index#159 Calculate klpair size correctly when message application deletes a leafentry 2014-01-27 21:02:34 -08:00
Yoni Fogel
30bf78b3fc Refs Tokutek/ft-index#159 Calculate klpair size correctly when garbage collection deletes a leafentry 2014-01-27 20:58:43 -08:00
Yoni Fogel
8c3c9ca4f2 refs Tokutek/mongo#886 Fix get_last_key test.
Garbage collection was done on the clones and did not always make it to in-memory.
Also, closing a db and reopening no longer (necessarily) flushes the nodes out of memory; we close the entire environment when we want to ensure we read it.
2014-01-27 20:52:25 -08:00
Sergei Golubchik
4bf002d6a0 MDEV-5576 ALTER TABLE progress report > 100% 2014-01-27 20:50:32 +01:00
Sergei Golubchik
4a3ea30221 MDEV-4787 Missing dependency to "patch" for the Debian/Ubuntu "mariadb-test" package
add patch as a "suggested" dependency to mariadb-test-5.5
2014-01-27 16:58:26 +01:00
Sergei Golubchik
b4dd13b519 MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock
if two threads were calling mi_assign_to_key_cache() for the same table,
one could change share->key_cache while the other was having
share->key_cache->op_lock locked. The other thread would crash then,
trying to unlock share->key_cache->op_lock (because it would be a different mutex).

fixed by caching the value of share->key_cache in a local variable. The thread can still
call flush_key_blocks() for an unassigned keycache, but it's harmless.
2014-01-27 12:11:04 +01:00
Sergei Golubchik
ebaac51c2f mtr: check that tests clean up debug_sync. fix tests that didn't. 2014-01-27 12:10:53 +01:00
Alexander Barkov
7ea9d1e692 MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(...):
Assertion `mon > 0 && mon < 13' failed.'
2014-01-27 13:15:40 +04:00
Sergei Golubchik
879a05ce3f improve oqgraph boost check to filter out newer boost versions 2014-01-26 21:49:39 +01:00
Sergei Golubchik
8ece9de833 workaround test failures in buildbot:
in some VMs readline thinks that the window size is zero. ignore it.
2014-01-26 21:49:31 +01:00
Sergei Golubchik
90e2240869 MDEV-5461 Assertion `length <= column->length' fails in write_block_record with functions in select list, GROUP BY, ORDER BY
Old code in create_tmp_table(), that created an extra one-byte field (recinfo)
before every NULL-able grouping field (Field) in the tmp table, did not actually work.
Because the matching code in end_update(), that was supposed to update this byte,
was using a wrong offset, updating the first byte of the Field, not a byte before it.
Normally this wasn't an issue, because the Field value (written later in end_update)
was overwriting this byte anyway. But in this bug the Field was Field_null, with zero
length, so end_update() was overwriting the first byte of the following field.
And the following field was not-nullable constant, which was stored only once in
create_tmp_table and never updated later.

Fixed by removing the code that didn't do any useful work anyway.
2014-01-26 21:49:19 +01:00
Sergei Golubchik
3f2f9c36b1 move innodb specific test from group_by.test to group_by_innodb.test 2014-01-26 21:49:11 +01:00
Sergei Golubchik
0df3c2033b fix the test for MDEV-5029 to clean up after itself 2014-01-26 21:49:04 +01:00
Michael Widenius
680288873c Fix for MDEV-5168: MariaDB returns warnings for INSERT IGNORE
Added variable "OLD_MODE" that can be used to turn off the new behavior

mysql-test/r/insert.result:
  Added test case
mysql-test/r/mysqld--help.result:
  Added old_mode
mysql-test/suite/sys_vars/r/old_mode_basic.result:
  Added testing of new variable
mysql-test/suite/sys_vars/t/old_mode_basic.test:
  Added testing of new variable
mysql-test/t/insert.test:
  Added test case
sql/sql_class.h:
  Added bit flags for OLD_MODE
sql/sql_insert.cc:
  Disable duplicate key warnings for INSERT IGNORE of OLD_MODE NO_DUP_KEY_WARNINGS_WITH_IGNORE is used
sql/sql_show.cc:
  Don't show progress reporting on SHOW PROCESSLIST if OLD_MODE NO_PROGRESS_INFO is used
sql/sys_vars.cc:
  Added OLD_MODE
2014-01-26 21:48:42 +01:00
Michael Widenius
fb018850dc Fixed that setup_natural_join_row_types can safely be called twice
sql/item.h:
  Added cache for setup_natural_join_row_types
sql/sql_base.cc:
  Cache old value of first_name_resolution_table for next call.
  (It's not safe to try to recalculate the value as the join structure may have been changed by the optimizer)
2014-01-26 21:48:23 +01:00