Commit 9421205b authored by anozdrin/alik@alik's avatar anozdrin/alik@alik

Merge alik.:/mnt/raid/alik/MySQL/devel/5.1

into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt
parents fb650b8a 99277888
...@@ -15,3 +15,5 @@ ...@@ -15,3 +15,5 @@
45214442pBGT9KuZEGixBH71jTzbOA 45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw 45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA 452a92d0-31-8wSzSfZi165fcGcXPA
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454f8960jsVT_kMKJtZ9OCgXoba0xQ
License Agreement for Commercial Use of MySQL[tm] Software
This Agreement ("License") is between MySQL AB, a Swedish company
("Licensor"), and the customer ("Licensee") identified on the electronic order
form submitted on behalf of Licensee (the "Order Form"). In consideration of
the mutual promises, covenants and conditions contained herein, the
sufficiency of which is hereby acknowledged, the parties agree as follows.
1. License Grant.
"Licensed Software" means a complete and unchanged copy of the object code
version of the MySQL relational database management software identified in the
Order Form and posted on a special download page of the MySQL AB web site (the
"Download Page") made available to Licensee immediately after payment as
provided in Section 4. Subject to payment and the other terms and conditions
hereof, Licensor grants to Licensee a limited, non-exclusive and
non-transferable right to: (a) make one copy of the Licensed Software for each
license purchased (each, a "Licensed Copy"); (b) compile and/or link each
Licensed Copy to one copy of the Licensee software identified in the Order
Form (the "Licensee Application") without modifying the Licensed Software
(each, an "Integrated Product"); and (c) load and use the Licensed Copy
portion of an Integrated Product on one machine or instrument in the operating
system environment(s), and on the hardware platform(s) specified in the Order
Form, and solely for running and extracting data from, the Licensee
Application. "Use" means operation by one person for internal business
purposes in accordance with the terms and conditions hereof. Licensed Copies
shall be deemed accepted by Licensee immediately upon download. Licensee may
make one additional copy of each Licensed Copy for backup and archival
purposes only.
2. Transfer.
Only after Licensee has linked or compiled a Licensed Copy as permitted in
Section 1, Licensee may transfer to a third party (the "Transferee") the right
to use such copy as described in Section 1. As a condition to any such
transfer: (a) Licensee must deliver the Licensed Copy and any backup copy to
the Transferee along with a copy of this License (including the Sales Order);
and (b) the Transferee must accept the terms and conditions of this License.
Any and all of Licensee's rights to a Licensed Copy shall terminate upon
transfer of the right to use such copy. A Transferee's rights are limited to
the use rights described in Section 1(c), and do not include the linking,
compilation or copying rights (except for backup and archival copies)
described in Section 1. If you did not purchase this License directly from
MySQL AB, then you are a Transferee. Licensee and any Transferee must comply
with all applicable export laws and regulations.
3. Restrictions.
Licensee may use the Licensed Software only as expressly provided in Section
1. Without limiting the foregoing, Licensee shall not: (a) lease, license,
use, make available, distribute or modify all or any part of the Licensed
Software to any third party, except as otherwise expressly permitted herein;
(b) use the Licensed Software to operate in or as a time-sharing, outsourcing,
service bureau, application service provider or managed service provider
environment; (c) lease, license, use, make available or distribute the
Licensed Software as a general SQL server, as a stand alone application or
with applications other than the Licensee Application under this License; (d)
copy the Licensed Software onto any public or distributed network; (e)
distribute Integrated Products pursuant to a public or open source license;
(f) port the Licensed Software to any operating system other than as described
in the Order Form; or (g) change any proprietary rights notices which appear
in the Licensed Software. Except as otherwise provided in Section 2, the
rights granted to Licensee herein are rights that may be exercised solely by
Licensee.
4. Price and payment.
No later than thirty (30) days after submission of the Order Form, Licensee
shall remit one non-refundable license fee per Licensed Copy as posted on
http://shop.mysql.com on the date Licensee submitted the Order Form (the
"License Fee"). All payments shall be made in Euros or U.S. dollars. Licensee
shall be responsible for paying all local, state, federal and international
sales, value added, excise and other taxes and duties payable in connection
with this License, other than taxes based upon Licensor's net income. Licensee
shall not be permitted to access the Download Page until Licensor has received
payment in full.
5. Termination.
Licensor may terminate this License immediately if the Licensee shall breach
any of the provisions of this License and such breach remains uncured 30 days
after receipt of notice. In the event that Licensee becomes liquidated,
dissolved, bankrupt or insolvent, whether voluntarily or involuntarily, or
shall take any action to be so declared, Licensor shall have the right to
terminate this License immediately. Upon expiration, cancellation or other
termination of this License, Licensee shall immediately: (a) discontinue
distribution of Integrated Products that include Licensed Software; and (b)
destroy all copies of the Licensed Software, including (without limitation) as
linked or compiled in any Integrated Product. Sections 4 through 10 shall
survive the termination of this License for any reason.
6. Proprietary Rights.
Licensee agrees that the copyright, patent, trade secrets and all other
intellectual proprietary rights of whatever nature in the Licensed Software
and related documentation, including derivative works, are and shall remain
the exclusive property of Licensor and any third party suppliers. Nothing in
this License should be construed as transferring any aspects of such rights to
Licensee or any third party. Licensor reserves any and all rights not
expressly granted herein. MySQL is a trademark of MySQL AB, and shall not be
used by Licensee without Licensor's express written authorization. Licensee
shall include in the Integrated Products a conspicuous notice that the
Integrated Products include software whose copyright is owned by MySQL AB.
7. Disclaimer of Warranties.
THE LICENSED SOFTWARE IS LICENSED "AS IS," WITHOUT ANY WARRANTIES WHATSOEVER.
LICENSOR EXPRESSLY DISCLAIMS, AND LICENSEE EXPRESSLY WAIVES, ALL WARRANTIES,
WHETHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTIBILITY, FITNESS
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, SYSTEM INTEGRATION,
NON-INTERFERENCE AND ACCURACY OF INFORMATIONAL CONTENT. LICENSOR DOES NOT
WARRANT THAT THE LICENSED SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR THAT
THE OPERATION OF THE LICENSED SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR
THAT ERRORS WILL BE CORRECTED. THE ENTIRE RISK OF THE LICENSED SOFTWARE'S
QUALITY AND PERFORMANCE IS WITH LICENSEE. Without limiting the generality of
the foregoing disclaimer, Licensee acknowledges that the Licensed Software is
not specifically designed, manufactured or intended for use in the planning,
construction, maintenance, control or direct operation of nuclear facilities,
aircraft navigation, control or communication systems, weapons systems or
direct life support systems.
8. Indemnification.
Licensee hereby indemnifies and agrees to defend Licensor against any and all
damages, judgments and costs (including reasonable attorneys' fees) related to
any claim based upon: (a) an allegation that the Licensee Application
infringes the intellectual property of a third party; (b) use of the Licensed
Software in a manner prohibited under this License or in a manner for which
the Licensed Software was not designed; (c) integration or use of the Licensed
Software with the Licensee Application (where use of the Licensed Software
alone would not infringe); (d) changes made by Licensee to the Licensed
Software (where use of unmodified Licensed Software would not infringe); (e)
changes made, or actions taken, by Licensor upon Licensee's direct
instructions; or (f) bodily injury, property damage or any other damage or
injury due to the use or inability to use an Integrated Product.
9. Limitation of Liability.
LICENSOR SHALL HAVE NO LIABILITY WITH RESPECT TO ITS OBLIGATIONS UNDER THIS
AGREEMENT OR OTHERWISE FOR CONSEQUENTIAL, EXEMPLARY, SPECIAL, INDIRECT,
INCIDENTAL OR PUNITIVE DAMAGES, INCLUDING (WITHOUT LIMITATION) ANY LOST
PROFITS OR LOST SAVINGS (WHETHER RESULTING FROM IMPAIRED OR LOST DATA,
SOFTWARE OR COMPUTER FAILURE OR ANY OTHER CAUSE), EVEN IF IT HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES. NOTWITHSTANDING ANY OTHER PROVISION IN
THIS AGREEMENT, THE LIABILITY OF LICENSOR FOR ANY REASON AND UPON ANY CAUSE OF
ACTION SHALL BE LIMITED TO THE AMOUNT PAID TO LICENSOR BY LICENSEE UNDER THIS
AGREEMENT. THIS LIMITATION APPLIES TO ALL CAUSES OF ACTION IN THE AGGREGATE,
INCLUDING (WITHOUT LIMITATION) BREACH OF CONTRACT, BREACH OF WARRANTY,
NEGLIGENCE, MISREPRESENTATIONS AND OTHER TORTS. THE PARTIES AGREE THAT THE
REMEDIES AND LIMITATIONS HEREIN ALLOCATE THE RISKS BETWEEN THE PARTIES AS
AUTHORIZED BY APPLICABLE LAWS. THE LICENSE FEES ARE SET IN RELIANCE UPON THIS
ALLOCATION OF RISK AND THE EXCLUSION OF CERTAIN DAMAGES AS SET FORTH IN THIS
AGREEMENT.
10. Miscellaneous.
10.1 Interpretation.
Failure by Licensor to exercise any right or remedy does not signify
acceptance of the event giving rise to such right or remedy. No action arising
out of this License may be brought by Licensee more than one year after the
cause of action has accrued. If any part of this License is held by a court of
competent jurisdiction to be illegal or unenforceable, the validity or
enforceability of the remainder of this License shall not be affected and such
provision shall be deemed modified to the minimum extent necessary to make
such provision consistent with applicable law and, in its modified form, such
provision shall be enforceable and enforced. Licensor reserves the right not
to accept any Order Form. Any invoice issued by Licensor in connection with
this License shall be deemed a part of this Agreement. To the extent of any
inconsistency between an Order Form and an invoice issued by Licensor, the
terms and conditions of the invoice shall prevail; Licensee shall be deemed to
have accepted an invoice upon payment of such invoice. In the event that
Licensee placed an order by telephone or through an authorized sales
representative, the invoice issued by Licensor shall constitute the Order
Form. The terms and conditions of this Agreement shall replace and serve as a
novation of the terms and conditions of any commercial (i.e., non-GPL) license
purchased online by Licensee prior to August 2002.
10.2 Binding.
This Agreement will be binding upon and inure to the benefit of the parties,
their respective successors and permitted assigns. Except as otherwise
provided in Section 2, without the prior written consent of Licensor, Licensee
may not assign this License or its rights or obligations under this License to
any person or party, whether by operation of law or otherwise; any attempt by
Licensee to assign this License without Licensor's prior written consent shall
be null and void. There are no intended third party beneficiaries of this
License. The parties are, and shall remain, independent contractors; nothing
in this License is designed to create, nor shall create between them, a
partnership, joint venture, agency, or employment relationship.
10.3 Governing Law; Dispute Forum.
If Licensee's residence, principal place of business or place of organization
is in the United States of America ("USA"), then this License shall be deemed
to have been executed in the USA and shall be governed by the laws of the
State of Delaware, without regard to the conflict of laws provisions thereof.
If Licensee's residence, principal place of business or place of organization
is in any country other than the USA, then this License shall be deemed to
have been executed in Sweden and shall be governed by the laws of Sweden,
without regard to the conflict of laws provisions thereof. In no event shall
the United Nations Convention on Contracts for the International Sale of Goods
apply to, or govern, this License. The parties consent to the exclusive
jurisdiction of the courts of Sweden and the USA, as provided in this Section.
In the event that Licensor initiates an action in connection with this License
or any other dispute between the parties, the exclusive jurisdiction of such
action shall be in: (a) Newark, Delaware, if Licensee's residence, principal
place of business or place of organization is in the USA; or (b) Uppsala,
Sweden, if Licensee's residence, principal place of business or place of
organization is in any country other than the USA. In the event that Licensee
initiates an action in connection with this License or any other dispute
between the parties, the exclusive jurisdiction of such action shall be in
Stockholm, Sweden. Notwithstanding the foregoing, either party may bring a
counterclaim in an action in the same jurisdiction in which the originating
claim was filed, and either party may enforce any judgment rendered by such
court in any court of competent jurisdiction. Licensee shall comply at its own
expense with all relevant and applicable laws related to use and distribution
of the Licensed Software as permitted in this License. Notwithstanding the
foregoing, Licensor may seek injunctive or other equitable relief in any
jurisdiction in order to protect its intellectual property rights. The parties
have agreed to execute this License in the English language, and the English
language version of the Agreement will control for all purposes. Any action
brought under this License shall be conducted in the English language.
Licensee shall be responsible for Licensor's attorneys fees and other expenses
associated with the enforcement of this License or the collection of any
amounts due under this License.
10.4 Notice.
Unless otherwise agreed, any notice under this License shall be delivered and
addressed to Licensee at the address set forth on the Order Form, and to
Licensor at Bangardsgatan 8, 753 20, Uppsala, Sweden. Notice shall be deemed
received by any party: (a) on the day given, if personally delivered or if
sent by confirmed facsimile transmission, receipt verified; (b) on the third
day after deposit, if mailed by certified, first class, postage prepaid,
return receipt requested mail, or by reputable, expedited overnight courier;
or (c) on the fifth day after deposit, if sent by reputable, expedited
international courier. Either party may change its address for notice
purposes upon notice in accordance with this Section. Licensor may identify
Licensee as a commercial licensee, including on the MySQL web site.
10.5 GPL.
The GPL License shall continue to apply to any and all uses and distributions
of the Licensed Software undertaken by Licensee either prior to the Effective
Date, after termination, or otherwise outside the scope of this License. This
Agreement shall not be deemed to replace or otherwise amend any Licensee
rights or obligations pursuant to the GPL License with respect to any uses of
the Licensed Software described in the preceding sentence.
10.6 Entire Agreement.
This Agreement (including the Order Form and the invoice) comprises the entire
agreement, and supercedes and merges all prior proposals, understandings and
agreements, oral and written, between the parties relating to the subject
matter of this License. This Agreement may be amended or modified only in a
writing executed by both parties. To the extent of any conflict or
inconsistency between this License and any invoice or other document submitted
by Licensee to Licensor, this License will control. Licensor's acceptance of
any document shall not be construed as an acceptance of provisions which are
in any way in conflict or inconsistent with, or in addition to, this License,
unless such terms are separately and specifically accepted in writing by an
authorized officer of Licensor.
10.7 Print this License.
For record keeping purposes, we encourage Licensee to print this License and
the Order Form on the date that the Order Form is submitted.
...@@ -2,8 +2,9 @@ This is a release of MySQL, a dual-license SQL database server. ...@@ -2,8 +2,9 @@ This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB. MySQL is brought to you by the MySQL team at MySQL AB.
License information can be found in these files: License information can be found in these files:
- For GPL (free) distributions, see the COPYING file. - For GPL (free) distributions, see the COPYING file and
- For commercial distributions, see the MySQLEULA.txt file. the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.
For further information about MySQL or additional documentation, see: For further information about MySQL or additional documentation, see:
...@@ -15,11 +16,10 @@ Some manual sections of special interest: ...@@ -15,11 +16,10 @@ Some manual sections of special interest:
- If you are migrating from an older version of MySQL, please read the - If you are migrating from an older version of MySQL, please read the
"Upgrading from..." section first! "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section. - To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter. - For installation instructions, see the Installing and Upgrading chapter.
- For future plans, see the TODO appendix. - For the new features/bugfix history, see the Change History appendix.
- For the new features/bugfix history, see the News appendix. - For the currently known bugs/misfeatures (known errors) see the Problems
- For the currently known bugs/misfeatures (known errors) see the problems and Common Errors appendix.
appendix.
- For a list of developers and other contributors, see the Credits - For a list of developers and other contributors, see the Credits
appendix. appendix.
......
...@@ -185,7 +185,7 @@ our $opt_fast; ...@@ -185,7 +185,7 @@ our $opt_fast;
our $opt_force; our $opt_force;
our $opt_reorder= 0; our $opt_reorder= 0;
our $opt_enable_disabled; our $opt_enable_disabled;
our $opt_mem; our $opt_mem= $ENV{'MTR_MEM'};
our $opt_gcov; our $opt_gcov;
our $opt_gcov_err; our $opt_gcov_err;
...@@ -743,7 +743,7 @@ sub command_line_setup () { ...@@ -743,7 +743,7 @@ sub command_line_setup () {
# Use /dev/shm as the preferred location for vardir and # Use /dev/shm as the preferred location for vardir and
# thus implicitly also tmpdir. Add other locations to list # thus implicitly also tmpdir. Add other locations to list
my @tmpfs_locations= ("/dev/shm"); my @tmpfs_locations= ($opt_mem, "/dev/shm");
# One could maybe use "mount" to find tmpfs location(s) # One could maybe use "mount" to find tmpfs location(s)
foreach my $fs (@tmpfs_locations) foreach my $fs (@tmpfs_locations)
{ {
...@@ -3369,6 +3369,11 @@ sub mysqld_arguments ($$$$$) { ...@@ -3369,6 +3369,11 @@ sub mysqld_arguments ($$$$$) {
if ( $opt_valgrind_mysqld ) if ( $opt_valgrind_mysqld )
{ {
mtr_add_arg($args, "%s--skip-safemalloc", $prefix); mtr_add_arg($args, "%s--skip-safemalloc", $prefix);
if ( $mysql_version_id < 50100 )
{
mtr_add_arg($args, "%s--skip-bdb", $prefix);
}
} }
my $pidfile; my $pidfile;
...@@ -4649,9 +4654,9 @@ Options to control directories to use ...@@ -4649,9 +4654,9 @@ Options to control directories to use
vardir=DIR The directory where files generated from the test run vardir=DIR The directory where files generated from the test run
is stored (default: ./var). Specifying a ramdisk or is stored (default: ./var). Specifying a ramdisk or
tmpfs will speed up tests. tmpfs will speed up tests.
mem=DIR Run testsuite in "memory" using tmpfs if mem Run testsuite in "memory" using tmpfs if
available(default: /dev/shm) available(default: /dev/shm)
reads path from MTR_MEM environment variable
Options to control what test suites or cases to run Options to control what test suites or cases to run
......
...@@ -182,6 +182,81 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; ...@@ -182,6 +182,81 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
2 2 -2 -2 2 2 -2 -2
select (12%0) <=> null as '1';
1
1
select (12%0) is null as '1';
1
1
select 12%0 as 'NULL';
NULL
NULL
select 12%2 as '0';
0
0
select 12%NULL as 'NULL';
NULL
NULL
select 12 % null as 'NULL';
NULL
NULL
select null % 12 as 'NULL';
NULL
NULL
select null % 0 as 'NULL';
NULL
NULL
select 0 % null as 'NULL';
NULL
NULL
select null % null as 'NULL';
NULL
NULL
select (12 mod 0) <=> null as '1';
1
1
select (12 mod 0) is null as '1';
1
1
select 12 mod 0 as 'NULL';
NULL
NULL
select 12 mod 2 as '0';
0
0
select 12 mod null as 'NULL';
NULL
NULL
select null mod 12 as 'NULL';
NULL
NULL
select null mod 0 as 'NULL';
NULL
NULL
select 0 mod null as 'NULL';
NULL
NULL
select null mod null as 'NULL';
NULL
NULL
select mod(12.0, 0) as 'NULL';
NULL
NULL
select mod(12, 0.0) as 'NULL';
NULL
NULL
select mod(12, NULL) as 'NULL';
NULL
NULL
select mod(12.0, NULL) as 'NULL';
NULL
NULL
select mod(NULL, 2) as 'NULL';
NULL
NULL
select mod(NULL, 2.0) as 'NULL';
NULL
NULL
create table t1 (a int, b int); create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5); insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2; select * from t1 where a not between 1 and 2;
......
...@@ -18,6 +18,7 @@ Success: the process has been started. ...@@ -18,6 +18,7 @@ Success: the process has been started.
Killing the process... Killing the process...
Sleeping... Sleeping...
Success: the process was restarted. Success: the process was restarted.
Success: server is ready to accept connection on socket.
SHOW INSTANCE STATUS mysqld1; SHOW INSTANCE STATUS mysqld1;
instance_name state version_number version mysqld_compatible instance_name state version_number version mysqld_compatible
mysqld1 online VERSION_NUMBER VERSION no mysqld1 online VERSION_NUMBER VERSION no
......
...@@ -47,7 +47,7 @@ drop table t1; ...@@ -47,7 +47,7 @@ drop table t1;
mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error
mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error
mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error
Error when connection to server using SSL:Unable to get private key from '' SSL error: Unable to get private key from ''
mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error
Error when connection to server using SSL:Unable to get certificate from '' SSL error: Unable to get certificate from ''
mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error
...@@ -108,6 +108,40 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; ...@@ -108,6 +108,40 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
#
# Bug#23411: The "%" (MOD) operator is not documented; MOD-ing zero returns strange result
# Manual: "Division by zero produces a NULL result"
#
select (12%0) <=> null as '1';
select (12%0) is null as '1';
select 12%0 as 'NULL';
select 12%2 as '0';
select 12%NULL as 'NULL';
select 12 % null as 'NULL';
select null % 12 as 'NULL';
select null % 0 as 'NULL';
select 0 % null as 'NULL';
select null % null as 'NULL';
select (12 mod 0) <=> null as '1';
select (12 mod 0) is null as '1';
select 12 mod 0 as 'NULL';
select 12 mod 2 as '0';
select 12 mod null as 'NULL';
select null mod 12 as 'NULL';
select null mod 0 as 'NULL';
select 0 mod null as 'NULL';
select null mod null as 'NULL';
select mod(12.0, 0) as 'NULL';
select mod(12, 0.0) as 'NULL';
select mod(12, NULL) as 'NULL';
select mod(12.0, NULL) as 'NULL';
select mod(NULL, 2) as 'NULL';
select mod(NULL, 2.0) as 'NULL';
#
# Bug#6726: NOT BETWEEN parse failure # Bug#6726: NOT BETWEEN parse failure
# #
create table t1 (a int, b int); create table t1 (a int, b int);
......
...@@ -46,10 +46,13 @@ START INSTANCE mysqld2; ...@@ -46,10 +46,13 @@ START INSTANCE mysqld2;
# FIXME: START INSTANCE should be synchronous. # FIXME: START INSTANCE should be synchronous.
--exec $MYSQL_TEST_DIR/t/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started --exec $MYSQL_TEST_DIR/t/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started
# 2. Restart IM-main: kill it and IM-angel will restart it. # 2. Restart IM-main: kill it and IM-angel will restart it; wait for IM to
# start accepting connections again.
--exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_PATH_PID restarted 30 --exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_PATH_PID restarted 30
--exec $MYSQL_TEST_DIR/t/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 30
# 3. Issue some statement -- connection should be re-established. # 3. Issue some statement -- connection should be re-established.
# Give some time to begin accepting connections after restart. # Give some time to begin accepting connections after restart.
......
...@@ -123,7 +123,7 @@ copyfileto() ...@@ -123,7 +123,7 @@ copyfileto()
copyfileto $BASE/docs ChangeLog Docs/mysql.info copyfileto $BASE/docs ChangeLog Docs/mysql.info
copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \ copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \
EXCEPTIONS-CLIENT MySQLEULA.txt LICENSE.doc README.NW EXCEPTIONS-CLIENT LICENSE.mysql
# Non platform-specific bin dir files: # Non platform-specific bin dir files:
BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
...@@ -308,10 +308,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then ...@@ -308,10 +308,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then
$BASE/support-files/build-tags \ $BASE/support-files/build-tags \
$BASE/support-files/MySQL-shared-compat.spec \ $BASE/support-files/MySQL-shared-compat.spec \
$BASE/support-files/ndb-config-2-node.ini \ $BASE/support-files/ndb-config-2-node.ini \
$BASE/INSTALL-BINARY \ $BASE/INSTALL-BINARY
$BASE/MySQLEULA.txt
else
rm -f $BASE/README.NW
fi fi
# Make safe_mysqld a symlink to mysqld_safe for backwards portability # Make safe_mysqld a symlink to mysqld_safe for backwards portability
......
...@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin) ...@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
case SHOW_OPTION_YES: case SHOW_OPTION_YES:
if (installed_htons[hton->db_type] == hton) if (installed_htons[hton->db_type] == hton)
installed_htons[hton->db_type]= NULL; installed_htons[hton->db_type]= NULL;
if (hton->panic && hton->panic(hton, HA_PANIC_CLOSE))
DBUG_RETURN(1);
break; break;
}; };
if (hton->panic)
hton->panic(hton, HA_PANIC_CLOSE);
if (plugin->plugin->deinit) if (plugin->plugin->deinit)
{ {
/* /*
...@@ -509,31 +510,22 @@ int ha_init() ...@@ -509,31 +510,22 @@ int ha_init()
DBUG_RETURN(error); DBUG_RETURN(error);
} }
/* int ha_end()
close, flush or restart databases
Ignore this for other databases than ours
*/
static my_bool panic_handlerton(THD *unused1, st_plugin_int *plugin, void *arg)
{ {
handlerton *hton= (handlerton *)plugin->data; int error= 0;
if (hton->state == SHOW_OPTION_YES && hton->panic) DBUG_ENTER("ha_end");
((int*)arg)[0]|= hton->panic(hton, (enum ha_panic_function)((int*)arg)[1]);
return FALSE;
}
int ha_panic(enum ha_panic_function flag)
{
int error[2];
error[0]= 0; error[1]= (int)flag; /*
plugin_foreach(NULL, panic_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, error); This should be eventualy based on the graceful shutdown flag.
So if flag is equal to HA_PANIC_CLOSE, the deallocate
the errors.
*/
if (ha_finish_errors())
error= 1;
if (flag == HA_PANIC_CLOSE && ha_finish_errors()) DBUG_RETURN(error);
error[0]= 1; }
return error[0];
} /* ha_panic */
static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin,
void *path) void *path)
......
...@@ -1658,6 +1658,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) ...@@ -1658,6 +1658,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
/* basic stuff */ /* basic stuff */
int ha_init(void); int ha_init(void);
int ha_end(void);
int ha_initialize_handlerton(st_plugin_int *plugin); int ha_initialize_handlerton(st_plugin_int *plugin);
int ha_finalize_handlerton(st_plugin_int *plugin); int ha_finalize_handlerton(st_plugin_int *plugin);
......
...@@ -105,7 +105,7 @@ Item_func::Item_func(THD *thd, Item_func *item) ...@@ -105,7 +105,7 @@ Item_func::Item_func(THD *thd, Item_func *item)
/* /*
Resolve references to table column for a function and it's argument Resolve references to table column for a function and its argument
SYNOPSIS: SYNOPSIS:
fix_fields() fix_fields()
...@@ -1397,6 +1397,13 @@ void Item_func_mod::result_precision() ...@@ -1397,6 +1397,13 @@ void Item_func_mod::result_precision()
} }
void Item_func_mod::fix_length_and_dec()
{
Item_num_op::fix_length_and_dec();
maybe_null= 1;
}
double Item_func_neg::real_op() double Item_func_neg::real_op()
{ {
double value= args[0]->val_real(); double value= args[0]->val_real();
......
...@@ -434,6 +434,7 @@ class Item_func_mod :public Item_num_op ...@@ -434,6 +434,7 @@ class Item_func_mod :public Item_num_op
my_decimal *decimal_op(my_decimal *); my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "%"; } const char *func_name() const { return "%"; }
void result_precision(); void result_precision();
void fix_length_and_dec();
}; };
......
...@@ -372,7 +372,6 @@ extern longlong innobase_log_file_size; ...@@ -372,7 +372,6 @@ extern longlong innobase_log_file_size;
extern long innobase_log_buffer_size; extern long innobase_log_buffer_size;
extern longlong innobase_buffer_pool_size; extern longlong innobase_buffer_pool_size;
extern long innobase_additional_mem_pool_size; extern long innobase_additional_mem_pool_size;
extern long innobase_buffer_pool_awe_mem_mb;
extern long innobase_file_io_threads, innobase_lock_wait_timeout; extern long innobase_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery; extern long innobase_force_recovery;
extern long innobase_open_files; extern long innobase_open_files;
...@@ -1187,7 +1186,6 @@ void clean_up(bool print_message) ...@@ -1187,7 +1186,6 @@ void clean_up(bool print_message)
item_create_cleanup(); item_create_cleanup();
set_var_free(); set_var_free();
free_charsets(); free_charsets();
(void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */
if (!opt_noacl) if (!opt_noacl)
{ {
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
...@@ -1195,6 +1193,7 @@ void clean_up(bool print_message) ...@@ -1195,6 +1193,7 @@ void clean_up(bool print_message)
#endif #endif
} }
plugin_shutdown(); plugin_shutdown();
ha_end();
if (tc_log) if (tc_log)
tc_log->close(); tc_log->close();
xid_cache_free(); xid_cache_free();
...@@ -5801,10 +5800,6 @@ log and this option does nothing anymore.", ...@@ -5801,10 +5800,6 @@ log and this option does nothing anymore.",
(gptr*) &srv_auto_extend_increment, (gptr*) &srv_auto_extend_increment,
(gptr*) &srv_auto_extend_increment, (gptr*) &srv_auto_extend_increment,
0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0}, 0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0},
{"innodb_buffer_pool_awe_mem_mb", OPT_INNODB_BUFFER_POOL_AWE_MEM_MB,
"If Windows AWE is used, the size of InnoDB buffer pool allocated from the AWE memory.",
(gptr*) &innobase_buffer_pool_awe_mem_mb, (gptr*) &innobase_buffer_pool_awe_mem_mb, 0,
GET_LONG, REQUIRED_ARG, 0, 0, 63000, 0, 1, 0},
{"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE, {"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
(gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0, (gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0,
...@@ -8167,7 +8162,6 @@ longlong innobase_log_file_size; ...@@ -8167,7 +8162,6 @@ longlong innobase_log_file_size;
long innobase_log_buffer_size; long innobase_log_buffer_size;
longlong innobase_buffer_pool_size; longlong innobase_buffer_pool_size;
long innobase_additional_mem_pool_size; long innobase_additional_mem_pool_size;
long innobase_buffer_pool_awe_mem_mb;
long innobase_file_io_threads, innobase_lock_wait_timeout; long innobase_file_io_threads, innobase_lock_wait_timeout;
long innobase_force_recovery; long innobase_force_recovery;
long innobase_open_files; long innobase_open_files;
......
...@@ -67,7 +67,6 @@ extern longlong innobase_log_file_size; ...@@ -67,7 +67,6 @@ extern longlong innobase_log_file_size;
extern long innobase_log_buffer_size; extern long innobase_log_buffer_size;
extern longlong innobase_buffer_pool_size; extern longlong innobase_buffer_pool_size;
extern long innobase_additional_mem_pool_size; extern long innobase_additional_mem_pool_size;
extern long innobase_buffer_pool_awe_mem_mb;
extern long innobase_file_io_threads, innobase_lock_wait_timeout; extern long innobase_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery; extern long innobase_force_recovery;
extern long innobase_open_files; extern long innobase_open_files;
...@@ -819,7 +818,6 @@ SHOW_VAR init_vars[]= { ...@@ -819,7 +818,6 @@ SHOW_VAR init_vars[]= {
#ifdef WITH_INNOBASE_STORAGE_ENGINE #ifdef WITH_INNOBASE_STORAGE_ENGINE
{"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG }, {"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG },
{sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment, SHOW_SYS}, {sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment, SHOW_SYS},
{"innodb_buffer_pool_awe_mem_mb", (char*) &innobase_buffer_pool_awe_mem_mb, SHOW_LONG },
{"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG }, {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG },
{"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL}, {"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL},
{sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS}, {sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS},
......
...@@ -2618,9 +2618,21 @@ improper_arguments: %d timed_out: %d", ...@@ -2618,9 +2618,21 @@ improper_arguments: %d timed_out: %d",
void set_slave_thread_options(THD* thd) void set_slave_thread_options(THD* thd)
{ {
DBUG_ENTER("set_slave_thread_options"); DBUG_ENTER("set_slave_thread_options");
/*
thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | It's nonsense to constrain the slave threads with max_join_size; if a
OPTION_AUTO_IS_NULL; query succeeded on master, we HAVE to execute it. So set
OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough
(and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT
SELECT examining more than 4 billion rows would still fail (yes, because
when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but
only for client threads.
*/
ulonglong options= thd->options | OPTION_BIG_SELECTS;
if (opt_log_slave_updates)
options|= OPTION_BIN_LOG;
else
options&= ~OPTION_BIN_LOG;
thd->options= options;
thd->variables.completion_type= 0; thd->variables.completion_type= 0;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -2654,17 +2666,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) ...@@ -2654,17 +2666,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd->net.read_timeout = slave_net_timeout; thd->net.read_timeout = slave_net_timeout;
thd->slave_thread = 1; thd->slave_thread = 1;
set_slave_thread_options(thd); set_slave_thread_options(thd);
/*
It's nonsense to constrain the slave threads with max_join_size; if a
query succeeded on master, we HAVE to execute it. So set
OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough
(and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT
SELECT examining more than 4 billion rows would still fail (yes, because
when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but
only for client threads.
*/
thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) |
OPTION_AUTO_IS_NULL | OPTION_BIG_SELECTS;
thd->client_capabilities = CLIENT_LOCAL_FILES; thd->client_capabilities = CLIENT_LOCAL_FILES;
thd->real_id=pthread_self(); thd->real_id=pthread_self();
pthread_mutex_lock(&LOCK_thread_count); pthread_mutex_lock(&LOCK_thread_count);
......
...@@ -86,8 +86,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) ...@@ -86,8 +86,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
{ {
DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file)); DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file));
/* FIX stderr */ fprintf(stderr,"SSL error: ");
fprintf(stderr,"Error when connection to server using SSL:");
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file); fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file);
fflush(stderr); fflush(stderr);
...@@ -100,8 +99,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) ...@@ -100,8 +99,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0)
{ {
DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file)); DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file));
/* FIX stderr */ fprintf(stderr,"SSL error: ");
fprintf(stderr,"Error when connection to server using SSL:");
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
fprintf(stderr,"Unable to get private key from '%s'\n", key_file); fprintf(stderr,"Unable to get private key from '%s'\n", key_file);
fflush(stderr); fflush(stderr);
...@@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("failed to set ciphers to use")); DBUG_PRINT("error", ("failed to set ciphers to use"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed")); DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("vio_set_cert_stuff failed")); DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment