Commit 32f539f1 authored by unknown's avatar unknown

Merge lgrimmer@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/space/my/mysql-4.1
parents 119a985b 644d1dbe
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# This file is public domain and comes with NO WARRANTY of any kind # This file is public domain and comes with NO WARRANTY of any kind
#AUTOMAKE_OPTIONS = nostdinc #AUTOMAKE_OPTIONS = nostdinc
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes) -I$(top_srcdir)/regex $(openssl_includes)
LIBS = @CLIENT_LIBS@ LIBS = @CLIENT_LIBS@
LDADD= @CLIENT_EXTRA_LDFLAGS@ \ LDADD= @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql/libmysqlclient.la $(top_builddir)/libmysql/libmysqlclient.la
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
ASRC=vi.c emacs.c common.c ASRC=vi.c emacs.c common.c
AHDR=vi.h emacs.h common.h AHDR=vi.h emacs.h common.h
INCLUDES = -I$(top_srcdir)/include -I$(srcdir)/../.. -I.. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(srcdir)/../.. -I..
noinst_LIBRARIES = libedit.a noinst_LIBRARIES = libedit.a
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# Copyright (C) 1994,1996,1997 Free Software Foundation, Inc. # Copyright (C) 1994,1996,1997 Free Software Foundation, Inc.
# Last -I$(top_srcdir) needed for RedHat! # Last -I$(top_srcdir) needed for RedHat!
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)
noinst_LIBRARIES = libreadline.a noinst_LIBRARIES = libreadline.a
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA # MA 02111-1307, USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = libdbug.a ../strings/libmystrings.a LDADD = libdbug.a ../strings/libmystrings.a
pkglib_LIBRARIES = libdbug.a pkglib_LIBRARIES = libdbug.a
noinst_HEADERS = dbug_long.h noinst_HEADERS = dbug_long.h
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include \
@ndbcluster_includes@ -I$(top_srcdir)/sql @ndbcluster_includes@ -I$(top_srcdir)/sql
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a ../dbug/libdbug.a ../strings/libmystrings.a
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = libheap.a ../mysys/libmysys.a ../dbug/libdbug.a \ LDADD = libheap.a ../mysys/libmysys.a ../dbug/libdbug.a \
../strings/libmystrings.a ../strings/libmystrings.a
pkglib_LIBRARIES = libheap.a pkglib_LIBRARIES = libheap.a
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a ../dbug/libdbug.a ../strings/libmystrings.a
pkglib_LIBRARIES = libnisam.a pkglib_LIBRARIES = libnisam.a
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
target = libmysqlclient.la target = libmysqlclient.la
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
LIBS = @CLIENT_LIBS@ LIBS = @CLIENT_LIBS@
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes) @ZLIB_INCLUDES@
include $(srcdir)/Makefile.shared include $(srcdir)/Makefile.shared
......
...@@ -24,8 +24,9 @@ target = libmysqlclient_r.la ...@@ -24,8 +24,9 @@ target = libmysqlclient_r.la
target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@ target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@ LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
INCLUDES = @MT_INCLUDES@ \ INCLUDES = @MT_INCLUDES@ \
-I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes) @ZLIB_INCLUDES@
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
include $(top_srcdir)/libmysql/Makefile.shared include $(top_srcdir)/libmysql/Makefile.shared
......
...@@ -25,7 +25,8 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ ...@@ -25,7 +25,8 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" -DSHAREDIR="\"$(MYSQLSHAREdir)\""
INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ INCLUDES= @MT_INCLUDES@ @bdb_includes@ \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/regex \
$(openssl_includes) @ZLIB_INCLUDES@ $(openssl_includes) @ZLIB_INCLUDES@
......
...@@ -30,7 +30,8 @@ link_sources: ...@@ -30,7 +30,8 @@ link_sources:
done; done;
DEFS = -DEMBEDDED_LIBRARY DEFS = -DEMBEDDED_LIBRARY
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \ INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \ -I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
$(openssl_includes) $(openssl_includes)
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
pkglib_LIBRARIES = libmerge.a pkglib_LIBRARIES = libmerge.a
noinst_HEADERS = mrg_def.h noinst_HEADERS = mrg_def.h
libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \ libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
EXTRA_DIST = mi_test_all.sh mi_test_all.res EXTRA_DIST = mi_test_all.sh mi_test_all.res
pkgdata_DATA = mi_test_all mi_test_all.res pkgdata_DATA = mi_test_all mi_test_all.res
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
pkglib_LIBRARIES = libmyisammrg.a pkglib_LIBRARIES = libmyisammrg.a
noinst_HEADERS = myrg_def.h noinst_HEADERS = myrg_def.h
libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \
......
...@@ -39,7 +39,7 @@ test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem ...@@ -39,7 +39,7 @@ test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem
std_data/server-cert.pem std_data/server-key.pem std_data/server-cert.pem std_data/server-key.pem
CLEANFILES = $(test_SCRIPTS) $(test_DATA) CLEANFILES = $(test_SCRIPTS) $(test_DATA)
INCLUDES = -I$(srcdir)/../include -I../include -I.. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
EXTRA_PROGRAMS = mysql_test_run_new EXTRA_PROGRAMS = mysql_test_run_new
noinst_HEADERS = my_manage.h noinst_HEADERS = my_manage.h
mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
......
...@@ -435,3 +435,8 @@ ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for ...@@ -435,3 +435,8 @@ ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1'; delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest; drop database mysqltest;
use mysql;
insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_grantor',CURRENT_TIMESTAMP,'Select','Select');
flush privileges;
delete from tables_priv where host = '' and user = 'mysqltest_1';
flush privileges;
DROP TABLE IF EXISTS t1,t2,t3,t2aA,t1Aa; DROP TABLE IF EXISTS t1,t2,t3,t2aA,t1Aa;
DROP DATABASE IF EXISTS `TEST_$1`; DROP DATABASE IF EXISTS `TEST_$1`;
DROP DATABASE IF EXISTS `test_$1`; DROP DATABASE IF EXISTS `test_$1`;
DROP DATABASE mysqltest_LC2; DROP DATABASE IF EXISTS mysqltest_LC2;
CREATE TABLE T1 (a int); CREATE TABLE T1 (a int);
INSERT INTO T1 VALUES (1); INSERT INTO T1 VALUES (1);
SHOW TABLES LIKE "T1"; SHOW TABLES LIKE "T1";
......
...@@ -1057,6 +1057,5 @@ Qcache_inserts 2 ...@@ -1057,6 +1057,5 @@ Qcache_inserts 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 1 Qcache_hits 1
drop table t1; drop table t1;
set GLOBAL query_cache_size=0; set GLOBAL query_cache_size=0;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t4 (
id INT(5) unsigned NOT NULL auto_increment,
name varchar(15) NOT NULL default '',
number varchar(35) NOT NULL default 'default',
PRIMARY KEY (id),
UNIQUE KEY unique_rec (name,number)
) ENGINE=InnoDB;
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
SELECT * FROM t4;
id name number
1 XXX 12345
2 XXY 12345
SELECT * FROM t4;
id name number
1 XXX 12345
2 XXY 12345
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
SELECT * FROM t4;
id name number
3 XXX 12345
4 XXY 12345
SELECT * FROM t4;
id name number
3 XXX 12345
4 XXY 12345
...@@ -392,3 +392,12 @@ revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; ...@@ -392,3 +392,12 @@ revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1'; delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest; drop database mysqltest;
#
# Bug #11330: Entry in tables_priv with host = '' causes crash
#
connection default;
use mysql;
insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_grantor',CURRENT_TIMESTAMP,'Select','Select');
flush privileges;
delete from tables_priv where host = '' and user = 'mysqltest_1';
flush privileges;
...@@ -13,7 +13,7 @@ enable_query_log; ...@@ -13,7 +13,7 @@ enable_query_log;
DROP TABLE IF EXISTS t1,t2,t3,t2aA,t1Aa; DROP TABLE IF EXISTS t1,t2,t3,t2aA,t1Aa;
DROP DATABASE IF EXISTS `TEST_$1`; DROP DATABASE IF EXISTS `TEST_$1`;
DROP DATABASE IF EXISTS `test_$1`; DROP DATABASE IF EXISTS `test_$1`;
DROP DATABASE mysqltest_LC2; DROP DATABASE IF EXISTS mysqltest_LC2;
--enable_warnings --enable_warnings
CREATE TABLE T1 (a int); CREATE TABLE T1 (a int);
......
# File for specialities regarding replication from or to InnoDB
# tables.
source include/master-slave.inc;
source include/have_innodb.inc;
#
# Bug#11401: Load data infile 'REPLACE INTO' fails on slave.
#
connection master;
CREATE TABLE t4 (
id INT(5) unsigned NOT NULL auto_increment,
name varchar(15) NOT NULL default '',
number varchar(35) NOT NULL default 'default',
PRIMARY KEY (id),
UNIQUE KEY unique_rec (name,number)
) ENGINE=InnoDB;
--disable_warnings
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
--enable_warnings
SELECT * FROM t4;
sync_slave_with_master;
SELECT * FROM t4;
connection master;
--disable_warnings
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
--enable_warnings
SELECT * FROM t4;
sync_slave_with_master;
SELECT * FROM t4;
connection master;
--disable_query_log
DROP TABLE t4;
--enable_query_log
sync_slave_with_master;
...@@ -18,7 +18,8 @@ MYSQLDATAdir = $(localstatedir) ...@@ -18,7 +18,8 @@ MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir) MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix) MYSQLBASEdir= $(prefix)
INCLUDES = @MT_INCLUDES@ \ INCLUDES = @MT_INCLUDES@ \
@ZLIB_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) @ZLIB_INCLUDES@ -I$(top_builddir)/include \
-I$(top_srcdir)/include -I$(srcdir)
pkglib_LIBRARIES = libmysys.a pkglib_LIBRARIES = libmysys.a
LDADD = libmysys.a ../dbug/libdbug.a \ LDADD = libmysys.a ../dbug/libdbug.a \
../strings/libmystrings.a ../strings/libmystrings.a
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if HAVE_NETWARE if HAVE_NETWARE
INCLUDES = -I$(srcdir)/../include -I../include -I.. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a ../dbug/libdbug.a ../strings/libmystrings.a
bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA # MA 02111-1307, USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
noinst_LIBRARIES = libregex.a noinst_LIBRARIES = libregex.a
LDADD= libregex.a $(top_builddir)/strings/libmystrings.a LDADD= libregex.a $(top_builddir)/strings/libmystrings.a
noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h
......
...@@ -60,11 +60,19 @@ fix_path () ...@@ -60,11 +60,19 @@ fix_path ()
get_full_path () get_full_path ()
{ {
case $1 in file=$1
/*) echo "$1";;
./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/\./;/;' ;; # if the file is a symlink, try to resolve it
*) which $1 ;; if [ -h $file ];
esac then
file=`ls -l $file | awk '{ print $NF }'`
fi
case $file in
/*) echo "$file";;
*/*) tmp=`pwd`/$file; echo $tmp | sed -e 's;/\./;/;' ;;
*) which $file ;;
esac
} }
me=`get_full_path $0` me=`get_full_path $0`
......
...@@ -21,8 +21,8 @@ MYSQLSHAREdir = $(pkgdatadir) ...@@ -21,8 +21,8 @@ MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix) MYSQLBASEdir= $(prefix)
INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \ INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \
@bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \ @bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
-I$(top_srcdir)/include -I$(top_srcdir)/regex \ -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(srcdir) $(openssl_includes) -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes)
WRAPLIBS= @WRAPLIBS@ WRAPLIBS= @WRAPLIBS@
SUBDIRS = share SUBDIRS = share
libexec_PROGRAMS = mysqld libexec_PROGRAMS = mysqld
......
...@@ -1809,11 +1809,25 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli, ...@@ -1809,11 +1809,25 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
"` <...>", NullS) - load_data_query); "` <...>", NullS) - load_data_query);
thd->query= load_data_query; thd->query= load_data_query;
} }
/*
We need to set thd->lex->sql_command and thd->lex->duplicates
since InnoDB tests these variables to decide if this is a LOAD
DATA ... REPLACE INTO ... statement even though mysql_parse()
is not called. This is not needed in 5.0 since there the LOAD
DATA ... statement is replicated using mysql_parse(), which
sets the thd->lex fields correctly.
*/
thd->lex->sql_command= SQLCOM_LOAD;
if (sql_ex.opt_flags & REPLACE_FLAG) if (sql_ex.opt_flags & REPLACE_FLAG)
{
thd->lex->duplicates= DUP_REPLACE;
handle_dup= DUP_REPLACE; handle_dup= DUP_REPLACE;
}
else if (sql_ex.opt_flags & IGNORE_FLAG) else if (sql_ex.opt_flags & IGNORE_FLAG)
{ {
ignore= 1; ignore= 1;
thd->lex->duplicates= DUP_ERROR;
handle_dup= DUP_ERROR; handle_dup= DUP_ERROR;
} }
else else
...@@ -1831,6 +1845,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli, ...@@ -1831,6 +1845,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
If reading from net (a 3.23 master), mysql_load() will change this If reading from net (a 3.23 master), mysql_load() will change this
to IGNORE. to IGNORE.
*/ */
thd->lex->duplicates= DUP_ERROR;
handle_dup= DUP_ERROR; handle_dup= DUP_ERROR;
} }
......
...@@ -1866,7 +1866,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs) ...@@ -1866,7 +1866,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs)
if (cols) if (cols)
{ {
int key_len; int key_len;
col_privs->field[0]->store(host.hostname,(uint) strlen(host.hostname), col_privs->field[0]->store(host.hostname,
host.hostname ? (uint) strlen(host.hostname) : 0,
&my_charset_latin1); &my_charset_latin1);
col_privs->field[1]->store(db,(uint) strlen(db), &my_charset_latin1); col_privs->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
col_privs->field[2]->store(user,(uint) strlen(user), &my_charset_latin1); col_privs->field[2]->store(user,(uint) strlen(user), &my_charset_latin1);
......
...@@ -1341,14 +1341,12 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -1341,14 +1341,12 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
/* Check if table exists */ /* Check if table exists */
if (create_info->options & HA_LEX_CREATE_TMP_TABLE) if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
{ {
char tmp_table_name[tmp_file_prefix_length+22+22+22+3]; my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s",
my_snprintf(tmp_table_name, sizeof(tmp_table_name), "%s%lx_%lx_%x", mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id,
tmp_file_prefix, current_pid, thd->thread_id, thd->tmp_table++, reg_ext);
thd->tmp_table++);
if (lower_case_table_names) if (lower_case_table_names)
my_casedn_str(files_charset_info, tmp_table_name); my_casedn_str(files_charset_info, path);
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE; create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
build_table_path(path, sizeof(path), db, tmp_table_name, reg_ext);
} }
else else
build_table_path(path, sizeof(path), db, alias, reg_ext); build_table_path(path, sizeof(path), db, alias, reg_ext);
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
# This file is public domain and comes with NO WARRANTY of any kind # This file is public domain and comes with NO WARRANTY of any kind
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include INCLUDES = @MT_INCLUDES@ \
-I$(top_builddir)/include -I$(top_srcdir)/include
pkglib_LIBRARIES = libmystrings.a pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X # Exact one of ASSEMBLER_X
......
...@@ -32,7 +32,8 @@ noinst_PROGRAMS = insert_test select_test thread_test ...@@ -32,7 +32,8 @@ noinst_PROGRAMS = insert_test select_test thread_test
# #
# C Test for 4.1 protocol # C Test for 4.1 protocol
# #
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes)
LIBS = @CLIENT_LIBS@ LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS)
......
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Process this file with automake to create Makefile.in # Process this file with automake to create Makefile.in
INCLUDES=@MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) INCLUDES= @MT_INCLUDES@ -I$(top_builddir)/include \
LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \ -I$(top_srcdir)/include $(openssl_includes)
$(top_builddir)/libmysql_r/libmysqlclient_r.la @ZLIB_LIBS@ LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \
$(top_builddir)/libmysql_r/libmysqlclient_r.la \
@ZLIB_LIBS@
bin_PROGRAMS= mysqlmanager bin_PROGRAMS= mysqlmanager
mysqlmanager_SOURCES= mysqlmanager.c mysqlmanager_SOURCES= mysqlmanager.c
mysqlmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) mysqlmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES= -I$(top_srcdir)/include $(openssl_includes) INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes)
LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs)
pkglib_LIBRARIES= libvio.a pkglib_LIBRARIES= libvio.a
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
......
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