Commit graph

3739 commits

Author SHA1 Message Date
unknown
7009bf411a Merge with main for BUG#12969301 2012-01-30 10:23:21 -05:00
unknown
461e039a07 BUG#12969301 : mysql_plugin: enable is ignored if plugin exists
This patch changes the mechanism by which the client enables a 
plugin. Instead of using INSERT IGNORE to reload a plugin library,
it now uses REPLACE INTO. This allows users to load a library
multiple times replacing the existing values in the mysql.plugin
table. This allows users to replace the symbol reference to a
different dl name in the table. Thus permitting enabling of 
multiple versions of the same library without first disabling
the old version.

A regression test was added to ensure this feature works.
2012-01-24 11:08:57 -05:00
Tor Didriksen
72bdeddd34 fix compile warning: may be used uninitialized 2012-01-12 16:27:53 +01:00
Nirbhay Choubey
0306cde0a5 Merge of fix for bug#11760384 from mysql-5.1. 2012-01-10 16:10:48 +05:30
Nirbhay Choubey
99e462ab0b BUG#11760384 - 52792: mysqldump in XML mode does not dump
routines.

mysqldump in xml mode did not dump routines, events or
triggers.

This patch fixes this issue by fixing the if conditions
that disallowed the dump of above mentioned objects in
xml mode, and added the required code to enable dump
in xml format.


client/mysqldump.c:
  BUG#11760384 - 52792: mysqldump in XML mode does not dump
                        routines.
  
  Fixed some if conditions to allow execution of dump methods
  for xml and further added the relevant code at places to produce
  the dump in xml format.
mysql-test/r/mysqldump.result:
  Added a test case for Bug#11760384.
mysql-test/t/mysqldump.test:
  Added a test case for Bug#11760384.
2012-01-10 13:33:45 +05:30
Nirbhay Choubey
49d2790aff Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
--FLUSH-LOG BREAKS CONSISTENCY

Post-fix for some failing tests.
2011-12-24 15:08:59 +05:30
Nirbhay Choubey
5e487124aa Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
--FLUSH-LOG BREAKS CONSISTENCY

The transaction started by mysqldump gets committed
implicitly when flush-log is specified along with
single-transaction option, and hence can break
consistency.

This is because, COM_REFRESH is executed in order
to flush logs and starting from 5.5 this command
performs an implicit commit.

Fixed by making sure that COM_REFRESH is executed
before the transaction has started and not after it.

Note : This patch triggers following behavioral
       changes in mysqldump :

1) After this patch we no longer flush logs before
   dumping each database if --single-transaction
   option is given like it was done before (in the
   absence of --lock-all-tables and --master-data
   options).

2) Also, after this patch, we start acquiring
   FTWRL before flushing logs in cases when only
   --single-transaction and --flush-logs are given.
   It becomes safe to use mysqldump with these two
   options and without --master-data parameter for
   backups.


client/mysqldump.c:
  Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
               --FLUSH-LOG BREAKS CONSISTENCY
  
  Added logic to make sure that, if flush-log option
  is specified, mysql_refresh() is never executed after
  the transaction has started.
  
  Added verbose messages for all the executions of
  mysql_refresh() in order to track its invocation.
mysql-test/r/mysqldump.result:
  Added test case for Bug#12809202.
mysql-test/t/mysqldump.test:
  Added test case for Bug#12809202.
2011-12-23 23:05:00 +05:30
Alexander Nozdrin
aff6b0fd82 A patch for Bug#13023858 - MYSQL_UPGRADE PRINTS
THE ORACLE_WELCOME_COPYRIGHT_NOTICE TWICE.

Fix of a merge error.
2011-12-21 19:26:11 +04:00
Tor Didriksen
98adda5095 Build broken for gcc 4.5.1 in optimized mode.
readline.cc: In function char* batch_readline(LINE_BUFFER*):
readline.cc:60:9: error: out_length may be used uninitialized in this function
log.cc: In function int find_uniq_filename(char*):
log.cc:1857:8: error: number may be used uninitialized in this function
2011-11-29 15:52:47 +01:00
Nirbhay Choubey
4df195a4ca Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG

System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.

mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.

Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)

Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.


client/mysql_upgrade.c:
  Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
                      OPTION SKIP-WRITE-BINLOG
  
  With this patch, --upgrade-system-tables and
  --write-binlog options will not be added to the
  list of options, used to start mysql and mysqlcheck
  tools.
mysql-test/r/mysql_upgrade.result:
  Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
  Added a testcase for Bug#11827359.
2011-11-15 17:48:42 +05:30
unknown
a2f757eabe BUG#12929028: mysql_plugin : the --mysqld option is required, but not used
This patch corrects a defect whereby the --mysqld, --my-print-defaults, 
and --plugin-ini were required. These options are not required and the
code has been fixed accordingly.
2011-11-11 14:44:51 -05:00
Bjorn Munch
020600a4ed Bug #13055685 NO WAY TO REPLACE NON-DETERMINISTIC FRAGMENTS IN OUTPUT OF MTR'S ECHO
Don't do this for echo, instead:
    1) Enable replacements also for assignment from backquoted SQL
    2) Allow replace_regex to take a variable for the *entire* argument list
  
    With this, the test can be amended, but only in its version in trunk
2011-11-08 15:55:25 +01:00
Bjorn Munch
40f42cac72 Bug #13096353 62712: RPM-BASED INSTALL OF THE TEST SUITE IS USELESS FOR NON-ROOT USERS
Simplified fix avoiding changes to mysys:
  Use the MY_HOLD_ORIGINAL_MODES flag when calling my_copy(),
    this also stops it from attempting to chown() the file.
  Yes this behavior is a bit confusing....
  The only case this might change the behavior is if the destination file
    exists, but since we also use MY_DONT_OVERWRITE_FILE, it would fail
    in those cases anyway.
2011-11-03 15:57:18 +01:00
Tor Didriksen
0e2af2cdd3 Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.
Also fixed possibly uninitialized use of need_copy_table_res.
2011-11-01 07:50:54 +01:00
unknown
434dd8635e Bug #11754855 46528: NEED A WAY TO PASS A VARIABLE TO MTR COMMANDS
modified function do_get_error in mysqltest.cc to handle multiple variable passed
added test case to mysqltest.test to verify handling to multiple errors passed
2011-10-19 12:53:52 +05:30
unknown
3c869a521a BUG#12968567: mysql_plugin : incorrect return from bootstrap failure
This patch corrects a defect whereby the bootstrap_server() method was
returning 0 instead of the error code generated. The code has been changed to
return the correct value returned from the bootstrap command.
2011-10-17 15:33:54 -04:00
unknown
d1846e3b95 BUG#12968815: mysql_plugin : disable requires plugin name but doesn't use it
This patch corrects a defect in the building of the DELETE commands for
disabling a plugin whereby only the original plugin data was deleted. If there
were other plugins, the delete did not remove the rows. The code has been
changed to remove all rows from the mysql.plugin table that were inserted when
the plugin was loaded. The test has also been changed to correctly identify if
all rows have been deleted.
2011-10-17 15:30:28 -04:00
Bjorn Munch
37de3c2c0b 12956584 followup fix for mysqltest
run_query_stmt() might use disable_xxx vars after calling handle_no_error
  But handle_no_error() hes reverted any ONCE settings
  Fix is to take revert_properties() out of handle_no_error()
2011-09-30 15:25:19 +02:00
Raghav Kapoor
af400ee256 Merge of fix for bug#11758062 from mysql-5.1. 2011-09-28 16:54:15 +05:30
Raghav Kapoor
ffd0a785f4 BUG#11758062 - 50206: ER_TOO_BIG_SELECT REFERS TO OUTMODED
SYSTEM VARIABLE NAME SQL_MAX_JOIN_SI 

BACKGROUND:

ER_TOO_BIG_SELECT refers to SQL_MAX_JOIN_SIZE, which is the
old name for MAX_JOIN_SIZE.

FIX:

Support for old name SQL_MAX_JOIN_SIZE is removed in MySQL 5.6
and is renamed as MAX_JOIN_SIZE.So the errmsg.txt 
and mysql.cc files have been updated and the corresponding result
files have also been updated.
2011-09-28 15:39:21 +05:30
Bjorn Munch
abbc47f5c4 merge from 5.5 main 2011-09-26 10:27:54 +02:00
Bjorn Munch
031b52c415 merge from 5.1 main 2011-09-26 10:06:25 +02:00
Daniel Fischer
7450044eb7 merge from 5.5.16 2011-09-21 12:40:41 +02:00
Bjorn Munch
04c402c452 upmerge 12793118,12912120 2011-09-15 13:09:24 +02:00
Bjorn Munch
32e8085de9 Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Followup fixes for --ps-protocol:
  1) Incorrectly set ps_protocol variable instead of ps_protocol_enabled
  2) disable_result_log was tested after calling handle_no_error()
        which would revert a temporary setting.
2011-09-15 10:53:19 +02:00
Bjorn Munch
52960624d3 Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK FOR SQL IN COMMANDS
Call handle_error() instead of die() when evaluating these
  Must remember "current command" with link to errors to ignore
  Added test cases to mysqltest.test
2011-09-14 15:19:24 +02:00
Bjorn Munch
a238e6ada2 Bug #12956584 MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Added a keyword ONCE to add to those commands
  Some internal tables to keep track of which properties are
    temporarily overriden
  Added tests in mysqltest.test
  Updates to other tests will be done later
2011-09-14 15:15:36 +02:00
Chuck Bell
8433c8ce61 BUG#12929631 : Execute crashes with --verbose output (Windows)
This patch corrects an error encountered in PB where Windows machines
are built in release mode have an extraneous parameter added in place
of the --console option. This is caused by the insert of '(null' 
instead of an empty string. In non-debug mode, the string is explicitly
set to an empty string.

Patch also fixes a result mismatch on Windows machines.
2011-09-09 10:39:44 -04:00
Chuck Bell
1e7f06371a BUG#12929345 : Execution aborts without any messages (Windows only)
This patch adds the length of the buffer in the strncat operation
to prevent buffer overrun.
2011-09-07 14:03:17 -04:00
Chuck Bell
0750d88c15 BUG#12929345 : Execution aborts without any messages (Windows only)
This patch corrects an unsafe string concatenation for a Windows-specific
code segment. The symptoms were, under certain conditions like specifying
the location of my-print-defaults and the basedir, and run on a release
build, the client would exit without printing any messages.
2011-09-07 13:09:27 -04:00
Chuck Bell
b7478b966a BUG#12929631 : Execute crashes with --verbose output (Windows)
This patch corrects an unsafe string concatenation in the Windows
specific code for building the bootstrap command to enable or
disable the plugin.
2011-09-07 10:46:20 -04:00
Bjorn Munch
6e60a07157 Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC
CODES AND VICE VERSA
  Followup: Some statement may give errors not in the list,
  map these to "<Unknown>" rather than failing.
2011-08-22 14:42:12 +02:00
Bjorn Munch
4cb3072356 Bug #12793170 MYSQLTEST: PROVIDE ACCESS TO ERROR NAMES THROUGH NUMERIC CODES AND VICE VERSA
Added a second internal variable $mysql_errname
  This is set the same way as $mysql_errno
  Can be used like "if ($mysql_errname == ER_NO_SUCH_TABLE)...."
2011-08-22 13:58:49 +02:00
Alexander Nozdrin
6e5bbf5138 Cherry-picking WL#5710 from mysql-5.5 to mysql-5.5.16-release.
Original revision id:
# revno: 3489 [merge]
# revision-id: tatjana.nuernberg@oracle.com-20110811120945-c6x9a5d2du8s9oj2
# parent: tatjana.nuernberg@oracle.com-20110811112736-so8r813hs8dmf7nr
# parent: chuck.bell@oracle.com-20110810183949-2s9uxcuoux2p668e
# committer: Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
# branch nick: 55-9
# timestamp: Thu 2011-08-11 13:09:45 +0100
# message:
#   auto-merge

This merge revision also has a patch for Bug 12664445, which has been also
taken to 5.5.16.
2011-08-15 18:29:38 +04:00
Chuck Bell
e08126089b WL#5710 : enable and disable plugins
Merge with main prior to pushing to mysql-5.5.
2011-08-10 14:39:49 -04:00
Chuck Bell
99f2e85b6c WL#5710 : enable and disable plugins
This patch corrects a problem found in PB. Some platforms have very
different locations for the mysql installation. The client was not
able to find either my_print_defaults or mysqld predictably.

The patch adds two new command options --mysqld and --my-print-defaults
which can be used to provide the location of mysqld and
my_print_defaults by providing the paths.

The patch also changes the concatenation of the soname extension to
fix a problem found on some Ubuntu systems.

The patch contains changes to the test to ensure it will run on all
platforms. A trap is set in the test to skip testing if the location
of mysqld, my_print_defaults, or the daemon_example.ini files cannot
be determined.
2011-08-09 08:58:18 -04:00
Ramil Kalimullin
c7087cd53c Manual merge from mysql-5.1. 2011-08-09 11:42:07 +04:00
Chuck Bell
6c4da66d83 WL#5710: enable and disable plugins
This patch corrects a problem found in pushbuild with the stat()
method on some platforms. The code was changed to use my_stat()
instead.

Also adds mysql_plugin to the mysql.spec.sh file for packaging.
2011-07-25 15:30:24 -04:00
Alexander Nozdrin
9312697530 Manual merge from mysql-5.1. 2011-07-22 11:50:44 +04:00
Alexander Nozdrin
3a786df2d5 Manual merge from mysql-5.0. 2011-07-22 11:46:45 +04:00
Alexander Nozdrin
cb5239954b For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENT
TOOLS

Backport a fix for Bug 57094 from 5.5.
The following revision was backported:

# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
#   Fix for Bug 57094 (Copyright notice incorrect?).
#   
#   The fix is to:
#     - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
#       to specify copyright notice;
#     - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
#       in programs.
2011-07-22 11:45:15 +04:00
Chuck Bell
5d9d545198 WL#5710 : enable and disable plugins
Added additional search path of /bin for finding tools.
2011-07-21 17:46:20 -04:00
Chuck Bell
9c99ae189c WL#5710 : enable and disable plugins
Added additional search paths for finding tools.
2011-07-21 14:37:06 -04:00
Chuck Bell
cf7c2d8401 WL#5710 - remove more special characters in mysql_plugin.c. 2011-07-19 19:18:22 -04:00
Chuck Bell
6f245ec94c WL#5710 - fixed (c) character causing compile issue. 2011-07-19 16:27:55 -04:00
Chuck Bell
5ae1ff7001 WL#5710 : Enable and disable plugins
This patch fixes line endings in the mysql_plugin.c file.
2011-07-19 15:55:03 -04:00
Chuck Bell
9e11249778 BUG#12707948 : mysql_plugin cannot run on Windows
Patch fixes an issue with reading basedir on Windows. It fixes how
the code interprets opt_basedir on Windows by adding the correct
path separators and quotes for paths with spaces.

BUG#12664302 : mysql_plugin cannot recognize the plugin config file

Patch fixes an issue with reading a plugin config file. It adds
more information to the error messages to ensure the user is
using the options correctly. Also deals with paths with spacs on
Windows.
2011-07-19 10:27:15 -04:00
Chuck Bell
33a36da65a WL#5710 : Enable and disable plugins (mysql_plugin)
This patch changes the plugin configuration file format to make it
easier to add new plugins and remove complexity. It also adds more
information when plugin configuration file reads fail.
2011-07-19 10:24:14 -04:00
Chuck Bell
a38fc8d47e WL#5710 : mysql_plugin - enable or disable plugins
This patch adds a new client utility that enables or disables plugin
features. The utility disables or enables a plugin using values (name,
soname, and symbols) provided via a configuration file by the same name.
For example, to ENABLE the daemon_example plugin, the utility will read
the daemon_example.ini configuration file and use the values contained to
enable or disable the plugin.
2011-07-19 10:17:58 -04:00
Tor Didriksen
93915d0d50 merge 5.0-security => 5.1-security 2011-07-15 14:08:14 +02:00