Commit graph

76481 commits

Author SHA1 Message Date
Michael Widenius
b917fdb9f1 Added test case for bug in replace with replication that existed in MySQL 5.1:
Replace with an auto_increment primary key and another unique key didn't replicate correctly with REPLACE
2013-02-28 16:47:03 +02:00
Michael Widenius
2d78ef1d3b Added support for --crash-script in mysqld_safe.
Trivial cleanup

scripts/mysqld_safe.sh:
  Added support for --crash-script.
  Don't remove socket file (not needed as server will re-create it if needed)
  Patch by Eric Bergen
storage/maria/ha_maria.h:
  Removed not existing variable.
2013-02-28 08:42:05 +02:00
Vladislav Vaintroub
2c97d5a305 Compilation : fix oqgraph's system check, in case where boost header aren't in standard include directory. 2013-02-24 20:05:26 +01:00
Vladislav Vaintroub
142c0a0424 MDEV-4190 : Fix system checks for OpenBSD 2013-02-21 22:59:54 +01:00
Vladislav Vaintroub
c6d31b279b MDEV-4021 : Enable Ctrl-C handler when reading password, on Windows.
Prior to this patch, _getch() was used to read password input from console. getch() has a property that it reads Ctrl-C as character with ASCII code 0x03, and disregards Ctrl-C handler for  current process. 
The fix is to use ReadConsole() API instead of getch() , after setting console mode to ENABLE_PROCESSED_INPUT - this mode allows current process to handle Ctrl-C events.
2013-02-21 21:46:24 +01:00
Vladislav Vaintroub
e03e9aab73 MDEV-4181 : ensure mysql client's beep works on all Windows systems.
Use MessageBeep, which employs sound card, rather than system speaker.
The secondary benefit is that one can use volume control for this sound
(see MySQL's Bug #17088)
2013-02-20 14:52:43 +01:00
Alexey Botchkov
ca29490102 MDEV-3819 missing constraints for spatial column types.
Checks added to return and error when inappropriate
    geometry type is stored in a field.
2013-02-21 01:03:45 +04:00
Vladislav Vaintroub
2c37ace131 MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants than just FreeBSD
or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
2013-02-19 23:46:52 +01:00
Vladislav Vaintroub
4e9b5ff543 fix typo 2013-02-18 20:51:36 +01:00
Vladislav Vaintroub
0995ab2e1a MDEV-4183: Export additional symbols from RPMs , compatibly to distribution RPMs.
-Ensure that symbols listed in CLIENT_API_EXTRA are not thrown away by the linker.
-Add THR_KEY_mysys to this list, because Fedora18 exports it.
2013-02-18 20:35:11 +01:00
Sergei Golubchik
99bc6b923e MDEV-4156 Test cases query_cache and query_cache_size_basic fail on 32 bit ppc and s390 2013-02-08 22:24:06 +01:00
Sergei Golubchik
f93b5a6027 make rpm packages to respect CMAKE_INSTALL_PREFIX 2013-02-08 12:59:54 +01:00
Vladislav Vaintroub
bfd179e8ed MDEV-4127 : Export additional symbols when building RPM,
to enable both recompiling mysqli or odbc from sources in addition to drop-in replacement functionality.

The case in question is compiling mysqli from sources, that needs client_errors via ER() macro.

Previously, we exported it as mysql_client_errors (compatibly to Fedora's style symbol renaming, see MDEV-3842).
However, if MariaDB header files are used when compiling mysqli, client_errors needs to be exported with its original name.
2013-02-04 15:43:26 +01:00
Elena Stepanova
7f444caa0a MDEV-4028 - Converted rdiff files to uniform
MDEV-11 - Modifed tests and result files to use explicit column lists
          in INSERT and SELECT statements
2013-02-03 02:53:57 +04:00
Vladislav Vaintroub
1701ee3357 MDEV-4113: Assertion (group->connection_count > 0) fails with Percona server in replication test.
Assertion happens in replication thread during THD destruction, when thread calls my_sync(), which in turn calls  thd_wait_begin() callback. Connection count can be 0, because the counter was decremented before THD destructor. 
This assertion currently reproducible only in Percona server  and not in MariaDB, due to differences in replication code.

Fixed by moving  code to decrement connection counter after the THD destructor.
2013-01-30 17:25:02 +01:00
Sergei Golubchik
52fbe44fbb more changes for fedora18 2013-01-29 12:27:31 +01:00
Sergei Golubchik
78e47eb004 fix 'compat' rpm for fedora18 2013-01-29 10:46:05 +01:00
Vladislav Vaintroub
52747434e5 fix embedded build with for cmake 2.6.2 (older cmake could not handle IF(NOT MATCHES) 2013-01-28 17:24:50 +01:00
unknown
f65e5841d7 Fix for MDEV-3948, and backport of the following collection of fixes and backports
from MariaDB 10.0.
  
The bug in mdev-3948 was an instance of the problem fixed by Sergey's patch
in 10.0 - namely that the range optimizer could change table->[read | write]_set,
and not restore it.
  
revno: 3471
committer: Sergey Petrunya <psergey@askmonty.org>
branch nick: 10.0-serg-fix-imerge
timestamp: Sat 2012-11-03 12:24:36 +0400
message:
  # MDEV-3817: Wrong result with index_merge+index_merge_intersection, InnoDB table, join, AND and OR conditions
  Reconcile the fixes from:
  #
  # guilhem.bichot@oracle.com-20110805143029-ywrzuz15uzgontr0
  # Fix for BUG#12698916 - "JOIN QUERY GIVES WRONG RESULT AT 2ND EXEC. OR
  # AFTER FLUSH TABLES [-INT VS NULL]"
  #
  # guilhem.bichot@oracle.com-20111209150650-tzx3ldzxe1yfwji6
  # Fix for BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET == SAVE_READ_SET
  # and
  #
  and related fixes from: BUG#1006164, MDEV-376:
  
  Now, ROR-merged QUICK_RANGE_SELECT objects make no assumptions about the values
  of table->read_set and table->write_set.
  Each QUICK_ROR_SELECT has (and had before) its own column bitmap, but now, all 
  QUICK_ROR_SELECT's functions that care: reset(), init_ror_merged_scan(), and 
  get_next()  will set table->read_set when invoked and restore it back to what 
  it was before the call before they return.

  This allows to avoid the mess when somebody else modifies table->read_set for 
  some reason.
2013-01-28 15:13:39 +02:00
Sergei Golubchik
87de27e46b 5.3 merge 2013-01-28 13:36:05 +01:00
unknown
f08a404a6d MDEV-4091: Dynamic columns C functions should be included in libmysqlclient 2013-01-28 13:49:14 +02:00
Sergei Golubchik
34e84c227f 5.2 merge 2013-01-28 09:12:23 +01:00
Sergei Golubchik
5138bf4238 compilation error with -Wuninitialized -Werror 2013-01-28 09:10:01 +01:00
Sergei Golubchik
0791692bdc MDEV-3875 Wrong result (missing row) on a DISTINCT query with the same subquery in the SELECT list and GROUP BY
fix remove_dup_with_hash_index() and remove_dup_with_compare() to take NULLs into account
2013-01-26 22:33:18 +01:00
Vladislav Vaintroub
1c654f1602 Merge MDEV-3842, MDEV-3923, MDEV-3971 2013-01-26 22:23:27 +01:00
Michael Widenius
772bd60a1b Automatic merge 2013-01-26 01:59:27 +02:00
Vladislav Vaintroub
8199838a49 fix embedded 2013-01-25 23:34:46 +01:00
Michael Widenius
ea1d5943c5 Fixed MDEV-3890: Server crash inserting record on a temporary table after truncating it
The problem was that a temporary table was re-created as a non-temporary table.


mysql-test/suite/maria/truncate.result:
  Added test cases
mysql-test/suite/maria/truncate.test:
  Added test cases
sql/sql_truncate.cc:
  Mark that table to be created is a temporary table
storage/maria/ha_maria.cc:
  Ensure that temporary tables are not transactional.
2013-01-25 21:40:42 +02:00
Vladislav Vaintroub
db26ab8a3f Fix embedded build 2013-01-25 18:59:30 +01:00
Vladislav Vaintroub
76400fcc25 MDEV-3842, MDEV-3923 :
Miscellaneous workarounds for  drop-in compatibility problems with Linux distributions, arounf versioning of the 
MySQL 5.5 client shared library. There seems to be 3 different ways major distributions handle versioning

1. Fedora  (also Mageia, and likely  other Redhat descendants) way 
   old, 5.1 API functions are given version libmysqlclient_16
   new API functions  (client plugins, mysql_stmt_next ) are given version libmysqlclient_18
   some extra functions beyond API are exported.
   some functions are renamed.

2.Debian Wheezy way 
  all functions are given libmysqlclient_18 version

3. Ubuntu  way (or MySQL/MariaDB download packages)
  no versioning

UIp to this fix, MariaDB distributions did not have any versioning in the libraries, this rendered client library incompatible to distributions 
thus exchanging  distribution's libmysqlclient.so.18.0.0  with MariaDB's did not work nicely (anywhere but on Ubuntu)


THE FIX  
is to build libraries the same way as distributions do it 
- when building RPMs, use  same version script as Fedora does, Make sure to export extra-symbols, the same as Fedora exports.
- when building DEBs, use the same version script as Debian Wheezy
- do not use version scripts otherwise


Also, makes sure that extensions of  MySQL APIs (asynchronous client functionality) is exported by  the shared libraries.
2013-01-25 17:26:10 +01:00
Sergei Golubchik
e400450f2d 5.1 merge 2013-01-25 17:22:21 +01:00
Vladislav Vaintroub
8864940583 MDEV-3971 : problems installing MariaDB packages (conflicts with mysql-libs-5.5)
FIx  : make "shared" RPM obsolete/provide mysql-libs
2013-01-25 16:50:14 +01:00
unknown
298008dc4f The problem was that expression with field after transformation (on the first execution)
reached by fix_fields() (via reference) before row which it belongs to (on the second execution)
and fix_field for row did not follow usual protocol for Items with argument
(first check that the item fixed then call fix_fields).

Item_row::fix_field fixed.
2013-01-25 16:56:57 +02:00
Sergei Golubchik
7f208d3c35 MDEV-729 lp:998028 - Server crashes on normal shutdown in closefrm after executing a query from MyISAM table
don't write a key value into the record buffer - a key length can be larger then the record length.
2013-01-25 14:29:46 +01:00
Sergei Golubchik
326d2d56fe MDEV-759 lp:998340 - Valgrind complains on simple selects containing expression DAY(FROM_UNIXTIME(-1))
check item->null_value before using the result of item->val_int()
2013-01-25 12:26:35 +01:00
Sergei Golubchik
672b293860 5.3 merge
client/mysqltest.cc:
  make --error to work for --change_user errors
2013-01-25 11:24:42 +01:00
Sergei Golubchik
de10e21411 5.2 merge 2013-01-25 10:20:45 +01:00
Sergei Golubchik
9142c50b07 MDEV-4040 Replace deprecated SET OPTION syntax in mysqldump
mysqldump.c: s/SET OPTION/SET/
(OPTION was, hm, optional since 3.21, so there's no need to use SET OPTION even
in the old compatibility modes)
2013-01-25 10:19:35 +01:00
Sergei Golubchik
fa7d0c4fdf MDEV-3909 remote user enumeration
instead of returning Access denied on the incorrect user name,
emulate the complete failed logic procedure, possibly with
the change plugin packet.
2013-01-25 09:41:26 +01:00
Sergei Golubchik
82c022f2d5 report "using password: YES/NO" correctly for the COM_CHANGE_USER failures 2013-01-25 00:20:53 +01:00
Sergei Golubchik
bfc71e63a7 MDEV-3915 COM_CHANGE_USER allows fast password brute-forcing
allow only three failed change_user per connection.
successful change_user do NOT reset the counter

tests/mysql_client_test.c:
  make --error to work for --change_user errors
2013-01-25 00:17:39 +01:00
Igor Babaev
32151409c1 Merge 5.3->5.5 2013-01-23 15:18:05 -08:00
Sergei Golubchik
f1e758dc6f remove one particularly stupid test 2013-01-23 14:58:05 +01:00
Igor Babaev
746152959a Merge 5.2->5.3 2013-01-21 21:29:19 -08:00
Igor Babaev
8127e631de Merge 5.1->5.2 2013-01-21 15:23:40 -08:00
Igor Babaev
82fe8a4e71 Merge. 2013-01-21 13:48:34 -08:00
Igor Babaev
fade3647ec Fixed bug mdev-4063 (bug #56927).
This bug could result in returning 0 for the expressions of the form 
<aggregate_function>(distinct field) when the system variable  
max_heap_table_size was set to a small enough number.
It happened because the method Unique::walk() did not support
the case when more than one pass was needed to merge the trees
of distinct values saved in an external file.

Backported a fix in grant_lowercase.test from mariadb 5.5.
2013-01-21 11:47:45 -08:00
Sergei Golubchik
7925bf6b40 MDEV-4069 thd_wait_end does not called in some cases in buf_page_read_low in XtraDB engine 2013-01-21 12:20:54 +01:00
unknown
82e39cb1e1 Fixed typo in the function name.
test suite added.
2013-01-22 13:29:59 +02:00
unknown
193c6f548b MDEV-3873: fixed functions absend in 5.3. 2013-01-21 14:34:39 +02:00