Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0

into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
parents 2c2c8128 c6d933c6
...@@ -541,6 +541,17 @@ typedef unsigned short ushort; ...@@ -541,6 +541,17 @@ typedef unsigned short ushort;
#define __attribute__(A) #define __attribute__(A)
#endif #endif
/*
Wen using the embedded library, users might run into link problems,
dupicate declaration of __cxa_pure_virtual, solved by declaring it a
weak symbol.
*/
#ifdef USE_MYSYS_NEW
C_MODE_START
int __cxa_pure_virtual () __attribute__ ((weak));
C_MODE_END
#endif
/* From old s-system.h */ /* From old s-system.h */
/* /*
......
...@@ -391,3 +391,25 @@ root@localhost ...@@ -391,3 +391,25 @@ root@localhost
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
this will be executed this will be executed
this will be executed this will be executed
mysqltest: At line 2: query 'create table t1 (a int primary key);
insert into t1 values (1);
select 'select-me';
insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1
drop table t1;
drop table t1;
create table t1 (a int primary key);
insert into t1 values (1);
select 'select-me';
insertz error query||||
select-me
select-me
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
drop table t1;
create table t1 (a int primary key);
insert into t1 values (1);
select 'select-me';
insertz error query||||
select-me
select-me
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
drop table t1;
...@@ -945,3 +945,49 @@ select "this will not be executed"; ...@@ -945,3 +945,49 @@ select "this will not be executed";
--enable_parsing --enable_parsing
select "this will be executed"; select "this will be executed";
--enable_query_log --enable_query_log
#
# Bug #11731 mysqltest in multi-statement queries ignores errors in
# non-1st queries
#
# Failing multi statement query
--exec echo "delimiter ||||;" > var/tmp/bug11731.sql
--exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql
--exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql
--exec echo "select 'select-me';" >> var/tmp/bug11731.sql
--exec echo "insertz 'error query'||||" >> var/tmp/bug11731.sql
--exec echo "delimiter ;||||" >> var/tmp/bug11731.sql
--error 1
--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
drop table t1;
--error 1
--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
# The .out file should be empty, cat will fail!
--error 1
--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
drop table t1;
# Using expected error
--exec echo "delimiter ||||;" > var/tmp/bug11731.sql
--exec echo "--error 1064" >> var/tmp/bug11731.sql
--exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql
--exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql
--exec echo "select 'select-me';" >> var/tmp/bug11731.sql
--exec echo "insertz "error query"||||" >> var/tmp/bug11731.sql
--exec echo "delimiter ;||||" >> var/tmp/bug11731.sql
# These two should work since the error is expected
--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
drop table t1;
--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
drop table t1;
...@@ -349,6 +349,8 @@ void start_master() ...@@ -349,6 +349,8 @@ void start_master()
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir); add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir); add_arg(&al, "--language=%s", lang_dir);
add_arg(&al, "--log-bin-trust-routine-creators"); add_arg(&al, "--log-bin-trust-routine-creators");
add_arg(&al, "--log-slow-queries");
add_arg(&al, "--log-queries-not-using-indexes");
#ifdef DEBUG //only for debug builds #ifdef DEBUG //only for debug builds
add_arg(&al, "--debug"); add_arg(&al, "--debug");
#endif #endif
...@@ -523,6 +525,8 @@ void start_slave() ...@@ -523,6 +525,8 @@ void start_slave()
add_arg(&al, "-O"); add_arg(&al, "-O");
add_arg(&al, "slave_net_timeout=10"); add_arg(&al, "slave_net_timeout=10");
add_arg(&al, "--log-bin-trust-routine-creators"); add_arg(&al, "--log-bin-trust-routine-creators");
add_arg(&al, "--log-slow-queries");
add_arg(&al, "--log-queries-not-using-indexes");
#ifdef DEBUG //only for debug builds #ifdef DEBUG //only for debug builds
add_arg(&al, "--debug"); add_arg(&al, "--debug");
#endif #endif
......
...@@ -791,6 +791,9 @@ static int check_connection(THD *thd) ...@@ -791,6 +791,9 @@ static int check_connection(THD *thd)
DBUG_PRINT("info", DBUG_PRINT("info",
("New connection received on %s", vio_description(net->vio))); ("New connection received on %s", vio_description(net->vio)));
#ifdef SIGNAL_WITH_VIO_CLOSE
thd->set_active_vio(net->vio);
#endif
if (!thd->main_security_ctx.host) // If TCP/IP connection if (!thd->main_security_ctx.host) // If TCP/IP connection
{ {
......
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