Commit dc78539f authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-4.0/

into serg.mylan:/usr/home/serg/Abk/mysql-4.0
parents 6f4733a9 a422f163
...@@ -29,6 +29,7 @@ dellis@goetia.(none) ...@@ -29,6 +29,7 @@ dellis@goetia.(none)
dlenev@brandersnatch.localdomain dlenev@brandersnatch.localdomain
dlenev@build.mysql.com dlenev@build.mysql.com
dlenev@mysql.com dlenev@mysql.com
gbichot@quadxeon.mysql.com
gerberb@ou800.zenez.com gerberb@ou800.zenez.com
gluh@gluh.(none) gluh@gluh.(none)
gluh@gluh.mysql.r18.ru gluh@gluh.mysql.r18.ru
...@@ -109,9 +110,11 @@ nick@mysql.com ...@@ -109,9 +110,11 @@ nick@mysql.com
nick@nick.leippe.com nick@nick.leippe.com
patg@krsna.patg.net patg@krsna.patg.net
paul@central.snake.net paul@central.snake.net
paul@frost.snake.net
paul@ice.local paul@ice.local
paul@ice.snake.net paul@ice.snake.net
paul@kite-hub.kitebird.com paul@kite-hub.kitebird.com
paul@snake-hub.snake.net
paul@teton.kitebird.com paul@teton.kitebird.com
pem@mysql.com pem@mysql.com
peter@linux.local peter@linux.local
......
...@@ -617,16 +617,20 @@ sub abort ...@@ -617,16 +617,20 @@ sub abort
if ($opt_user) if ($opt_user)
{ {
$mail_header_file="$opt_tmp/do-command.$$"; # Take the last 40 lines of the build log
open(TMP,">$mail_header_file"); open(LOG, "$log") or die $!;
my @log= <LOG>;
close LOG;
splice @log => 0, -40;
my $mail_file="$opt_tmp/do-command.$$";
open(TMP,">$mail_file") or die $!;
print TMP "From: mysqldev\@$full_host_name\n"; print TMP "From: mysqldev\@$full_host_name\n";
print TMP "To: $email\n"; print TMP "To: $email\n";
print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n"; print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n";
print TMP @log;
close TMP; close TMP;
system("tail -n 40 $log > $log.mail"); system("$sendmail -t -f $email < $mail_file");
system("cat $mail_header_file $log.mail | $sendmail -t -f $email"); unlink($mail_file);
unlink($mail_header_file);
unlink("$log.mail");
} }
exit 1; exit 1;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--
This is a dummy changelog file. Don't use it yet.
It merges upward without conflict.
-->
<appendix id="news-4-0-x">
<title>
Changes in release 4.0.x
</title>
<para>
This is a dummy changelog file. Don't use it yet.
</para>
</appendix>
...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. ...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc) AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 4.0.24) AM_INIT_AUTOMAKE(mysql, 4.0.25)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
......
...@@ -639,7 +639,7 @@ dict_load_table( ...@@ -639,7 +639,7 @@ dict_load_table(
/* Check if the table name in record is the searched one */ /* Check if the table name in record is the searched one */
if (len != ut_strlen(name) || ut_memcmp(name, field, len) != 0) { if (len != ut_strlen(name) || ut_memcmp(name, field, len) != 0) {
err_exit:
btr_pcur_close(&pcur); btr_pcur_close(&pcur);
mtr_commit(&mtr); mtr_commit(&mtr);
mem_heap_free(heap); mem_heap_free(heap);
...@@ -647,22 +647,6 @@ dict_load_table( ...@@ -647,22 +647,6 @@ dict_load_table(
return(NULL); return(NULL);
} }
#if MYSQL_VERSION_ID < 50300
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
"compact format" flag. */
field = rec_get_nth_field(rec, 7, &len);
if (mach_read_from_1(field) & 0x80) {
btr_pcur_close(&pcur);
mtr_commit(&mtr);
mem_heap_free(heap);
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: table %s is in the new compact format\n"
"InnoDB: of MySQL 5.0.3 or later\n", name);
return(NULL);
}
#endif /* MYSQL_VERSION_ID < 50300 */
ut_a(0 == ut_strcmp((char *) "SPACE", ut_a(0 == ut_strcmp((char *) "SPACE",
dict_field_get_col( dict_field_get_col(
dict_index_get_nth_field( dict_index_get_nth_field(
...@@ -678,6 +662,13 @@ dict_load_table( ...@@ -678,6 +662,13 @@ dict_load_table(
field = rec_get_nth_field(rec, 4, &len); field = rec_get_nth_field(rec, 4, &len);
n_cols = mach_read_from_4(field); n_cols = mach_read_from_4(field);
if (n_cols & 0x80000000UL) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: table %s is in the new compact format\n"
"InnoDB: of MySQL 5.0.3 or later\n", name);
goto err_exit;
}
table = dict_mem_table_create(name, space, n_cols); table = dict_mem_table_create(name, space, n_cols);
......
...@@ -101,6 +101,7 @@ extern ibool srv_use_doublewrite_buf; ...@@ -101,6 +101,7 @@ extern ibool srv_use_doublewrite_buf;
extern ibool srv_set_thread_priorities; extern ibool srv_set_thread_priorities;
extern int srv_query_thread_priority; extern int srv_query_thread_priority;
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag; extern ulong srv_max_purge_lag;
/*-------------------------------------------*/ /*-------------------------------------------*/
......
...@@ -346,6 +346,12 @@ struct trx_struct{ ...@@ -346,6 +346,12 @@ struct trx_struct{
in MySQL's binlog write, we will in MySQL's binlog write, we will
flush the log to disk later in flush the log to disk later in
a separate call */ a separate call */
ibool must_flush_log_later;/* this flag is set to TRUE in
trx_commit_off_kernel() if
flush_log_later was TRUE, and there
were modifications by the transaction;
in that case we must flush the log
in trx_commit_complete_for_mysql() */
dulint commit_lsn; /* lsn at the time of the commit */ dulint commit_lsn; /* lsn at the time of the commit */
ibool dict_operation; /* TRUE if the trx is used to create ibool dict_operation; /* TRUE if the trx is used to create
a table, create an index, or drop a a table, create an index, or drop a
......
...@@ -165,7 +165,7 @@ in the buffer pool to all database pages in the buffer pool smaller than ...@@ -165,7 +165,7 @@ in the buffer pool to all database pages in the buffer pool smaller than
the following number. But it is not guaranteed that the value stays below the following number. But it is not guaranteed that the value stays below
that during a time of heavy update/insert activity. */ that during a time of heavy update/insert activity. */
ulint srv_max_buf_pool_modified_pct = 90; ulong srv_max_buf_pool_modified_pct = 90;
/* If the following is != 0 we do not allow inserts etc. This protects /* If the following is != 0 we do not allow inserts etc. This protects
the user from forgetting the innodb_force_recovery keyword to my.cnf */ the user from forgetting the innodb_force_recovery keyword to my.cnf */
......
...@@ -96,6 +96,7 @@ trx_create( ...@@ -96,6 +96,7 @@ trx_create(
trx->check_unique_secondary = TRUE; trx->check_unique_secondary = TRUE;
trx->flush_log_later = FALSE; trx->flush_log_later = FALSE;
trx->must_flush_log_later = FALSE;
trx->dict_operation = FALSE; trx->dict_operation = FALSE;
...@@ -635,6 +636,8 @@ trx_commit_off_kernel( ...@@ -635,6 +636,8 @@ trx_commit_off_kernel(
rseg = trx->rseg; rseg = trx->rseg;
trx->must_flush_log_later = FALSE;
if (trx->insert_undo != NULL || trx->update_undo != NULL) { if (trx->insert_undo != NULL || trx->update_undo != NULL) {
mutex_exit(&kernel_mutex); mutex_exit(&kernel_mutex);
...@@ -798,6 +801,7 @@ trx_commit_off_kernel( ...@@ -798,6 +801,7 @@ trx_commit_off_kernel(
if (trx->flush_log_later) { if (trx->flush_log_later) {
/* Do nothing yet */ /* Do nothing yet */
trx->must_flush_log_later = TRUE;
} else if (srv_flush_log_at_trx_commit == 0) { } else if (srv_flush_log_at_trx_commit == 0) {
/* Do nothing */ /* Do nothing */
} else if (srv_flush_log_at_trx_commit == 1) { } else if (srv_flush_log_at_trx_commit == 1) {
...@@ -1516,7 +1520,9 @@ trx_commit_complete_for_mysql( ...@@ -1516,7 +1520,9 @@ trx_commit_complete_for_mysql(
trx->op_info = (char*)"flushing log"; trx->op_info = (char*)"flushing log";
if (srv_flush_log_at_trx_commit == 0) { if (!trx->must_flush_log_later) {
/* Do nothing */
} if (srv_flush_log_at_trx_commit == 0) {
/* Do nothing */ /* Do nothing */
} else if (srv_flush_log_at_trx_commit == 1) { } else if (srv_flush_log_at_trx_commit == 1) {
if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
...@@ -1538,6 +1544,8 @@ trx_commit_complete_for_mysql( ...@@ -1538,6 +1544,8 @@ trx_commit_complete_for_mysql(
ut_error; ut_error;
} }
trx->must_flush_log_later = FALSE;
trx->op_info = (char*)""; trx->op_info = (char*)"";
return(0); return(0);
......
...@@ -130,7 +130,7 @@ replace(1) ...@@ -130,7 +130,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -87,7 +87,7 @@ replace(1) ...@@ -87,7 +87,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
......
...@@ -107,7 +107,7 @@ version number and exit. ...@@ -107,7 +107,7 @@ version number and exit.
Wait and retry if the database server connection is down. Wait and retry if the database server connection is down.
.SH FILES .SH FILES
.TP 2.2i .TP 2.2i
.I @sysconfdir@/my.cnf .I /etc/my.cnf
MySQL configuration file MySQL configuration file
.TP .TP
.I @bindir@/mysql .I @bindir@/mysql
...@@ -145,7 +145,7 @@ replace(1) ...@@ -145,7 +145,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -30,7 +30,7 @@ replace(1) ...@@ -30,7 +30,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -44,7 +44,7 @@ replace(1) ...@@ -44,7 +44,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -110,7 +110,7 @@ replace(1) ...@@ -110,7 +110,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -194,7 +194,7 @@ replace(1) ...@@ -194,7 +194,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -219,7 +219,7 @@ replace(1) ...@@ -219,7 +219,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -74,7 +74,7 @@ replace(1) ...@@ -74,7 +74,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
......
...@@ -76,7 +76,7 @@ replace(1) ...@@ -76,7 +76,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -263,7 +263,7 @@ replace(1) ...@@ -263,7 +263,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -9,7 +9,7 @@ In most cases, you can run the executable from the command line with a "--help" ...@@ -9,7 +9,7 @@ In most cases, you can run the executable from the command line with a "--help"
argument to display a brief summary of the executable's arguments and function. argument to display a brief summary of the executable's arguments and function.
For more information about MySQL, please refer to the MySQL reference manual, For more information about MySQL, please refer to the MySQL reference manual,
which may already be installed locally and which is also available online at which may already be installed locally and which is also available online at
http://dev.mysql.com/doc/ http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.\" end of man page .\" end of man page
...@@ -83,7 +83,7 @@ replace(1) ...@@ -83,7 +83,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -43,7 +43,7 @@ replace(1) ...@@ -43,7 +43,7 @@ replace(1)
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -57,7 +57,7 @@ perror(1), ...@@ -57,7 +57,7 @@ perror(1),
.P .P
For more information please refer to the MySQL reference For more information please refer to the MySQL reference
manual, which may already be installed locally and which manual, which may already be installed locally and which
is also available online at http://www.mysql.com/doc/en/ is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS .SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs. Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR .SH AUTHOR
......
...@@ -304,3 +304,18 @@ QUOTE('A') ...@@ -304,3 +304,18 @@ QUOTE('A')
'A' 'A'
'A' 'A'
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (id int PRIMARY KEY, str char(255) NOT NULL);
CREATE TABLE t2 (id int NOT NULL UNIQUE);
INSERT INTO t2 VALUES (1),(2);
INSERT INTO t1 VALUES (1, aes_encrypt('foo', 'bar'));
INSERT INTO t1 VALUES (2, 'not valid');
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
ORDER BY t1.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
DROP TABLE t1, t2;
...@@ -684,3 +684,23 @@ t1 ALL NULL NULL NULL NULL 3 ...@@ -684,3 +684,23 @@ t1 ALL NULL NULL NULL NULL 3
t2 ALL NULL NULL NULL NULL 2 t2 ALL NULL NULL NULL NULL 2
t3 ALL NULL NULL NULL NULL 2 t3 ALL NULL NULL NULL NULL 2
drop table t1, t2, t3; drop table t1, t2, t3;
create table t1 (
a int(11),
b char(10),
key (a)
);
insert into t1 (a) values (1),(2),(3),(4);
create table t2 (a int);
select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a);
a b a
1 NULL NULL
2 NULL NULL
3 NULL NULL
4 NULL NULL
select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a);
a b a
1 NULL NULL
2 NULL NULL
3 NULL NULL
4 NULL NULL
drop table t1,t2;
...@@ -209,3 +209,10 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20); ...@@ -209,3 +209,10 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1"; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1";
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10;
drop table t1, t2; drop table t1, t2;
create table t1 (a int, b char(255), key(a, b(20)));
insert into t1 values (0, '1');
update t1 set b = b + 1 where a = 0;
select * from t1;
a b
0 2
drop table t1;
...@@ -198,3 +198,20 @@ select quote(trim(concat(' ', 'a'))); ...@@ -198,3 +198,20 @@ select quote(trim(concat(' ', 'a')));
CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3; CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3;
SELECT QUOTE('A') FROM t1; SELECT QUOTE('A') FROM t1;
DROP TABLE t1; DROP TABLE t1;
#
# Test case for bug #8669: null aes_decrypt result in order by query
#
CREATE TABLE t1 (id int PRIMARY KEY, str char(255) NOT NULL);
CREATE TABLE t2 (id int NOT NULL UNIQUE);
INSERT INTO t2 VALUES (1),(2);
INSERT INTO t1 VALUES (1, aes_encrypt('foo', 'bar'));
INSERT INTO t1 VALUES (2, 'not valid');
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id;
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
ORDER BY t1.id;
DROP TABLE t1, t2;
...@@ -450,3 +450,16 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is ...@@ -450,3 +450,16 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is
explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null;
drop table t1, t2, t3; drop table t1, t2, t3;
# Test for BUG#8711 '<=>' was considered to be a NULL-rejecting predicate.
create table t1 (
a int(11),
b char(10),
key (a)
);
insert into t1 (a) values (1),(2),(3),(4);
create table t2 (a int);
select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a);
select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a);
drop table t1,t2;
...@@ -164,3 +164,13 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20); ...@@ -164,3 +164,13 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1"; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1";
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10;
drop table t1, t2; drop table t1, t2;
#
# Bug #8942: a problem with update and partial key part
#
create table t1 (a int, b char(255), key(a, b(20)));
insert into t1 values (0, '1');
update t1 set b = b + 1 where a = 0;
select * from t1;
drop table t1;
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
export MYDEV="F:/mydev" export MYDEV="F:/mydev"
export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/fs64/headers;$MYDEV/zlib-1.1.4;$MYDEV" export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/fs64/headers;$MYDEV/zlib-1.1.4;$MYDEV"
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/fs64/imports;$MYDEV/zlib-1.1.4;$MYDEV/mysql-4.0.21/netware/BUILD" export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/fs64/imports;$MYDEV/zlib-1.1.4;$MYDEV/mysql-VERSION/netware/BUILD"
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a;neb.imp;zPublics.imp;knetware.imp" export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a;neb.imp;zPublics.imp;knetware.imp"
export WINEPATH="$MYDEV/mw/bin" export WINEPATH="$MYDEV/mw/bin"
# the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD" # the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD"
export PATH="$PATH:/home/kp/mydev/mysql-4.0.21/netware/BUILD" export PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
export AR='mwldnlm' export AR='mwldnlm'
export AR_FLAGS='-type library -o' export AR_FLAGS='-type library -o'
......
...@@ -78,6 +78,7 @@ class Item_func_equal :public Item_bool_func2 ...@@ -78,6 +78,7 @@ class Item_func_equal :public Item_bool_func2
Item_func_equal(Item *a,Item *b) :Item_bool_func2(a,b) { }; Item_func_equal(Item *a,Item *b) :Item_bool_func2(a,b) { };
longlong val_int(); longlong val_int();
void fix_length_and_dec(); void fix_length_and_dec();
table_map not_null_tables() const { return 0; }
enum Functype functype() const { return EQUAL_FUNC; } enum Functype functype() const { return EQUAL_FUNC; }
enum Functype rev_functype() const { return EQUAL_FUNC; } enum Functype rev_functype() const { return EQUAL_FUNC; }
cond_result eq_cmp_result() const { return COND_TRUE; } cond_result eq_cmp_result() const { return COND_TRUE; }
......
...@@ -208,6 +208,7 @@ String *Item_func_aes_decrypt::val_str(String *str) ...@@ -208,6 +208,7 @@ String *Item_func_aes_decrypt::val_str(String *str)
void Item_func_aes_decrypt::fix_length_and_dec() void Item_func_aes_decrypt::fix_length_and_dec()
{ {
max_length=args[0]->max_length; max_length=args[0]->max_length;
maybe_null= 1;
} }
...@@ -1465,7 +1466,8 @@ Item_func_format::Item_func_format(Item *org,int dec) :Item_str_func(org) ...@@ -1465,7 +1466,8 @@ Item_func_format::Item_func_format(Item *org,int dec) :Item_str_func(org)
String *Item_func_format::val_str(String *str) String *Item_func_format::val_str(String *str)
{ {
double nr =args[0]->val(); double nr =args[0]->val();
uint32 diff,length,str_length; uint32 length,str_length;
int diff;
uint dec; uint dec;
if ((null_value=args[0]->null_value)) if ((null_value=args[0]->null_value))
return 0; /* purecov: inspected */ return 0; /* purecov: inspected */
...@@ -1483,17 +1485,17 @@ String *Item_func_format::val_str(String *str) ...@@ -1483,17 +1485,17 @@ String *Item_func_format::val_str(String *str)
if (str_length >= dec+4) if (str_length >= dec+4)
{ {
char *tmp,*pos; char *tmp,*pos;
length= str->length()+(diff=(str_length- dec-1)/3); length= str->length()+(diff= (int)(str_length- dec-1)/3);
str= copy_if_not_alloced(&tmp_str,str,length); str= copy_if_not_alloced(&tmp_str,str,length);
str->length(length); str->length(length);
tmp= (char*) str->ptr()+length - dec-1; tmp= (char*) str->ptr()+length - dec-1;
for (pos= (char*) str->ptr()+length-1; pos != tmp; pos--) for (pos= (char*) str->ptr()+length-1; pos != tmp; pos--)
pos[0]= pos[-(int) diff]; pos[0]= pos[-diff];
while (diff) while (diff)
{ {
pos[0]=pos[-(int) diff]; pos--; pos[0]=pos[-diff]; pos--;
pos[0]=pos[-(int) diff]; pos--; pos[0]=pos[-diff]; pos--;
pos[0]=pos[-(int) diff]; pos--; pos[0]=pos[-diff]; pos--;
pos[0]=','; pos[0]=',';
pos--; pos--;
diff--; diff--;
......
...@@ -265,7 +265,7 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) ...@@ -265,7 +265,7 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields)
f.rewind(); f.rewind();
while ((field=(Item_field*) f++)) while ((field=(Item_field*) f++))
{ {
if (key_part->field == field->field) if (key_part->field->eq(field->field))
return 1; return 1;
} }
} }
......
...@@ -2360,7 +2360,9 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -2360,7 +2360,9 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
strmov(p, ".info"); // strmov takes less code than memcpy strmov(p, ".info"); // strmov takes less code than memcpy
strnmov(proc_info, "Making temp file ", 17); // no end 0 strnmov(proc_info, "Making temp file ", 17); // no end 0
thd->proc_info= proc_info; thd->proc_info= proc_info;
if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC, my_delete(fname_buf, MYF(0)); // old copy may exist already
if ((fd= my_create(fname_buf, CREATE_MODE,
O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
MYF(MY_WME))) < 0 || MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0, init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP))) MYF(MY_WME|MY_NABP)))
...@@ -2383,7 +2385,9 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -2383,7 +2385,9 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
my_close(fd, MYF(0)); my_close(fd, MYF(0));
// fname_buf now already has .data, not .info, because we did our trick // fname_buf now already has .data, not .info, because we did our trick
if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC, my_delete(fname_buf, MYF(0)); // old copy may exist already
if ((fd= my_create(fname_buf, CREATE_MODE,
O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
MYF(MY_WME))) < 0) MYF(MY_WME))) < 0)
{ {
slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf); slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf);
...@@ -2426,7 +2430,7 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -2426,7 +2430,7 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli)
memcpy(p, ".data", 6); memcpy(p, ".data", 6);
strnmov(proc_info, "Making temp file ", 17); // no end 0 strnmov(proc_info, "Making temp file ", 17); // no end 0
thd->proc_info= proc_info; thd->proc_info= proc_info;
if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY, MYF(MY_WME))) < 0) if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0)
{ {
slave_print_error(rli,my_errno, "Error in Append_block event: could not open file '%s'", fname); slave_print_error(rli,my_errno, "Error in Append_block event: could not open file '%s'", fname);
goto err; goto err;
...@@ -2455,7 +2459,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli) ...@@ -2455,7 +2459,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
Load_log_event* lev = 0; Load_log_event* lev = 0;
memcpy(p, ".info", 6); memcpy(p, ".info", 6);
if ((fd = my_open(fname, O_RDONLY|O_BINARY, MYF(MY_WME))) < 0 || if ((fd = my_open(fname, O_RDONLY|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0, init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP))) MYF(MY_WME|MY_NABP)))
{ {
......
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