Commit graph

152 commits

Author SHA1 Message Date
Marc Alff
e76bb8c665 Bug#36768 (partition_info::check_partition_info() reports mal formed
warnings)

Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.

With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
2008-10-06 14:36:15 -06:00
Sven Sandberg
28ce5ab20e Bug#35807 - INSTALL PLUGIN replicates row-based, but not stmt-based
INSTALL PLUGIN and UNINSTALL PLUGIN worked with statement-based and
mixed-mode replication only, but not with row-based replication.

There is no statement-based replication of these statements.
But there was row-based replication of the inserts and deletes
to and from the mysql.plugin table.

The fix is to suppress binlogging during insert and delete to
and from the mysql.plugin table.
2008-08-19 17:35:56 +02:00
Sergey Petrunia
eb8d8d3e3a Merge fix for BUG#35478 into 5.1 2008-07-15 21:46:02 +04:00
Ramil Kalimullin
db56fd008c Fix for bug#37669: Server crash by setting "@@session.innodb_table_locks"
Problem: reading/writing data from/to an address without proper
alignment leads to SIGBUS on some platforms.

Fix: use the correct data type when dereferencing variable values.
2008-07-09 16:52:26 +05:00
Georgi Kodinov
bd4c6d9b8c Bug#37069: Make federated disabled by default
The federated storage engine is now disabled by default.
mysql-test-run.pl is updated to enable it whenever it's required and available.
2008-05-30 13:21:45 +03:00
gkodinov/kgeorge@magare.gmz
fd64a7735d fixed compiler error in 5.1-marvel. 2008-03-28 18:43:13 +02:00
gkodinov/kgeorge@macbook.gmz
450a6385c4 fixed a hand in 5.1-marvel :
Removed a double release of the mutex on error
2008-03-28 17:24:23 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
090d1396cf Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-28 12:14:27 +02:00
istruewing@stella.local
eabe082d6f Manual merge 2008-03-14 12:02:11 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
74cbd71e94 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-13 23:35:52 +02:00
kaa@kaamos.(none)
0a7052e4d3 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:19:46 +03:00
antony@pcg5ppc.xiphis.org
820068f1b7 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
2008-03-07 13:46:29 -08:00
jani@hynda.mysql.fi
b806eea262 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2008-02-27 16:46:32 +02:00
tnurnberg@white.intern.koehntopp.de
468c8ebde7 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/99999/51-99999
2008-02-24 14:23:28 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
79491f93c8 Bug#32757: hang with sql_mode set when setting some global variables
If setting a system-variable provided by a plug-in failed, no OK or
error was sent in some cases, hanging the client. We now send an error
in the case from the ticket (integer-argument out of range in STRICT
mode). We also provide a semi-generic fallback message for possible
future cases like this where an error is signalled, but no message is
sent to the client. The error/warning handling is unified so it's the
same again for variables provided by plugins and those in the server
proper.
2008-02-24 14:12:17 +01:00
acurtis/antony@ltamd64.xiphis.org
f6c3587eab Merge xiphis.org:/anubis/antony/work/p1-bug34598.2
into  xiphis.org:/anubis/antony/work/p1-bug34598.2.merge.1
2008-02-19 13:36:49 -08:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
118ebdf720 Bug#34598
"crash on hpita: Invalid address alignment"
  Replace dangerous pointer arithmetic - it may occurr where sizeof(int) is
  less than size of machine alignment requirement.
2008-02-19 12:55:13 -08:00
guilhem@gbichot4.local
045f3c4a5d Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  gbichot4.local:/home/mysql_src/mysql-5.1-build-gca
2008-02-18 23:36:57 +01:00
guilhem@gbichot4.local
9e2b31b026 Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
2008-02-18 23:29:39 +01:00
istruewing@stella.local
9a4d57e319 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2008-02-14 16:53:03 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
1569f152da Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-02-12 10:45:08 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
4f98f3e683 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-02-08 12:13:33 +01:00
kostja@dipika.(none)
b46ce80902 A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and
pre-locking.

The crash was caused by an implicit assumption in check_table_access() that
table_list parameter is always a part of lex->query_tables.

When iterating over the passed list of tables, check_table_access() used
to stop only when lex->query_tables_last_not_own was reached. 
In case of pre-locking, lex->query_tables_last_own is not NULL and points
to some element of lex->query_tables. When the parameter
of check_table_access() was not part of lex->query_tables, loop invariant
could never be violated and a crash would happen when the current table
pointer would point beyond the end of the provided list.

The fix is to change the signature of check_table_access() to also accept
a numeric limit of loop iterations, similarly to check_grant(), and 
supply this limit in all places when we want to check access of tables
that are outside lex->query_tables, or just want to check access to one table.
2008-01-30 18:27:41 +03:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
82839a0bbb fixes to make pushbuild tests green 2008-01-26 02:13:35 -08:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
98515df213 Bug#33358
"Plugin enum variables can't be set from command line"
  fix crash of LOCK_plugins mutex when loading plug-ins from command line.
  fix off-by-one bug when loading multiple plug-ins from the command line.
  initialize command line handling for ENUM and SET plugin variable types.
2008-01-25 16:05:15 -08:00
bell@desktop.sanja.is.com.ua
707e899c9e Mutex protection added for loading plugins. (BUG#33345) 2007-12-19 10:13:13 +02:00
gluh@eagle.(none)
4f5868114a Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 15:56:04 +04:00
tnurnberg@sin.intern.azundris.com
5cab4a77e1 Bug#31177: Server variables can't be set to their current values
initialise limits properly for getopt_ll_limit()
(fixes falcon_opt test)
2007-12-06 18:03:30 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
ae8b22d91e Bug#31177: Server variables can't be set to their current values
additional fixes for 64-bit
---
Merge mysql.com:/misc/mysql/31177/50-31177
into  mysql.com:/misc/mysql/31177/51-31177
---
Bug#31177: Server variables can't be set to their current values

additional 5.1 fixes (for plugins)
2007-12-04 01:17:52 +01:00
tnurnberg@white.intern.koehntopp.de
f561e8ddf3 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/31177/51-31177
2007-12-02 03:19:07 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
56274466be Bug#31177: Server variables can't be set to their current values
5.1+ specific fixes (plugins etc.)
2007-12-01 19:55:06 +01:00
serg@janus.mylan
6f689c91d8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-11-19 17:12:49 +01:00
gluh@eagle.(none)
58336411c9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-11-14 17:30:16 +04:00
gshchepa/uchum@gleb.loc
70f36562bc Fixed bug #32034: On 64bit platforms assigning values of
storage engine system variables was not validated and
unexpected value was assigned.

The check_func_enum function used subtraction from the uint
value with the probably negative result. That result of
type uint was compared with 0 after casting to signed long
type. On architectures where long type is longer than int
type the result of comparison was unexpected.
2007-11-14 13:48:21 +04:00
istruewing@stella.local
3eaf82a175 Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table

Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".

Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...

Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.
2007-11-05 16:25:40 +01:00
serg@janus.mylan
f86510e45e Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-10-22 20:05:06 +02:00
serg@janus.mylan
55f7f3ef8e sql_plugin.cc:
fixed uninit memory access in SET pluginvar=DEFAULT
innodb_mysql.test, innodb_mysql.result:
  test case for SET pluginvar=DEFAULT
2007-10-08 20:57:37 +02:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
159d5c51f2 fix undefined variable which can lead to crash 2007-10-04 17:34:28 -07:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
3060f0be8e Bug#31382
"Disabled plugin is provoking Valgrind error"
  If there are any auto-alloced string plug-in options, memory is
  allocated during the call for handle_options(). We must free this
  memory if we are not installing the plug-in.
2007-10-04 10:55:08 -07:00
joerg@trift2.
d4d4f8528e Manual merge of parallel development in separate team trees. 2007-08-22 17:13:42 +02:00
jani@hynda.mysql.fi
6519de0469 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-22 17:29:38 +03:00
kostja@bodhi.(none)
91fe15bb9d Fix doxygen warnings. 2007-08-15 17:43:08 +04:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
malff/marcsql@weblab.(none)
c7bbd8917c WL#3984 (Revise locking of mysql.general_log and mysql.slow_log)
Bug#25422 (Hang with log tables)
Bug 17876 (Truncating mysql.slow_log in a SP after using cursor locks the
          thread)
Bug 23044 (Warnings on flush of a log table)
Bug 29129 (Resetting general_log while the GLOBAL READ LOCK is set causes
           a deadlock)

Prior to this fix, the server would hang when performing concurrent
ALTER TABLE or TRUNCATE TABLE statements against the LOG TABLES,
which are mysql.general_log and mysql.slow_log.

The root cause traces to the following code:
in sql_base.cc, open_table()
  if (table->in_use != thd)
  {
    /* wait_for_condition will unlock LOCK_open for us */
    wait_for_condition(thd, &LOCK_open, &COND_refresh);
  }
The problem with this code is that the current implementation of the
LOGGER creates 'fake' THD objects, like
- Log_to_csv_event_handler::general_log_thd
- Log_to_csv_event_handler::slow_log_thd
which are not associated to a real thread running in the server,
so that waiting for these non-existing threads to release table locks
cause the dead lock.

In general, the design of Log_to_csv_event_handler does not fit into the
general architecture of the server, so that the concept of general_log_thd
and slow_log_thd has to be abandoned:
- this implementation does not work with table locking
- it will not work with commands like SHOW PROCESSLIST
- having the log tables always opened does not integrate well with DDL
operations / FLUSH TABLES / SET GLOBAL READ_ONLY

With this patch, the fundamental design of the LOGGER has been changed to:
- always open and close a log table when writing a log
- remove totally the usage of fake THD objects
- clarify how locking of log tables is implemented in general.

See WL#3984 for details related to the new locking design.

Additional changes (misc bugs exposed and fixed):

1)

mysqldump which would ignore some tables in dump_all_tables_in_db(),
 but forget to ignore the same in dump_all_views_in_db().

2)

mysqldump would also issue an empty "LOCK TABLE" command when all the tables
to lock are to be ignored (numrows == 0), instead of not issuing the query.

3)

Internal errors handlers could intercept errors but not warnings
(see sql_error.cc).

4)

Implementing a nested call to open tables, for the performance schema tables,
exposed an existing bug in remove_table_from_cache(), which would perform:
  in_use->some_tables_deleted=1;
against another thread, without any consideration about thread locking.
This call inside remove_table_from_cache() was not required anyway,
since calling mysql_lock_abort() takes care of aborting -- cleanly -- threads
that might hold a lock on a table.
This line (in_use->some_tables_deleted=1) has been removed.
2007-07-27 00:31:06 -06:00
antony@ppcg5.local
21c233440d Merge ppcg5.local:/Users/antony/Work/p2-bug25800.6
into  ppcg5.local:/Users/antony/Work/p2-bug25800.6.merge
2007-06-14 16:04:52 -07:00
antony@ppcg5.local
3bb1769bc0 Bug#25800
"Embedded server requires mysql.plugin"
  Embedded builds should not print any error when the mysql.plugin
  table does not exist. This is achieved by checking for the existance
  of the mysql.plugin table before attempting to open it and proceed
  silently if it does not exist.
2007-06-12 19:28:05 -07:00
istruewing@chilla.local
316f09d444 post-merge fix 2007-05-31 22:07:44 +02:00
istruewing@chilla.local
4ba6a0fb7e Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  chilla.local:/home/mydev/mysql-5.1-axmrg
2007-05-31 21:28:04 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
2c8f4f9791 Added casts to avoid compiler warnings and fixed a wrong type.
---
Added casts and fixed wrong type.
---
Added casts and fixed wrong type.
---
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
---
Don't give warning that readonly variable is forced to be readonly
mysql-test-run run now fails if we have [Warning] and [ERROR] as tags in .err file
Fixed wrong reference to the mysql manual
Fixed wrong prototype that caused some tests to fail on 64 bit platforms
---
Disabled compiler warnings mainly for Win 64.
---
Added casts to remove compiler warnings on windows
Give warnings also for safe_mutex errors found by test system
Added some warnings from different machines in pushbuild
---
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/home/my/mysql-5.1
---
Added escapes for double quotes and parenthesis.
---
Archive db fix plus added non-critical warnings
in ignore list.
---
Fixed previously added patch and added new ignored warning.
2007-05-31 17:45:22 +03:00
antony@ppcg5.local
57382213af Bug#27836
"sql_plugin.cc, dynamic_array is not dynamic"
  When the DYNAMIC_ARRAYs were resized, pointers became invalid.
  Solved by only storing pointers within the DYNAMIC_ARRAYs.
2007-05-24 10:39:24 -07:00