Commit graph

61731 commits

Author SHA1 Message Date
Jonathan Perkin
6ed71b7d1e Pull in time.h for localtime_r. 2010-05-25 14:37:35 +01:00
Mattias Jonsson
39d9765297 post push fix 2010-05-25 11:34:36 +02:00
Mattias Jonsson
2b846b39c1 merge 2010-05-25 08:35:48 +02:00
Mattias Jonsson
b0ecceb95b merge 2010-05-24 23:21:08 +02:00
Mattias Jonsson
d7e7afd403 Merge of bug#51851.
Also moved HA_DATA_PARTITION from ha_partition.cc to table.h.
2010-05-24 14:51:59 +02:00
Jon Olav Hauglid
ac9bae9e04 merge from mysql-trunk-runtime 2010-05-21 15:49:15 +02:00
Alexander Nozdrin
dfec05be05 Backporting a test case for Bug#30036 (SHOW TABLE TYPES causes the debug client
to crash) from mysql-6.0-codebase.
2010-05-21 17:36:59 +04:00
Alexander Nozdrin
75e552d509 Fix for Bug#52923 (Inadequate documentation of "Can't get hostname for your address" error).
The thing is that on some platforms (e.g. Mac OS X) sockaddr_in / sockaddr_in6
contain a non-standard field (sin_len / sin6_len), that must be set.

The problem was that only standard fields were set, thus getnameinfo() returned
EAI_SYSTEM instead of EAI_NONAME.

The fix is to introduce configure-time checks (for GNU auto-tools and CMake) for
those additional fields and to set them if they are available.
2010-05-21 17:17:01 +04:00
Dmitry Lenev
6ceacd4fb9 Follow-up for the fix for bug #46947 "Embedded SELECT without
FOR UPDATE is causing a lock".
 
This patch tries to address problems which were exposed 
during backporting of original patch to 5.1 tree.
 
- It ensures that we don't change locking behavior of simple
  SELECT statements on InnoDB tables when they are executed
  under LOCK TABLES ... READ and with @@innodb_table_locks=0.
  Also we no longer pass TL_READ_DEFAULT/TL_WRITE_DEFAULT 
  lock types, which are supposed to be parser-only, to 
  handler::start_stmt() method.
- It makes check_/no_concurrent_insert.inc auxiliary scripts 
  more robust against changes in test cases that use them
  and also ensures that they don't unnecessarily change 
  environment of caller.
2010-05-21 16:41:24 +04:00
Alexander Nozdrin
534b3a520b Empty merge from mysql-trunk. 2010-05-20 14:05:17 +04:00
Alexander Nozdrin
d8b33c52b6 Auto-merge from mysql-trunk-bugfixing. 2010-05-20 14:00:41 +04:00
Alexander Nozdrin
091bcacc79 Another incarnation of the patch for Bug#30708
(make relies GNU extentions). The patch was partially
backport from 6.0.

Original comment:
bug#30708: make relies GNU extensions.  Now that we no longer use
BitKeeper we can safely remove the SCCS handling with no loss of
functionality.
2010-05-19 17:00:23 +04:00
Alexander Nozdrin
2f7945b8b9 Backporting a patch for Bug#43358 from 6.0 to trunk-bugfixing. 2010-05-19 16:33:51 +04:00
Alexander Nozdrin
796fd24e15 Backport test cases for Bug#46198 and Bug#38054
from 6.0 to trunk-bugfixing.
2010-05-19 16:31:18 +04:00
Jon Olav Hauglid
c09eb2afc3 Bug #53798 OPTIMIZE TABLE breaks repeatable read
The problem was that OPTMIZE TABLE was allowed to run on a table
in use by a transaction in a different connection. This caused
repeatable read to break.

This bug was fixed by the introduction of metadata locking, WL#4284.
OPTIMIZE TABLE will now be blocked until the transaction using the
table, has ended.

This patch contains a regression test added to innodb_mysql_lock.test
and no code changes.
2010-05-19 13:32:21 +02:00
Andrei Elkin
b530d5660e reverting fixes for Bug@50316 in mysql-trunk 2010-05-18 18:32:44 +03:00
Jon Olav Hauglid
1c02ed3e67 manual merge from mysql-trunk-bugfixing 2010-05-18 14:52:51 +02:00
Andrei Elkin
1579ae040b rpl_ndb tests fixing results files due to Master_Info_File of bug#50316 2010-05-18 11:07:31 +03:00
Andrei Elkin
2c966ddda1 merging bug#50316 fixes 2010-05-18 10:13:37 +03:00
Alexander Nozdrin
5d3833f51b Patch for Bug#52410 (Test "mysqld--help-*": further output differences).
That was a pure test issue -- filter implementation in Perl did not work
on some platform (the bug occurred on Windows Server 2008 with
Cygwin Perl 5.10.0).
2010-05-17 19:28:50 +04:00
Alexander Nozdrin
677bc2e719 Follow-up patch for Bug#27863 (excessive memory usage for many small queries
in a multiquery packet): fix NDB test failures.
2010-05-17 16:10:26 +04:00
Andrei Elkin
f7e999ed77 removing disabled line for rpl_row_create_table due to Bug#45576. Anyway, the test is still there because of Bug#51574 2010-05-16 22:28:20 +03:00
Andrei Elkin
9e3c410ae7 bug#50316 Add Master_info_file to SHOW SLAVE STATUS
pushing to next-mr-bugfixing from working branch
2010-05-16 21:40:56 +03:00
Alexander Nozdrin
5c4333bc85 Patch for Bug#27863 (excessive memory usage for many small queries in a
multiquery packet).

Background:

  - a query can contain multiple SQL statements;

  - the server frees resources allocated to process a query when the
    whole query is handled. In other words, resources allocated to process
    one SQL statement from a multi-statement query are freed when all SQL
    statements are handled.

The problem was that the parser allocated a buffer of size of the whole
query for each SQL statement in a multi-statement query. Thus, if a query
had many SQL-statements (so, the query was long), but each SQL statement
was short, ther parser tried to allocate huge amount of memory (number of
small SQL statements * length of the whole query).

The memory was allocated for a so-called "cpp buffer", which is intended to
store pre-processed SQL statement -- SQL text without version specific
comments.

The fix is to allocate memory for the "cpp buffer" once for all SQL
statements (once for a query).
2010-05-14 22:11:25 +04:00
Konstantin Osipov
d63caa0c30 Committing on behalf of Valdislav Vaintroub (reviewed and
approved):

3161 Vladislav Vaintroub       2010-04-29                 
 Bug#53196 : CMake builds don't support 'make tags' and 
'make ctags' targets.  
   - Added tags and ctags targets
2010-05-14 18:42:10 +04:00
Alexander Nozdrin
7752ccec48 Patch for Bug#21818 (Return value of ROW_COUNT() is incorrect
for ALTER TABLE, LOAD DATA).

ROW_COUNT is now assigned according to the following rules:

  - In my_ok():
    - for DML statements: to the number of affected rows;
    - for DDL statements: to 0.

  - In my_eof(): to -1 to indicate that there was a result set.

    We derive this semantics from the JDBC specification, where int
    java.sql.Statement.getUpdateCount() is defined to (sic) "return the
    current result as an update count; if the result is a ResultSet
    object or there are no more results, -1 is returned".

  - In my_error(): to -1 to be compatible with the MySQL C API and
    MySQL ODBC driver.

  - For SIGNAL statements: to 0 per WL#2110 specification. Zero is used
    since that's the "default" value of ROW_COUNT in the diagnostics area.
2010-05-14 09:28:51 +04:00
Konstantin Osipov
c40277d8cd Merge trunk -> trunk-runtime. 2010-05-13 19:40:33 +04:00
Dmitry Lenev
017d66b5c8 Small clean-up. Removed standalone enum_open_table_action enum
type, which some time ago became part of Open_table_context class.
Apparently standalone enum type was erroneously re-introduced
during one of merges.
2010-05-13 13:36:49 +04:00
Dmitry Lenev
8a6953dbc5 Fix compiler warning about "assignment used as truth value"
which was introduced by fix for bug 47459 "Assertion in
Diagnostics_area::set_eof_status on OPTIMIZE TABLE.
2010-05-13 13:24:59 +04:00
Jonathan Perkin
89aedeb06d Revert back to new CMake names for audit_null/daemon_example plugins. 2010-05-12 16:32:31 +01:00
Jonathan Perkin
9d33e95474 Remove comments. 2010-05-12 16:25:53 +01:00
Jonathan Perkin
5b85121ca6 Changes to build using CMake according to existing release packages:
- Update/fix file layouts for each package type, add new types for
   native package formats including deb, rpm and svr4.

 - Build all plugins, including debug versions

 - Update compiler flags to match current release

 - Add missing @VAR@ expansions

 - Install correct mysqclient library symlinks

 - Fix icc/ia64 builds

 - Fix install of libmysqld-debug

 - Don't include mysql_embedded

 - Remove unpackaged manual pages to avoid missing files warnings

 - Don't install mtr's test suite
2010-05-12 12:51:23 +01:00
Jonathan Perkin
cb327fd8c2 Large number of changes to support building RPMs using CMake, along
with other merges from the old distribution-specific spec file.

 - update copyright notices

 - remove __os_install_post override, it was only necessary as a
   hack to build debuginfo packages - now that we no longer make
   them we can revert to the distribution macro which likely has
   other useful bits we might want

 - remove _unpackaged_files_terminate_build override, we want to
   know of any orphaned files

 - include native distribution support

 - no longer build separate debuginfo RPMs, instead just include
   debug/symbols in all binaries, which is more useful for support

 - include support for building commercial RPMs, requires a
   commercial source tree

 - remove cluster RPM support, we don't build them from this
   source tree

 - use CMake for building, and update package lists to match the
   new install layout/files.  Remove any options which were only
   useful for automake builds (e.g. yassl/zlib).

 - other minor cleanups
2010-05-12 12:46:23 +01:00
Mats Kindahl
7f514f45e6 Bug #52737: plugin_dir is set to /usr/local/mysql/lib/plugin while starting
via mysqld_safe

Plugin dir was set to a hard-coded path instead of relative the base dir.

This patch fixes this by using a path relative the basedir instead of the
plugin directory indicated by the configuration.
2010-05-11 15:55:52 +02:00
Alexander Nozdrin
3511c2e45a Make innodb.innodb_information_schema experimental due to Bug 48883. 2010-05-11 16:00:24 +04:00
Alexander Nozdrin
a2d5ef0557 Null-merge from mysql-trunk. 2010-05-07 13:22:38 +04:00
Alexander Nozdrin
19fac19a93 Auto-merge from mysql-trunk-bugfixing. 2010-05-07 13:16:55 +04:00
Konstantin Osipov
cca59e83d7 Clean-up, give better names, add comments to
thd->in_multi_stmt_transaction() and thd->active_transaction().
2010-05-06 02:02:08 +04:00
Magne Mahre
24a14875bc Bug#49193 CREATE TABLE reacts differently depending on whether
data is selected or not

Temporary and permanent tables should live in different 
namespaces.  In this case, resolving a permanent table
name gave the temporary table, resulting in a name
collision.
2010-05-05 23:28:58 +02:00
Alexander Nozdrin
d91c271b2b Patch for Bug#50511 (Sometimes wrong handling of user variables containing NULL).
The bug happened under the following condition:
  - there was a user variable of type REAL, containing NULL value
  - there was a table with a NOT_NULL column of any type but REAL, having
    default value (or auto increment);
  - a row was inserted into the table with the user variable as value.
    A warning was emitted here.

The problem was that handling of NULL values of REAL type was not properly
implemented: it didn't expect that REAL NULL value can be assigned to other
data type.

Basically, the problem was that set_field_to_null() was used instead of
set_field_to_null_with_conversions().

The fix is to use the right function, or more generally, to allow conversion of
REAL NULL values to other data types.
2010-05-05 15:00:59 +04:00
Alexander Barkov
25d31b8f7c Bug#51571 load xml infile causes server crash
Problem:
  item->name was NULL for Item_user_var_as_out_param
  which made strcmp(something, item->name) crash in the LOAD XML code.
  
  Fix:
  - item_func.h: Adding set_name() in constuctor for Item_user_var_as_out_param
  - sql_load.cc: Changing the condition in write_execute_load_query_log_event() which
  distiguished between Item_user_var_as_out_param and Item_field
  from
    if (item->name == NULL)
  to
    if (item->type() == Item::FIELD_ITEM)
  - loadxml.result, loadxml.test: adding tests
2010-05-05 14:34:20 +04:00
Magne Mahre
1cf9861f86 Bug#48800 CREATE TABLE t...SELECT fails if t is a temporary
table

If a temporary table A exists, and a (permanent) table 
with the same name is attempted created with 
"CREATE TABLE ... AS SELECT", the create would fail with 
an error.
   1050: Table 'A' already exists

The error occured in MySQL 5.1 releases, but is not
present in MySQL 5.5.   This patch adds a regression
test to ensure that the problem does not reoccur.
2010-05-05 12:17:07 +02:00
Alexander Barkov
6bf10a8623 Bug#52849 [Com]: datetime index not work
Problem: after introduction of "WL#2649 Number-to-string conversions"

This query:
  SET NAMES cp850; -- Or any other non-latin1 ASCII-based character set
  SELECT * FROM t1
  WHERE datetime_column='2010-01-01 00:00:00'
started to add extra character set conversion: 
  SELECT * FROM t1
  WHERE CONVERT(datetime_column USING cp850)='2010-01-01 00:00:00';

so index on DATETIME column was not used anymore.
Fix:
  avoid convertion of NUMERIC/DATETIME items
  (i.e. those with derivation DERIVATION_NUMERIC).
2010-05-05 13:28:37 +04:00
Horst.Hunger
8975d4766f Patch for 47759 to trunk-bugfixing. 2010-05-05 09:35:38 +02:00
Jon Olav Hauglid
27da41cc2e merge from mysql-trunk-bugfixing 2010-05-05 09:25:04 +02:00
Omer BarNir
3cf56bb21b Changes to result files in the engine suite - missed from previous commit 2010-05-04 13:39:17 -07:00
Omer BarNir
1c731cb0c6 Updates to test and result files in the 'engine' suites following changes in 5.5 2010-05-04 11:10:17 -07:00
Alexander Nozdrin
a0e2f8866c Include mysql/innodb_priv.h into 'make dist'. 2010-05-04 19:44:29 +04:00
Jon Olav Hauglid
efe69e7c42 Followup to Bug#42546 Backup: RESTORE fails, thinking it finds an existing table
Fixes a bug where bool* was used as an argument to a function where the parameter
was of type bool.
2010-05-04 16:33:42 +02:00
Alexander Nozdrin
a7cc09e01a Mark 3 test cases experimental on FreeBSD due to Bug 43020, Bug 38965. 2010-05-04 16:17:46 +04:00