Commit graph

174658 commits

Author SHA1 Message Date
Olivier Bertrand
0a96c9c4aa - Possibly fix MDEV-10179 Reset remote tables when re-opening
modified:   storage/connect/tabtbl.cpp

- Add trace and make m_Stmt conditional
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/myconn.h

- Protect trace from null string (for Linux)
  modified:   storage/connect/tabcol.cpp

- Record error changes
  modified:   storage/connect/mysql-test/connect/r/jdbc_new.result

- Typo
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jsonudf.cpp
2016-06-13 14:28:02 +02:00
Sergey Vojtovich
2db724c8d2 MDEV-10218 - rpl.rpl_binlog_errors fails in buildbot with valgrind warnings -
bytes are possibly lost

Timer thread of threadpool is created "joinable", but they're not "joined" on
completion. This causes memory leaks around thread local storage.

Fixed by joining timer thread.
2016-06-13 16:05:45 +04:00
Olivier Bertrand
74009534a1 - Possibly fix MDEV-10179 Reset remote tables when re-opening
modified:   storage/connect/tabtbl.cpp

- Add trace and make m_Stmt conditional
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/myconn.h

- Protect trace from null string (for Linux)
  modified:   storage/connect/tabcol.cpp

- Record error changes
  modified:   storage/connect/mysql-test/connect/r/jdbc_new.result

- Typo
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jsonudf.cpp
2016-06-13 12:58:24 +02:00
Nirbhay Choubey
868c2ceb01 MDEV-9083: Slave IO thread does not handle autoreconnect to restarting Galera Cluster node
Chery-picked commits from codership/mysql-wsrep.

MW-284: Slave I/O retry on ER_COM_UNKNOWN_ERROR

Slave would treat ER_COM_UNKNOWN_ERROR as fatal error and stop.
The fix here is to treat it as a network error and rely on the
built-in mechanism to retry.

MW-284: Add an MTR test
2016-06-12 19:28:56 -04:00
Dan Ungureanu
3c77a00d55 MDEV-8012: Wrong exit code when asking for help
`--help` is a perfectly valid parameter and both `mysqladmin` and
`mysql_waitpid` should exit with success (zero errror code).

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2016-06-12 22:47:18 +03:00
Vicențiu Ciorbaru
416006a3d8 MDEV-8012: Wrong exit code when asking for help
Make mysql_waitpid return exit code 0 when -V flag is supplied.
2016-06-12 22:46:53 +03:00
Elena Stepanova
67b4a6f576 MDEV-8859 rpl.rpl_mdev382 sporadically fails to finish due to disappeared expect file
The combination of --remove_file and --write_file on .expect file creates
a race condition which can be hit by MTR which reads the file in a loop.
Instead, .expect file should be changed with --append_file.
It was fixed in 10.x, but in 5.5 the sporadic failure still affected buildbot.
Fixed 3 test files which use the problematic combination
2016-06-12 20:14:51 +03:00
Mario Weigel
626a62e5cc MDEV-10214: Fix segfault when using groups in PAM user mapping plugin 2016-06-12 23:13:26 +12:00
Sergei Golubchik
ecdf46daed Merge branch '10.0-tokudb-merge' into 10.0 2016-06-11 22:56:48 +02:00
Sergei Golubchik
02043d7c53 MDEV-9128 Compiling on IBM System Z fails
restore the fix f31a89191f that was lost in a merge
2016-06-11 22:48:41 +02:00
Sergei Golubchik
22d7860d78 fix tokudb tests after the merge 2016-06-11 22:47:30 +02:00
Sergei Golubchik
dde558f262 Merge branch 'merge-tokudb-5.6' into 10.0-tokudb-merge 2016-06-11 01:06:09 +02:00
Nirbhay Choubey
b2ae32aafd MDEV-5535: Cannot reopen temporary table
Since a query can now refer to the same temporary table
multiple times, find_dup_table()/find_table_in_list()
have been updated to also consider this new possibility.
2016-06-10 18:39:44 -04:00
Nirbhay Choubey
e2087c6e8d MDEV-5535: Cannot reopen temporary table
Temporary table being created by outer statement
should not be visible to inner statement. And if
inner statement creates a table with same name.
The whole statement should fail with
ER_TABLE_EXISTS_ERROR.

Implemented by temporarily de-linking the TABLE_SHARE
being created by outer statement so that it remains
hidden to the inner statement.
2016-06-10 18:39:43 -04:00
Nirbhay Choubey
7305be2f7e MDEV-5535: Cannot reopen temporary table
mysqld maintains a list of TABLE objects for all temporary
tables created within a session in THD. Here each table is
represented by a TABLE object.

A query referencing a particular temporary table for more
than once, however, failed with ER_CANT_REOPEN_TABLE error
because a TABLE_SHARE was allocate together with the TABLE,
so temporary tables always had only one TABLE per TABLE_SHARE.

This patch lift this restriction by separating TABLE and
TABLE_SHARE objects and storing TABLE_SHAREs for temporary
tables in a list in THD, and TABLEs in a list within their
respective TABLE_SHAREs.
2016-06-10 18:39:43 -04:00
Nirbhay Choubey
547511153f MDEV-5535: Cannot reopen temporary table
Add generic temporary table related tests.
2016-06-10 18:00:23 -04:00
Nirbhay Choubey
78d4276788 Some trivial changes. 2016-06-10 18:00:23 -04:00
Sergei Golubchik
ca95cc603b Merge branch 'merge-tokudb-5.6' into 10.0-tokudb-merge
5.6.28-76.1
2016-06-10 20:48:59 +02:00
Sergey Vojtovich
87007dc2f7 MDEV-9994 - Aria service threads are not "joined"
Aria service threads are created "joinable", but they're not "joined" on
completion. This causes memory leaks around thread local storage.

Fixed by joining service thread. Simplified relevant code and cleaned up
relevant valgrind suppressions.
2016-06-10 22:07:49 +04:00
Sergei Golubchik
f853a99a4f 5.6.30-76.3 2016-06-10 19:47:58 +02:00
Sergey Vojtovich
7ecb304996 Code cleanups
- unused TABLE_SHARE::deleting and TABLE_LIST::deleting flags were removed
- kill_delayed_threads_for_table() and intern_close_table() are now private
  methods of table cache
- removed free_share flag of closefrm(): it was never used for temporary
  tables and was rarely useful for regular tables
2016-06-10 17:37:12 +04:00
Alexander Barkov
4155d0937b MDEV-8402 Bug #77473 Truncated data with subquery & UTF8 2016-06-10 17:06:38 +04:00
Alexander Barkov
df1448801c MDEV-10181 Illegal mix of collation for a field and an ASCII string as a view field 2016-06-10 15:50:19 +04:00
Sergei Golubchik
2dee76f435 MDEV-9518 Increase the range for INFORMATION_SCHEMA.MEMORY_USED column
make INFORMATION_SCHEMA.PROCESSLIST.MEMORY_USED bigint
2016-06-09 00:00:44 +02:00
Vladislav Vaintroub
7adf04e237 MDEV-9366 : do_shutdown_server fails to detect server shutdown on Windows.
Fix test whether process is alive in mysqltest.

Also fix SHUT_RD definition on Windows to be SD_RECEIVE.
SD_BOTH  was used instead prior to this patch, and this would
occasionally make mysql_shutdown()  fail - when the socket for the current connection
is not able send the COM_SHUTDOWN response anymore.
2016-06-08 17:13:49 +00:00
Sergei Golubchik
dc08c3b15a MDEV-10180 main.events_restart fails on valgrind builder: void THD::inc_thread_count(): Assertion `!abort_loop' failed.
remove an overly strong assert
2016-06-08 17:36:16 +02:00
Alexander Barkov
a4848e975d MDEV-9972 Least function retuns date in date time format 2016-06-08 19:04:12 +04:00
Kristian Nielsen
94b47bc5a5 Merge branch 'mdev9991' into mdev9991-10.1 2016-06-08 15:16:39 +02:00
Kristian Nielsen
732e269405 Merge branch 'mdev9991' into mdev9991-10.0 2016-06-08 15:16:24 +02:00
Kristian Nielsen
b31976f523 Merge branch 'mdev9991' into mdev9991-5.5 2016-06-08 15:15:55 +02:00
Kristian Nielsen
196d96cc8f Fix compiler check for stack unwind hint
The check inserts a DWARF directive to tell stack unwinding that the
bottom of the (co-routine) stack has been reached. Without this, stack
traces may attempt to continue past the bottom of the stack.

The GCC version check was incorrect, and failed to trigger for GCC
version 5.[0123].
2016-06-08 15:12:44 +02:00
Otto Kekäläinen
effbe7dd7b General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
Jan Lindström
0f252702b1 MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8
Use direct persistent index corruption set on InnoDB dictionary
for this test. Do not allow creating new indexes if one of the
existing indexes is already marked as corrupted.
2016-06-08 08:40:10 +03:00
Sergey Vojtovich
9de6708390 MDEV-9857 - CACHE_LINE_SIZE in innodb should be 128 on POWER
Replaced hard-coded cache line size.

Changes based on Daniel Black's work.
2016-06-07 13:02:31 +04:00
Alexey Kopytov
49ad084503 Few improvements related to CPU cache line size and padding:
Bug #79636: CACHE_LINE_SIZE should be 128 on AArch64
Bug #79637: Hard-coded cache line size
Bug #79638: Reconcile CACHE_LINE_SIZE with CPU_LEVEL1_DCACHE_LINESIZE
Bug #79652: Suspicious padding in srv_conc_t

- changed CPU_LEVEL1_DCACHE_LINESIZE to default to 128 bytes on POWER
  and AArch64 architectures in cases when no value could be detected
  by CMake using getconf

- changed CACHE_LINE_SIZE definition in ut0counter.h to be an alias of
  CPU_LEVEL1_DCACHE_LINESIZE

- changed a number of hard-coded 64-byte cache line size values in the
  InnoDB code

- fixed insufficient padding for srv_conc members in srv0conc.cc

Ported to Mariadb by Daniel Black <daniel.black@au.ibm.com>
Added s390 cache size of 256 at same time.
2016-06-07 13:02:31 +04:00
Sergei Golubchik
935033aea7 fix wsrep test crashes on startup 2016-06-05 11:24:10 +02:00
Sergei Golubchik
4a0612ed2a stop binlog background thread together with others
that fixes many rpl tests failures
2016-06-04 09:06:00 +02:00
Sergei Golubchik
562c1df7d9 cleanup: thread_count
move thread_count handling into THD:
* increment thread_count in THD constructor
* decrement thread_count in THD destructor
* never modify thread_count directly!
2016-06-04 09:06:00 +02:00
Sergei Golubchik
7425610c81 decrement thead_count *after* THD is destroyed
because thread_count means just that: number of THDs
and shutdown code looks at it to know when to free
shared data structures that THD uses.

This fixes random crashes in ~THD on shutdown
2016-06-04 09:06:00 +02:00
Sergei Golubchik
74aef87c5e fix the method name
it's always assert_<statement>,
not <do something>_if_<condition>
2016-06-04 09:06:00 +02:00
Sergei Golubchik
725ce0fe84 THD:: cleanup() must be where it used to
between net_end() and ha_close_connection()

this fixes lockups in main.locked_temporary-5955 and some
other innodb tests.
2016-06-04 09:06:00 +02:00
Sergei Golubchik
69da361ccd reset @@TIMESTAMP for COM_CHANGE_USER
this also fixes tokudb.type_year failure
(in ./mtr tokudb.type_timestamp tokudb.type_year)
2016-06-04 09:06:00 +02:00
Sergei Golubchik
4aacb20dce fix XID comparison
according to the standard, the gtrid/bqual pair must be
"globally unique", so XIDs are equal if their gtrids and
bquals are identical, formatID simply tells how
gtrid/bqual were generated. But if formatID == -1
(it means "null") gtrid/bqual don't have any value at all.

This fixes main.xa_sync failure in
./mtr main.quary_cache_debug main.xa_sync
2016-06-04 09:06:00 +02:00
Monty
89685d55d7 Reuse THD for new user connections
- To ensure that mallocs are marked for the correct THD, even if it's
  allocated in another thread, I added the thread_id to the THD constructor
- Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var
- Moved things from THD::THD() to THD::init()
- Moved some things to THD::cleanup()
- Added THD::free_connection() and THD::reset_for_reuse()
- Added THD to CONNECT::create_thd()
- Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed
  to ensure that we have a constant thread_id used for debugging with a THD,
  even if it changes thread_id (=connection_id)
- Set variables.pseudo_thread_id in constructor. Removed not needed sets.
2016-06-04 09:06:00 +02:00
Vladislav Vaintroub
9ff93656ae Fix sporadic failure of set_statement mtr test.
On Windows with low precision  (10-16 ms) timer used for timing queries,
the statement "set @@long_query_time=0.01" can log itself a slow if it
spawn more single timer tick.

The fix is to filter this query out  from "SELECT FROM mysql.slow_log"
results
2016-06-03 19:22:47 +00:00
Sergei Petrunia
1859caf60b MDEV-10175: range optimizer calls records_in_range() for full extended keys
Make the range optimizer not call records_in_range() when it would
not give any benefit.
2016-06-03 14:43:08 +03:00
Sergei Petrunia
825427fa9f Update test results 2016-06-03 10:58:32 +03:00
Olivier Bertrand
a9ac3506d2 git90.msg + git91.msg 2016-06-02 23:36:19 +02:00
Olivier Bertrand
613680a041 - Fix MDEV-10111 Reconize unsigned integers when creating tables via srcdef
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/myconn.cpp

- Fix MDEV-10136 crash on SELECT jsonget_string(NULL, 'a')
  modified:   storage/connect/jsonudf.cpp

- Assert longjmp initialized when suballocating
  modified:   storage/connect/plugutil.c

- Avoid crash in MakeRecord when table->vcol_set isnull (trace > 1)
  modified:   storage/connect/ha_connect.cc
2016-06-02 22:11:08 +02:00
Sergei Petrunia
904027c820 Merge branch 'bb-10.1-mdev8989' into 10.1 2016-06-02 19:27:22 +03:00