Commit graph

74832 commits

Author SHA1 Message Date
Alexey Botchkov
5c01f1ac14 MDEV-15 Log all sql errors.
modified for MySQL 5.5. Logger service moved to the
        plugin/sql_errlog directory to be properly used later.

plugin/sql_errlog/sql_errlog.c:
  Fixes for bugs #956427 (SQL_ERROR_LOG plugin produces bogus warnings about sql-error-log-size-limit value) and #956463 (Server crashes if SQL_ERROR_LOG fails to initialize) they're also MDEV-184 and MDEV-183
    
  The sql_error_log_deinit() should be prepared for the logger_file to be NULL.
  The logger_file_size_limit upper limit wasn't properly set.
2012-03-24 11:24:20 +01:00
Sergei Golubchik
619f67b1b4 mdev-200 set session dbug resets the output to stderr.
it makes "./mtr --debug" unusable

revert the mysql fix for bug#46165.
implement shared FILE's with reference counting
2012-03-23 20:49:47 +01:00
Sergei Golubchik
92e2b80c76 MDEV-186 Client programs throw warnings about memory loss when executed with --help or alike
suppress these harmless but confusing warnings.
fix the program name (MY_INIT) in mysqldump

client/mysqldump.c:
  for backward compatibility, prefix mysqldump error messages with "mysqldump", not with the full path of the executable
2012-03-23 10:53:25 +01:00
Vladislav Vaintroub
02d982a90b Fix Windows build 2012-03-22 20:21:14 +01:00
Vladislav Vaintroub
526de8478a precache results of system tests on Windows 2012-03-22 15:44:06 +01:00
Vladislav Vaintroub
9f54ae519e Fix CMake code to work with older cmake version, such as 2.6.2 2012-03-22 15:37:52 +01:00
unknown
b34cfe9327 Null merge from 5.3. 2012-03-22 13:26:40 +01:00
unknown
8e0afbd8af Backport some simple performance patches from 5.5. 2012-03-22 13:21:15 +01:00
unknown
c895e235f3 Do not use Valgrind client requests in a normal release build, they have a small but noticable performance impact. 2012-03-22 12:31:09 +01:00
Davi Arnaut
9584cbe7fc Make Replication filter settings dynamic.
Make the slave options --replicate-* dynamic variables so that these
options can be changed dynamically while the server is running,
which enables users to modify replication filtering rules without
having to stop and restart the server.

This is accomplished by just requiring that the slave threads are
stopped when these options are set dynamically. Since filtering
rules are only used by the SQL slave thread, setting them while the
thread is not running avoids the need for locking.
2012-03-19 15:00:23 -07:00
Vladislav Vaintroub
7789f3d567 merge 2012-03-21 15:51:13 +01:00
Vladislav Vaintroub
545d740ce6 Fix race condition in rpl_stop_start_slave. after kill connection, wait until it is gone in processlist 2012-03-21 15:41:20 +01:00
unknown
07de9ab7fc Few simple performance fixes found with sysbench oltp.lua and Oprofile:
- Avoid needless load/stores in my_hash_sort_simple due to possible aliasing
 - Avoid expensive Join_plan_state constructor in choose_subquery_plan when no subquery
 - Avoid calling update_virtual_fields for every row when no virtual fields.
2012-03-21 09:55:48 +01:00
Sergei Golubchik
9a04194428 2012-03-20 16:14:04 +01:00
Michael Widenius
690d8cc6ba Fixed lp:947474 "Assertion `table->file->stats.records > 0 || error' failed in join_read_const_table on concurrent SELECT and ALTER, constant Aria table"
Remove Aria state history for drop/rename

mysql-test/suite/maria/r/maria-recovery2.result:
  Updated old (wrong) test result
sql/handler.cc:
  Fixed wrong argument to implict_commit
storage/maria/ha_maria.cc:
  Ensure that we don't use file->trn if THD_TRN is 0. (This means that implict_commit() has been called and the trn object is not ours anymore)
storage/maria/ma_extra.c:
  Remove Aria state history for drop/rename
storage/maria/ma_rename.c:
  Remove Aria state history for rename
storage/maria/ma_state.c:
  More DBUG_PRINT
2012-03-20 16:04:50 +02:00
Michael Widenius
a579adea66 Cleanups:
- Don't use SAFEMALLOC on valgrind builds (slows things down)
- Added back lost option from 5.3: debug-mutex-deadlock-detector
- Flush pages before taking lock mutex (speeds up closing of Aria tables).

BUILD/SETUP.sh:
  - Don't use SAFEMALLOC on valgrind builds (slows things down)
sql/lock.cc:
  Make default argument explicit (improves readability)
sql/mysqld.cc:
  Removed compiler warnings
  Sorted debug options alphabetically
  Added back lost option from 5.3: debug-mutex-deadlock-detector
storage/maria/ma_close.c:
  Flush pages before taking lock mutex (speeds up closing of Aria tables).
storage/maria/ma_open.c:
  More DBUG_PRINT
storage/maria/maria_def.h:
  Better DBUG_PRINT
storage/maria/trnman.c:
  Better DBUG_PRINT
2012-03-20 15:23:56 +02:00
Igor Babaev
51c77ec5d4 Merge 2012-03-17 12:16:57 -07:00
Igor Babaev
5d954e7cd0 Merge 5.3->5.5 2012-03-17 01:26:58 -07:00
Vladislav Vaintroub
49d6568aae Reduce size of windows MSI by approx. 50%
- Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI
- Only include debug symbols for client and embedded libs and also
  mysqld.exe and server plugins (so we can still can get a callstack in case of crash)

The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.
2012-03-16 20:52:17 +01:00
Vladislav Vaintroub
c5e1fb6720 Fix several buildot errors on Windows
- do not attempt loading federatedx dynamically - does not work on Windows embedded
- race condition in rpl_start_stop_slave
- fix exclusion rule to catch warning in partition test
2012-03-16 17:47:31 +01:00
Sergei Golubchik
93cac96aa4 more MY_INIT(argv[0]) in unittests 2012-03-15 10:12:32 +01:00
Vladislav Vaintroub
d110e0377d Fix compile error - linker does not find extern variables, in sql_logger.c
The file uses external variables defined in another (C++) source file. Since MSVC mangles variables and not only functions, either variables in question should be extern "C", or  sql_logger should be made C++ for link to succeed.

Fixed by renaming sql_logger.c to sql_logger.cc
2012-03-15 00:37:37 +01:00
Sergei Golubchik
69cb13602d another fix for --innodb-trx* name conflict 2012-03-14 19:47:15 +01:00
Sergei Golubchik
c3c14a069b another fix for --innodb-trx* name conflict 2012-03-14 19:47:15 +01:00
Alexey Botchkov
e3e2b4e1d1 MDEV-15 Log SQL errors.
mysys/my_logger.c was moved to sql/sql_logger.c
        Logger service was rewritten with file functions instead of stream, so it
        can handle huge files.
2012-03-14 16:37:49 +04:00
unknown
5338a28912 Merge 5.2->5.3 2012-03-14 13:58:18 +02:00
unknown
e638e60589 test suite for LP bug#694450 2012-03-14 12:09:03 +02:00
Alexey Botchkov
620d62ac3e plugin.result fixed. 2012-03-14 09:40:54 +04:00
Alexey Botchkov
07a82c58a7 MDEV-15 Log all SQL errors.
Added the logger service that provides us with the rotating logs.
              The plugin SQL_ERROR_LOG added. It logs the errors using the 'logger service'
                      for the rotating log files.
              the example record from the log:
                2012-03-09 15:07:29 root[root] @ localhost [] ERROR 1146: Table 'test.xyz' doesn't exist : select * from test.xyz
2012-03-14 00:55:56 +04:00
Igor Babaev
0f3b8ef28e Merge. 2012-03-13 13:49:18 -07:00
Igor Babaev
c1f5e25c04 Fixed LP bug #953649.
Do not call, directly or indirectly, SQL_SELECT::test_quick_select()
for derived materialized tables / views when optimizing joins referring
to these tables / views to get cost estimates of materialization.
The current code does not create B-tree indexes for materialized 
derived tables / views. So now it's not possible to get any estimates
for ranges conditions over the results of the materialization.

The function mysql_derived_create() must take into account the fact
that array of the KEY structures specifying the keys over a derived
table / view may be moved after the optimization phase if the
derived table / view  is materialized.
2012-03-13 13:34:20 -07:00
Michael Widenius
6f06cef02b Fixed bug lp:917689 "Archive table corruption crashing MariaDB signal 11"
Added 'from_end' as extra parameter to Field::unpack() to detect wrong from data.
Change ha_archive::unpack_row() to detect wrong field lengths.
Replication code changed to detect wrong field information in events.


mysql-test/r/archive.result:
  dded test case for lp:917689
sql/field.cc:
  Added 'from_end' as extra parameter to Field::unpack() to detect wrong from data.
  Removed not used 'unpack_key' functions.
sql/field.h:
  Added 'from_end' as extra parameter to Field::unpack() to detect wrong from data.
  Removed not used 'unpack_key' functions.
  Removed some not needed unpack() functions.
sql/filesort.cc:
  Added buffer end parameter to unpack_addon_fields()
sql/log_event.h:
  Added end of buffer argument to unpack_row()
sql/log_event_old.cc:
  Added end of buffer argument to unpack_row()
sql/log_event_old.h:
  Added end of buffer argument to unpack_row()
sql/records.cc:
  Added buffer end parameter to unpack_addon_fields()
sql/rpl_record.cc:
  Added end of buffer argument to unpack_row()
  Added detection of wrong field information in events
sql/rpl_record.h:
  Added end of buffer argument to unpack_row()
sql/rpl_record_old.cc:
  Added end of buffer argument to unpack_row()
  Added detection of wrong field information in events
sql/rpl_record_old.h:
  Added end of buffer argument to unpack_row()
sql/table.h:
  Added buffer end parameter to unpack()
storage/archive/ha_archive.cc:
  Change ha_archive::unpack_row() to detect wrong field lengths.
  This fixes lp:917689
2012-03-13 16:38:43 +02:00
Sergei Golubchik
92f31d8070 mdev-176 feedback plugin is linked dynamically in bintar 2012-03-13 14:43:34 +01:00
Sergei Golubchik
00f2e3139f alternative method of resolving addresses for safemalloc and crash handler.
don't link with libbfd, exec addr2line, if it's available at run time
2012-03-13 13:34:24 +01:00
Sergei Golubchik
1cbc3790d3 fix SphinxSE version as reported in I_S.PLUGINS 2012-03-13 13:31:21 +01:00
Sergei Golubchik
262a2ab59d monty's cleanup of my_thr_init.c
and collateral changes
2012-03-13 13:29:44 +01:00
Sergei Golubchik
d32b537edf broad suppression for dlsym "memory leak" - same as for dlclose 2012-03-13 13:28:08 +01:00
Sergei Golubchik
3f17890892 disable EXTRA_DEBUG in non-dbug builds 2012-03-13 13:27:14 +01:00
Sergey Petrunya
223483aedf Merge 2012-03-12 18:21:14 +04:00
Sergey Petrunya
4ac230e557 Better comments 2012-03-12 18:20:30 +04:00
Sergey Petrunya
50ff30d892 Merge 2012-03-12 18:08:40 +04:00
Sergey Petrunya
d028d986a9 BUG#952297: Server crashes on 2nd execution of PS in Field::is_null with semijoin+materialization
- The bug would show up 
   - when using PS (so that we get re-execution)
   - the left_expr of the subquery is a reference to viewname.column_name, so that it crashes
      when one tries to use it without having called fix_fields for it.
   - when using SJ-Materialization, which makes use of sj_subq_pred->left_expr expression

- The fix is to have setup_conds() fix sj_subq_pred->left_expr for semi-join nests it finds.
2012-03-12 17:41:22 +04:00
Vladislav Vaintroub
32d45425e9 merge 2012-03-12 12:15:55 +01:00
Vladislav Vaintroub
3886fdf009 LP952607: Do not show MySQL services preinstalled by Dell in the upgrade wizard 2012-03-12 12:14:04 +01:00
Vladislav Vaintroub
8245178f5d LP953714: Fix formatting of the crash messages in signal/exception handler 2012-03-12 11:31:40 +01:00
unknown
ecbd868f58 Merged the implementation of MDEV-28 LIMIT ROWS EXAMINED into MariaDB 5.5. 2012-03-12 00:45:18 +02:00
unknown
8aebd44e0e Implementation of MDEV-28 LIMIT ROWS EXAMINED
https://mariadb.atlassian.net/browse/MDEV-28
  
This task implements a new clause LIMIT ROWS EXAMINED <num>
as an extention to the ANSI LIMIT clause. This extension
allows to limit the number of rows and/or keys a query
would access (read and/or write) during query execution.
2012-03-11 14:39:20 +02:00
Igor Babaev
8c08349882 Fixed LP bug #930814.
This bug was introduced into mariadb 5.2 in the December 2010 with
the patch that added a new engine property: the ability to support
virtual columns.    
As a result of this bug the information from frm files for tables 
that contained virtual columns did not appear in the information schema
tables.
2012-03-09 15:37:16 -08:00
Michael Widenius
028523e94d Added test case for lp:905782 "Assertion `pageno < ((1ULL) << 40)' failed at ma_pagecache.c:3438: pagecache_read or table corruption on INSERT into a ucs2 table"
The orignal bug has been fixed earlier
2012-03-09 14:28:02 +02:00
unknown
ea736c9375 Added ucs2 test moved from maria3.test. (MDEV-167) 2012-03-09 14:06:17 +02:00