Commit graph

962 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
76e063b9a0 Bug#40657: assertion with out of range variables and traditional sql_mode
In STRICT mode, out-of-bounds values caused an error message
to be queued (rather than just a warning), without any further
error-like processing happening. (The error is queued during
update, at which time it's too late. For it to be processed
properly, it would need to be queued during check-stage.)
The assertion rightfully complains that we're trying to send
an OK while having an error queued.

Changeset breaks a lot of tests out into check-stage. This also
allows us to send more correct warnings/error messages.
2009-02-24 16:42:18 +01:00
Tatiana A. Nurnberg
3b9132fdab Bug#40657: assertion with out of range variables and traditional sql_mode
In STRICT mode, out-of-bounds values caused an error message
to be queued (rather than just a warning), without any further
error-like processing happening. (The error is queued during
update, at which time it's too late. For it to be processed
properly, it would need to be queued during check-stage.)
The assertion rightfully complains that we're trying to send
an OK while having an error queued.

Changeset breaks a lot of tests out into check-stage. This also
allows us to send more correct warnings/error messages.
2009-02-03 02:43:32 +01:00
Georgi Kodinov
8479932c42 merged bug 37339 to 5.1-bugteam 2008-11-28 17:27:12 +02:00
Georgi Kodinov
0708ad5f98 Bug #37339: SHOW VARIABLES not working properly with multi-byte datadir
The SHOW VARIABLES LIKE .../SELECT @@/SELECT ... FROM INFORMATION_SCHEMA.VARIABLES
were assuming that all the system variables are in system charset (UTF-8).
However the variables that are settable through command line will have a different
character set (character_set_filesystem).
Fixed the server to remember the correct character set of basedir, datadir, tmpdir,
ssl, plugin_dir, slave_load_tmpdir, innodb variables; init_connect and init_slave 
variables and use it when processing data.
2008-11-28 16:25:16 +02:00
Ingo Struewing
3ea684935b Bug#28234 - global/session scope - documentation vs implementation
Several system variables did not behave like system variables should do.
When trying to SET them or use them in SELECT, they were reported as
"unknown system variable". But they appeared in SHOW VARIABLES.

This has been fixed by removing the "fixed_vars" array of variables
and integrating the variables into the normal system variables chain.
All of these variables do now behave as read-only global-only
variables. Trying to SET them tells they are read-only, trying to
SELECT the session value tells they are global only. Selecting the
global value works. It delivers the same value as SHOW VARIABLES.
2008-11-22 00:22:21 +01:00
Staale Smedseng
e60c8c8b68 A fix for Bug#22891 "session level max_allowed_packet can be
set but is ignored".
                                  
This patch makes @@session.max_allowed_packed and
@@session.net_buffer_length read-only as suggested in the bug
report. The user will have to use SET GLOBAL (and reconnect)
to alter the session values of these variables.
                            
The error string ER_VARIABLE_IS_READONLY is introduced.
                            
Tests are modified accordingly.
2008-11-20 08:51:48 +01:00
Georgi Kodinov
8c6ffe3630 merge 5.1-bugteam -> bug 32124 5.1 tree 2008-10-08 15:19:55 +03:00
Georgi Kodinov
489ad44ab5 Bug #32124: crash if prepared statements refer to variables in the where clause
The code to get read the value of a system variable was extracting its value 
on PREPARE stage and was substituting the value (as a constant) into the parse tree.
Note that this must be a reversible transformation, i.e. it must be reversed before
each re-execution.
Unfortunately this cannot be reliably done using the current code, because there are
other non-reversible source tree transformations that can interfere with this
reversible transformation.
Fixed by not resolving the value at PREPARE, but at EXECUTE (as the rest of the 
functions operate). Added a cache of the value (so that it's constant throughout
the execution of the query). Note that the cache also caches NULL values.
Updated an obsolete related test suite (variables-big) and the code to test the 
result type of system variables (as per bug 74).
2008-10-08 14:23:53 +03:00
Tatiana A. Nurnberg
c1ed70d384 WL#4403 deprecate @log and @slow_log_queries variables
Adds --general_log_file, --slow_query_log_file command-
line options to match system variables of the same names.

Deprecates --log, --log-slow-queries command-line options
and log, log_slow_queries system-variables for v7.0; they
are superseded by general_log/general_log_file and
slow_query_log/slow_query_log_file, respectively.
2008-10-06 11:29:42 +02:00
Mats Kindahl
69a8281c41 Bug #39106:
SUPER is not required to change binlog format for session

A user without SUPER privileges can change the value of the
session variable BINLOG_FORMAT, causing problems for a DBA.

This changeset requires a user to have SUPER privileges to
change the value of the session variable BINLOG_FORMAT, and
not only the global variable BINLOG_FORMAT.
2008-09-09 12:19:31 +02:00
Sergey Glukhov
515de310f0 Bug#37428 Potential security issue with UDFs - linux shellcode execution.
plugin_dir option backported from 5.1
2008-08-25 17:11:59 +05:00
Marc Alff
b8579849f3 Bug#30087 Set query_cache_size, if the value is too small, get a unclear warning
Reverting the previous patch
2008-07-16 16:29:22 -06:00
Kristofer Pettersson
71be65dd11 Bug#30087 Set query_cache_size, if the value is too small, get a unclear warning
This bugs clarifies a warning message issued when the query cache data
size becomes smaller than the minium allowed size.
2008-06-19 02:40:35 +02:00
kostja@bodhi.(none)
2c0ce2a832 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-27430
2008-05-20 11:38:17 +04:00
thek@adventure.(none)
19a22f87e9 Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
The event scheduler was not designed to work in embedded mode. This
patch disables and excludes the event scheduler when the server is
compiled for embedded build.
2008-05-09 09:43:02 +02:00
thek@kpdesk.mysql.com
f932e51b45 Merge kpdesk.mysql.com:/home/thek/Development/cpp/mysql-5.1
into  kpdesk.mysql.com:/home/thek/Development/cpp/mysql-5.1-merge
2008-04-14 12:58:53 +02:00
df@pippilotta.erinye.com
49d1eeaeb9 Portability fix 2008-04-01 11:03:12 +02:00
anozdrin/alik@quad.opbmk
73345d0fbd Fix for Bug#32748: Inconsistent handling of assignments to
general_log_file/slow_query_log_file.

The problem was that log file path was rejected if directory
path was empty. The fix is to reject log file path only if it
is entirely empty.
2008-03-28 21:46:18 +03:00
iggy@amd64.(none)
79e434bc67 Bug#26243 mysql command line crash after control-c
- Backported the 5.1 DBUG to 5.0.
- Avoid memory cleanup race on Windows client for CTRL-C
2008-03-28 14:02:27 -04:00
anozdrin/alik@quad.opbmk
d02459cbae A patch for Bug#34820: log_output can be set to illegal value.
We have "set" variables, which can accept empty values
(like sql_mode), and which can not (like log_output). The problem
was that the code does not distinguish them and allow empty
values for every set variable.

The fix is to introduce an attribute of a set variable telling
whether it can accept empty values.
2008-03-28 18:10:04 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
0c59da1ca2 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-26 12:32:27 +02:00
mkindahl@dl145h.mysql.com
9baeb72ee6 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-14 18:32:01 +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
sven@riska.(none)
81b1d712bf BUG#31168: @@hostname does not replicate
Problem: in mixed and statement mode, a query that refers to a
system variable will use the slave's value when replayed on
slave. So if the value of a system variable is inserted into a
table, the slave will differ from the master.
Fix: mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode and produce a warning
in statement mode. There are some exceptions: some variables are actually
replicated. Those should *not* be marked as unsafe.
BUG#34732: mysqlbinlog does not print default values for auto_increment variables
Problem: mysqlbinlog does not print default values for some variables,
including auto_increment_increment and others. So if a client executing
the output of mysqlbinlog has different default values, replication will
be wrong.
Fix: Always print default values for all variables that are replicated.
I need to fix the two bugs at the same time, because the test cases would
fail if I only fixed one of them.
2008-03-07 13:59:36 +01:00
aelkin/andrei@mysql1000.(none)
9c2ef8377f Bug #28780 report_host is not available through SELECT @@report_host
merging and post-make-test changes.
2008-03-07 14:39:37 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
ab013df080 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-07 11:25:47 +02:00
aelkin/andrei@mysql1000.(none)
65bb7d3e2d Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.1/bug28780_report_host_no_show
into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.1
2008-03-06 20:33:29 +02:00
aelkin/andrei@mysql1000.(none)
0958a508f8 Bug #28780 report_host is not available through SELECT @@report_host
There was no way to see if report-{host,port,user,password} were set up.

Fixed with introducing new global variables.
The variables are made read-only because of a possible need to change them
most probably require the slave server restart.

Todo: transform the startup options to be CHANGE master parameters - i.e
to deprecate `report-' options, and to change the new vars 
to be updatable at time of CHANGE master executes with new
values.
2008-03-05 12:25:55 +02: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
anozdrin/alik@quad.
bdc83bf2cb Merge quad.:/mnt/raid/alik/MySQL/devel/5.1
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-02-26 19:34:02 +03:00
davi@mysql.com/endora.local
cdd5eae9b6 Bug#34424 query_cache_debug.test leads to valgrind warnings
Bug#34678 @@debug variable's incremental mode

The problem is that the per-thread debugging settings stack wasn't
being deallocated before the thread termination, leaking the stack
memory. The chosen solution is to push a new state if the current
is set to the initial settings and pop it (free) once the thread
finishes.
2008-02-26 12:03:59 -03: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
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
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
kostja@dipika.(none)
add76ef5d5 Fix -ansi -pedantic compilation error 2008-02-08 19:33:24 +03: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
mkindahl@dl145h.mysql.com
4c95b29614 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
2008-01-31 17:46:50 +01:00
mkindahl@dl145h.mysql.com
7cfdd60045 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
2008-01-31 16:15:46 +01:00
mkindahl@dl145h.mysql.com
716c63ebaa Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
2008-01-30 11:25:54 +01:00
mkindahl@dl145h.mysql.com
940ecc23c6 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
2008-01-11 14:20:06 +01:00
hezx@mail.hezx.com
6cab71d3fa Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.0
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.1
2007-12-24 14:55:59 +08:00
serg@janus.mylan
bf95cf1604 Merge janus.mylan:/usr/home/serg/Abk/mysql-5.0
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-12-21 12:02:49 +01:00
serg@janus.mylan
baf53c8524 cast corrected 2007-12-21 11:28:34 +01:00
serg@janus.mylan
f8afc538fe Merge janus.mylan:/usr/home/serg/Abk/mysql-5.0
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-12-21 10:59:14 +01:00
serg@janus.mylan
97754ffae7 warning on windows 2007-12-21 10:31:47 +01:00
hezx@mail.hezx.com
329d1a7bf7 BUG#28908 Replication: set global server_id is not setting the session server_id
When set the server-id dynamically, the server_id member of current thread is not updated.

Update the server_id member of current thread after updated the global variable value.
2007-12-21 11:02:48 +08:00
serg@janus.mylan
d9ca7b670e Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-12-20 22:11:37 +01:00