Commit bffe61d8 authored by unknown's avatar unknown

Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0

into hundin.mysql.fi:/home/heikki/mysql-5.0

parents 83bd17bb bf0d45ae
...@@ -377,8 +377,8 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit ...@@ -377,8 +377,8 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit
# #
# Unpack the binary distribution # Unpack the binary distribution
# #
if ($opt_stage <= 4 && !$opt_no_test)
$global_step= "extract binary distribution"; $global_step= "extract binary distribution";
if ($opt_stage <= 4 && !$opt_no_test)
{ {
log_timestamp("START"); log_timestamp("START");
rm_all(<$pwd/$host/test/*>); rm_all(<$pwd/$host/test/*>);
...@@ -396,8 +396,8 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . ...@@ -396,8 +396,8 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
# #
# Run the test suite # Run the test suite
# #
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
$global_step= "tests in default mode"; $global_step= "tests in default mode";
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{ {
log_timestamp("START"); log_timestamp("START");
my $flags= ""; my $flags= "";
......
...@@ -1695,7 +1695,11 @@ int safe_connect(MYSQL* con, const char* host, const char* user, ...@@ -1695,7 +1695,11 @@ int safe_connect(MYSQL* con, const char* host, const char* user,
} }
sleep(CON_RETRY_SLEEP); sleep(CON_RETRY_SLEEP);
} }
con->reconnect= 1; /* TODO: change this to 0 in future versions */ /*
TODO: change this to 0 in future versions, but the 'kill' test relies on
existing behavior
*/
con->reconnect= 1;
return con_error; return con_error;
} }
...@@ -1790,6 +1794,12 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host, ...@@ -1790,6 +1794,12 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host,
goto err; goto err;
} }
/*
TODO: change this to 0 in future versions, but the 'kill' test relies on
existing behavior
*/
con->reconnect= 1;
if (record) if (record)
{ {
if (!q->record_file[0] && !result_file) if (!q->record_file[0] && !result_file)
......
...@@ -4144,7 +4144,8 @@ static my_bool is_binary_compatible(enum enum_field_types type1, ...@@ -4144,7 +4144,8 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB, range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB, MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY, MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY,
MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL }, MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL };
static const enum enum_field_types
*range_list[]= { range1, range2, range3, range4 }, *range_list[]= { range1, range2, range3, range4 },
**range_list_end= range_list + sizeof(range_list)/sizeof(*range_list); **range_list_end= range_list + sizeof(range_list)/sizeof(*range_list);
const enum enum_field_types **range, *type; const enum enum_field_types **range, *type;
......
...@@ -15,7 +15,7 @@ link_sources: ...@@ -15,7 +15,7 @@ link_sources:
done; done;
DEFS = -DEMBEDDED_LIBRARY DEFS = -DEMBEDDED_LIBRARY
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \ INCLUDES = -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 \
-I$(top_builddir)/include $(openssl_includes) -I$(top_builddir)/include $(openssl_includes)
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
......
...@@ -166,7 +166,7 @@ set group_concat_max_len = 1024; ...@@ -166,7 +166,7 @@ set group_concat_max_len = 1024;
select group_concat(sum(a)) from t1 group by grp; select group_concat(sum(a)) from t1 group by grp;
ERROR HY000: Invalid use of group function ERROR HY000: Invalid use of group function
select grp,group_concat(c order by 2) from t1 group by grp; select grp,group_concat(c order by 2) from t1 group by grp;
ERROR 42S22: Unknown column '2' in 'group statement' ERROR 42S22: Unknown column '2' in 'order clause'
drop table t1; drop table t1;
create table t1 ( URL_ID int(11), URL varchar(80)); create table t1 ( URL_ID int(11), URL varchar(80));
create table t2 ( REQ_ID int(11), URL_ID int(11)); create table t2 ( REQ_ID int(11), URL_ID int(11));
......
...@@ -2778,25 +2778,3 @@ a ...@@ -2778,25 +2778,3 @@ a
drop procedure bug8937| drop procedure bug8937|
delete from t1| delete from t1|
drop table t1,t2; drop table t1,t2;
drop procedure if exists sp1;
create table t1 (a int) engine=innodb|
create procedure sp1 ()
begin
truncate table t1; insert t1 values (1); rollback;
end
|
set autocommit=0;
insert t1 values (2);
call sp1();
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit;
set autocommit=1;
select * from t1;
a
2
call sp1();
select * from t1;
a
1
drop table t1;
drop procedure sp1;
drop procedure if exists sp1;
create table t1 (a int) engine=innodb|
create procedure sp1 ()
begin
truncate table t1; insert t1 values (1); rollback;
end|
set autocommit=0;
insert t1 values (2);
call sp1();
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit;
select * from t1;
a
2
call sp1();
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
set autocommit=1;
select * from t1;
a
2
drop table t1;
drop procedure sp1;
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
# things that will not run in a single debugged mysqld # things that will not run in a single debugged mysqld
# process (e.g. master-slave things). # process (e.g. master-slave things).
-- source include/have_innodb.inc
use test; use test;
--disable_warnings --disable_warnings
...@@ -3390,28 +3392,3 @@ delete from t1| ...@@ -3390,28 +3392,3 @@ delete from t1|
delimiter ;| delimiter ;|
drop table t1,t2; drop table t1,t2;
#
# BUG#8850
#
--disable_warnings
drop procedure if exists sp1;
--enable_warnings
delimiter |;
create table t1 (a int) engine=innodb|
create procedure sp1 ()
begin
truncate table t1; insert t1 values (1); rollback;
end
|
delimiter ;|
set autocommit=0;
insert t1 values (2);
--error 1192
call sp1();
commit;
set autocommit=1;
select * from t1;
call sp1();
select * from t1;
drop table t1;
drop procedure sp1;
#
# tests that require InnoDB...
#
-- source include/have_innodb.inc
#
# BUG#8850
#
--disable_warnings
drop procedure if exists sp1;
--enable_warnings
delimiter |;
create table t1 (a int) engine=innodb|
create procedure sp1 ()
begin
truncate table t1; insert t1 values (1); rollback;
end|
delimiter ;|
set autocommit=0;
insert t1 values (2);
--error 1192
call sp1();
commit;
select * from t1;
#
# when CALL will be fixed to not start a transaction, the error should
# go away
--error 1192
call sp1();
set autocommit=1;
select * from t1;
drop table t1;
drop procedure sp1;
This diff is collapsed.
...@@ -834,15 +834,26 @@ class MYSQL_ERROR; ...@@ -834,15 +834,26 @@ class MYSQL_ERROR;
class Item_func_group_concat : public Item_sum class Item_func_group_concat : public Item_sum
{ {
THD *item_thd;
TMP_TABLE_PARAM *tmp_table_param; TMP_TABLE_PARAM *tmp_table_param;
uint max_elements_in_tree;
MYSQL_ERROR *warning; MYSQL_ERROR *warning;
uint key_length; String result;
bool tree_mode; String *separator;
TREE tree_base;
TREE *tree;
TABLE *table;
ORDER **order;
TABLE_LIST *tables_list;
uint arg_count_order; // total count of ORDER BY items
uint arg_count_field; // count of arguments
uint count_cut_values;
bool distinct; bool distinct;
bool warning_for_row; bool warning_for_row;
bool always_null; bool always_null;
/*
Following is 0 normal object and pointer to original one for copy
(to correctly free resources)
*/
Item_func_group_concat *original;
friend int group_concat_key_cmp_with_distinct(void* arg, byte* key1, friend int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
byte* key2); byte* key2);
...@@ -854,30 +865,12 @@ class Item_func_group_concat : public Item_sum ...@@ -854,30 +865,12 @@ class Item_func_group_concat : public Item_sum
friend int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), friend int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
Item_func_group_concat *group_concat_item); Item_func_group_concat *group_concat_item);
public: public:
String result;
String *separator;
TREE tree_base;
TREE *tree;
TABLE *table;
ORDER **order;
TABLE_LIST *tables_list;
ulong group_concat_max_len;
uint arg_count_order;
uint arg_count_field;
uint field_list_offset;
uint count_cut_values;
/*
Following is 0 normal object and pointer to original one for copy
(to correctly free resources)
*/
Item_func_group_concat *original;
Item_func_group_concat(bool is_distinct,List<Item> *is_select, Item_func_group_concat(bool is_distinct,List<Item> *is_select,
SQL_LIST *is_order,String *is_separator); SQL_LIST *is_order,String *is_separator);
Item_func_group_concat(THD *thd, Item_func_group_concat *item); Item_func_group_concat(THD *thd, Item_func_group_concat *item);
~Item_func_group_concat(); ~Item_func_group_concat() {}
void cleanup(); void cleanup();
enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;} enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;}
...@@ -885,11 +878,11 @@ class Item_func_group_concat : public Item_sum ...@@ -885,11 +878,11 @@ class Item_func_group_concat : public Item_sum
virtual Item_result result_type () const { return STRING_RESULT; } virtual Item_result result_type () const { return STRING_RESULT; }
void clear(); void clear();
bool add(); bool add();
void reset_field(); void reset_field() {} // not used
void update_field() {} // not used
bool fix_fields(THD *, TABLE_LIST *, Item **); bool fix_fields(THD *, TABLE_LIST *, Item **);
bool setup(THD *thd); bool setup(THD *thd);
void make_unique(); void make_unique();
virtual void update_field() {}
double val_real() double val_real()
{ {
String *res; res=val_str(&str_value); String *res; res=val_str(&str_value);
......
...@@ -3633,10 +3633,10 @@ unsent_create_error: ...@@ -3633,10 +3633,10 @@ unsent_create_error:
while ((user=user_list++)) while ((user=user_list++))
{ {
if (user->password.str && if (user->password.str &&
strcmp(thd->user, user->user.str) || (strcmp(thd->user, user->user.str) ||
user->host.str && user->host.str &&
my_strcasecmp(system_charset_info, my_strcasecmp(system_charset_info,
user->host.str, thd->host_or_ip)) user->host.str, thd->host_or_ip)))
{ {
if (check_access(thd, UPDATE_ACL, "mysql", 0, 1, 0)) if (check_access(thd, UPDATE_ACL, "mysql", 0, 1, 0))
goto error; goto error;
......
...@@ -10976,7 +10976,7 @@ static void test_view_insert() ...@@ -10976,7 +10976,7 @@ static void test_view_insert()
MYSQL_STMT *insert_stmt, *select_stmt; MYSQL_STMT *insert_stmt, *select_stmt;
int rc, i; int rc, i;
MYSQL_BIND bind[1]; MYSQL_BIND bind[1];
long my_val = 0L; int my_val = 0;
ulong my_length = 0L; ulong my_length = 0L;
long my_null = 0L; long my_null = 0L;
const char *query= const char *query=
......
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