Commit graph

76782 commits

Author SHA1 Message Date
Sergei Golubchik
ce926c90ac 5.3 merge 2013-04-12 01:01:18 +02:00
Sergei Golubchik
ea4a417a8d 5.2 merge 2013-04-11 19:35:39 +02:00
Sergei Golubchik
61ed0ebe73 5.1 merge 2013-04-11 19:30:59 +02:00
Vladislav Vaintroub
5ae72bb73c MDEV-4356 : MariaDB does not start if bind-address gets resolved to more than single IP address.
MySQL bug http://bugs.mysql.com/bug.php?id=61713 was fixed in 5.5
  
Fix is to remove check for multiple entries returned by getaddrinfo(), and use the first entry that works  - i.e socket can be created.  

Unlike Oracle/MySQL's fix ,this one  is kept minimal : 
-  we do not prioritize IPv4 over IPv6,  orr other way around,  and just rely on operating system to sort getaddrinfo() entries in sensible order. There is RFC that defines  what is sensible order for getaddrinfo entries ( RFC 3484), and OS specific tweaks are also possible , like /etc/gai.conf o Linux.
-  also,  we do not force "0.0.0.0" address if bind-address is not given -  this would be a change in behavior of 5.5 at least on Windows, where passing NULL as  to getaddrinfo()  gives back IPv6-wildcard.
2013-04-07 20:32:39 +02:00
Sergei Golubchik
7b55b59b57 MDEV-4244 [PATCH] Buffer overruns and use-after-free errors
fixes for gcc 4.8 - compilation warnings and -fsanitize=address
2013-04-06 21:29:12 +02:00
Sergei Golubchik
5d9e50fc95 MDEV-4244 [PATCH] Buffer overruns and use-after-free errors
fixes for gcc 4.8 -fsanitize=address
2013-04-06 15:51:08 +02:00
Sergei Golubchik
6770a9a836 MDEV-4316 MariaDB server crash with signal 11
fulltext search was initialized for all MATCH ... AGAINST items
at the end of the JOIN::optimize(). But since 5.3 derived tables
are initialized lazily on first use, very late in the sub_select().

Skip Item_func_match::init_search initialization if the corresponding
table isn't open yet; repeat fulltext initialization for all
not-yet-initialized MATCH ... AGAINST items after creating derived tables.
2013-04-06 15:14:46 +02:00
unknown
385de8743a If a range tree has a branch that is an expensive constant,
currently get_mm_tree skipped the evaluation of this constant
and icorrectly proceeded. The correct behavior is to return a
NULL subtree, according to the IF branch being fixed - when it
evaluates the constant it returns a value, and doesn't continue
further.
2013-04-08 12:04:28 +03:00
Vladislav Vaintroub
ed949df15a MDEV-4338 - Support FusionIO/directFS atomic writes 2013-04-06 00:36:10 +02:00
Vladislav Vaintroub
0aa607a01a MDEV-4338 - Support FusionIO/directFS atomic writes 2013-04-06 00:35:45 +02:00
Sergei Golubchik
5d4ba5589d compilation warnings 2013-04-04 11:37:23 +02:00
Sergei Golubchik
730f67a43e fix have_debug_sync.inc to be more robust
(debug_sync value can have single quotes)
2013-04-04 11:37:13 +02:00
Sergei Golubchik
87a452f6d5 MDEV-4088 Replication 10.0 -> 5.5 fails
update 5.1 to replicate from 10.0 and
to show the server version (as of 10.0) correctly

sql-common/client.c:
  mdev:4088
sql/slave.cc:
  use the version number, not just the first character of the version string
  (we want 10 > 4 not "10" < "4").
2013-04-04 11:35:10 +02:00
Sergei Golubchik
33f3c93e6f MDEV-4161 Assertion `status_var.memory_used == 0' fails in virtual THD::~THD()
init join->top_join_tab_count to be in sync with join->join_tab=stat,
otherwise a query can be killed in-between and join_tab's won't be deleted
(JOIN::cleanup won't call JOIN_TAB::cleanup)
2013-04-04 11:05:04 +02:00
Sergey Petrunya
69559b9213 Update tests results, mysql-test/r/windows.result 2013-04-04 12:34:31 +04:00
Sergey Petrunya
763af1a8a3 MDEV-4240: mariadb 5.3.12 using more memory than MySQL 5.1 for an inefficient query
- Let index_merge allocate table handlers on quick select's MEM_ROOT,
  not on statement's MEM_ROOT. 
  This is crucial for big "range checked for each record" queries, where 
  index_merge can be created and deleted many times during query exection. 
  We should not make O(#rows) allocations on statement's MEM_ROOT.
2013-04-01 18:03:14 +04:00
Sergey Petrunya
3345e7564d MDEV-4335: Unexpected results when selecting on information_schema
- When converting a subquery to a semi-join, propagate OPTION_SCHEMA_TABLE.
2013-03-29 19:27:06 +04:00
Sergei Golubchik
2901497b18 MDEV-4243 Warnings/errors while compiling with clang 2013-03-28 20:04:14 +01:00
Sergey Petrunya
7868367270 Merge 5.3 -> 5.5 2013-04-03 18:51:29 +04:00
unknown
599a1384af Fix for MDEV-4144
Analysis:
The reason for the inefficent plan was that Item_subselect::is_expensive()
didn't detect the special case when a subquery was optimized, but had no
join plan because it either has no table, or its tables have been optimized
away, or the optimizer detected that the result set is empty.
  
Solution:
Identify the special cases above in the Item_subselect::is_expensive(),
and consider such degenerate subqueries inexpensive.
2013-03-29 17:53:21 +02:00
Vladislav Vaintroub
fa01b76be7 MDEV-4243 : remove several clang warnings. 2013-03-29 14:56:09 +01:00
Igor Babaev
e91e8c8c0b Merge 5.3->5.5. 2013-03-28 19:18:36 -07:00
Igor Babaev
a2c3d7d371 Merge 2013-03-27 22:22:52 -07:00
Igor Babaev
323fdd7ac6 Fixed bug mdev-4311 (bug #68749).
This bug was introduced by the patch for WL#3220.
If the memory allocated for the tree to store unique elements
to be counted is not big enough to include all of them then
an external file is used to store the elements.
The unique elements are guaranteed not to be nulls. So, when 
reading them from the file we don't have to care about the null
flags of the read values. However, we should remove the flag 
at the very beginning of the process. If we don't do it and
if the last value written into the record buffer for the field
whose distinct values needs to be counted happens to be null,
then all values read from the file  are considered to be nulls
and are not counted in.
The fix does not remove a possible null flag for the read values.
Rather it just counts the values in the same way it was done
before WL #3220.
2013-03-27 19:17:32 -07:00
Igor Babaev
d4de82d93e Merge. 2013-03-27 08:58:16 -07:00
Sergei Golubchik
6599fd3e9c 5.3 merge 2013-03-27 10:03:28 +01:00
Sergei Golubchik
102a7a2a76 MDEV-4307 Support at least 48 utf8 characters in username in server and PAM
Extend plugin auth api to support up to 512 bytes in the user names.
Use the API versioning to support old auth plugins too!
2013-03-26 19:17:26 +01:00
Sergei Golubchik
e308d7417b 5.2 merge 2013-03-26 19:09:47 +01:00
Alexey Botchkov
045c498691 GEOMETRYCOLLECTION EMPTY handling fixed.
The get_mbr() method shouldn't return the error, rather an invalid MBR
          in this case.
2013-03-26 21:47:06 +04:00
Sergei Golubchik
1d46ee77d1 fix @@external_user variable 2013-03-26 17:57:36 +01:00
Sergei Golubchik
48be80cd95 5.1 merge 2013-03-26 17:39:45 +01:00
unknown
51a7074864 MDEV-4292 fix.
Fixed printing column_get finction.
2013-03-26 13:07:46 +02:00
Sergei Golubchik
03d08bedf1 fixes for windows 2013-03-25 16:38:00 +01:00
Igor Babaev
21dad7ec30 Fixed bug mdev-4318.
In some cases, when using views the optimizer incorrectly determined
possible join orders for queries with nested outer and inner joins.
This could lead to invalid execution plans for such queries.
2013-03-22 21:33:06 -07:00
Alexey Botchkov
2b89b0a271 MDEV-4310 geometry function equals hangs forever.
The Geometry::get_mbr() function can return an error on
        a bad data. We have to check for that and act respectively.
2013-03-22 17:32:27 +04:00
Sergey Petrunya
4d49175fde Merge 2013-03-21 11:07:38 +04:00
Sergey Petrunya
fb2501e2d4 MDEV-4277: Crash inside mi_killed_in_mariadb() with myisammrg
- Set MI_INFO::external_ref for MyISAM tables that are parts of myisamMRG table.
2013-03-21 11:06:27 +04:00
Sergei Golubchik
e70ce465b7 add 'plugins' suite - empty, but the line
./mtr --suite=main,plugins
will work on all branches.
2013-03-20 21:20:51 +01:00
Sergei Golubchik
01fd55ccae MDEV-249 QUERY CACHE INFORMATION 2013-03-20 20:56:14 +01:00
Sergei Golubchik
1be4295617 MDEV-4293 Valgrind warnings (Conditional jump or move depends on uninitialised value) in remove_eq_conds on time functions with NULL argument
val_int() is expected to return 0 for NULL's
2013-03-20 16:13:00 +01:00
Sergei Golubchik
e73f13a707 extend check_global_access() to avoid my_error when it's not needed
(in INFORMATION_SCHEMA).
2013-03-19 15:25:58 +01:00
Vladislav Vaintroub
db65e4f537 Fixes for Windows XP 2013-03-26 10:34:21 +01:00
Vladislav Vaintroub
bfac7d637f MDEV-4330 - get_tty_password() does not work if input redirection is used.
The reason is the limitation of ReadConsole() API, it returns error if handle to redirected  input  is used.
  
 The fix is to use a  handle returned by CreateFile("CONIN$",...), rather than GetStdHandle(STD_HANDLE_INPUT) to get the true console handle.
2013-03-26 08:17:22 +01:00
Michael Widenius
c579bce349 Patch by Ian Good for MDEV-4319: mysqlbinlog output ambiguous escaping
The output of mysqlbinlog (with "-v --base64-output=DECODE-ROWS" flags) can not always be read or parsed correctly
when string columns contain single-quotes or backslash characters.

The fix for this bug is to escape single-quote and backslash characters on output, so that the result is both more
readable and more easily parse-able.

Note that this is just for comments, so it doesn't affect the replication.

sql/log_event.cc:
  Escape \ and ' properly for mysqlbin user comments.
2013-03-25 16:45:24 +02:00
Alexey Botchkov
ef737284b4 MDEV-4295 Server crashes in get_point on a query with Area, AsBinary, MultiPoint.
Need to check if the number of points is 0 for the polygon.
2013-03-19 17:25:58 +04:00
Alexey Botchkov
15a7335d77 MDEV-4296 Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy.
Forgotten DBUG_ASSERT should be replaced with the 'return error'.
2013-03-19 17:16:10 +04:00
unknown
2cd7cf8fe6 MDEV-4269 fix.
Item_default_value inherited form Item_field so should create temporary table field similary.
2013-03-18 15:07:52 +02:00
Alexey Botchkov
589247ae86 MDEV-4252 geometry query crashes server.
Additional fixes for possible overflows in length-related
    calculations in 'spatial' implementations.
    Checks added to the ::get_data_size() methods.
    max_n_points decreased to occupy less 2G size. An
    object of that size is practically inoperable anyway.
2013-03-18 17:58:00 +04:00
Sergei Golubchik
a4a18e0cbb MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY
Item_func_make_set wasn't taking into account the first argument when
calculating maybe_null.

sql/item_strfunc.cc:
  rewrite Item_func_make_set, removing separate storage of the first argument
sql/item_strfunc.h:
  rewrite Item_func_make_set, removing separate storage of the first argument
2013-03-18 10:35:03 +01:00
Sergei Golubchik
8f607aae12 MDEV-4283 Assertion `scale <= precision' fails in strings/decimal.c
with decimals=NOT_FIXED_DEC it is possible to have 'decimals' larger
than 'max_length', it's not an error for temporal functions.
  
But when Item_func_numhybrid converts the value to DECIMAL_RESULT,
it must limit 'decimals' to be a valid scale of a decimal number.
2013-03-18 08:44:24 +01:00