Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1913 05/07/31 12:56:02 monty@stripped +8 -0
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
sql/sql_trigger.cc
1.26 05/07/31 12:55:58 monty@stripped +0 -5
Simple merge
mysql-test/t/variables.test
1.46 05/07/31 12:55:58 monty@stripped +1 -3
Simple merge
mysql-test/r/variables.result
1.69 05/07/31 12:55:58 monty@stripped +1 -6
Simple merge
client/mysqldump.c
1.193 05/07/31 12:55:58 monty@stripped +0 -1
Simple merge
client/client_priv.h
1.39 05/07/31 12:55:58 monty@stripped +0 -2
Simple merge
sql/sql_view.cc
1.55 05/07/31 12:51:08 monty@stripped +0 -0
Auto merged
sql/set_var.cc
1.129 05/07/31 12:51:08 monty@stripped +0 -0
Auto merged
mysql-test/t/sp.test
1.136 05/07/31 12:51:08 monty@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: mishka.local
# Root: /home/my/mysql-5.0/RESYNC
--- 1.192/client/mysqldump.c 2005-07-29 23:39:04 +03:00
+++ 1.193/client/mysqldump.c 2005-07-31 12:55:58 +03:00
@@ -372,7 +372,7 @@
(gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tables", OPT_TABLES, "Overrides option --databases (-B).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"triggers", OPT_TRIGGER, "Dump triggers for each dumped table",
+ {"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table",
(gptr*) &opt_dump_triggers, (gptr*) &opt_dump_triggers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
@@ -424,6 +424,7 @@
if (ferror(file))
{
fprintf(stderr, "%s: Got errno %d on write\n", my_progname, errno);
+ ignore_errors= 0; /* We can't ignore this error */
safe_exit(EX_EOF);
}
}
@@ -2615,7 +2616,7 @@
{
/* SHOW MASTER STATUS reports nothing and --force is not enabled */
my_printf_error(0, "Error: Binlogging on server not active",
- MYF(0), mysql_error(mysql_con));
+ MYF(0));
mysql_free_result(master);
return 1;
}
@@ -2986,11 +2987,12 @@
int main(int argc, char **argv)
{
+ MY_INIT("mysqldump");
+
compatible_mode_normal_str[0]= 0;
default_charset= (char *)mysql_universal_client_charset;
bzero((char*) &ignore_table, sizeof(ignore_table));
- MY_INIT("mysqldump");
if (get_options(&argc, &argv))
{
my_end(0);
--- 1.54/sql/sql_view.cc 2005-07-28 22:39:07 +03:00
+++ 1.55/sql/sql_view.cc 2005-07-31 12:51:08 +03:00
@@ -24,6 +24,8 @@
#define MD5_BUFF_LENGTH 33
+const LEX_STRING view_type= { (char*) STRING_WITH_LEN("VIEW") };
+
static int mysql_register_view(THD *thd, TABLE_LIST *view,
enum_view_create_mode mode);
@@ -431,7 +433,7 @@
FILE_OPTIONS_STRING}
};
-static LEX_STRING view_file_type[]= {{(char*)"VIEW", 4}};
+static LEX_STRING view_file_type[]= {{(char*) STRING_WITH_LEN("VIEW") }};
/*
@@ -470,7 +472,7 @@
thd->variables.sql_mode|= sql_mode;
}
str.append('\0');
- DBUG_PRINT("VIEW", ("View: %s", str.ptr()));
+ DBUG_PRINT("info", ("View: %s", str.ptr()));
/* print file name */
(void) my_snprintf(dir_buff, FN_REFLEN, "%s/%s/",
@@ -507,8 +509,7 @@
if (!(parser= sql_parse_prepare(&path, thd->mem_root, 0)))
DBUG_RETURN(1);
- if (!parser->ok() ||
- strncmp("VIEW", parser->type()->str, parser->type()->length))
+ if (!parser->ok() || !is_equal(&view_type, parser->type()))
{
my_error(ER_WRONG_OBJECT, MYF(0),
(view->db ? view->db : thd->db), view->table_name, "VIEW");
--- 1.25/sql/sql_trigger.cc 2005-07-29 23:43:03 +03:00
+++ 1.26/sql/sql_trigger.cc 2005-07-31 12:55:58 +03:00
@@ -232,7 +232,7 @@
/* Trigger must be in the same schema as target table. */
- if (my_strcasecmp(system_charset_info, table->s->db,
+ if (my_strcasecmp(table_alias_charset, table->s->db,
lex->spname->m_db.str ? lex->spname->m_db.str :
thd->db))
{
@@ -408,7 +408,7 @@
it_def++;
it_mod++;
- if (my_strcasecmp(system_charset_info, lex->spname->m_name.str,
+ if (my_strcasecmp(table_alias_charset, lex->spname->m_name.str,
name->str) == 0)
{
/*
@@ -554,8 +554,7 @@
if ((parser= sql_parse_prepare(&path, &table->mem_root, 1)))
{
- if (!strncmp(triggers_file_type.str, parser->type()->str,
- parser->type()->length))
+ if (is_equal(&triggers_file_type, parser->type()))
{
Table_triggers_list *triggers=
new (&table->mem_root) Table_triggers_list(table);
@@ -705,7 +704,7 @@
be merged into .FRM anyway.
*/
my_error(ER_WRONG_OBJECT, MYF(0),
- table_name, triggers_file_ext, "TRIGGER");
+ table_name, triggers_file_ext+1, "TRIGGER");
DBUG_RETURN(1);
}
@@ -787,10 +786,9 @@
if (!(parser= sql_parse_prepare(&path, thd->mem_root, 1)))
DBUG_RETURN(0);
- if (strncmp(trigname_file_type.str, parser->type()->str,
- parser->type()->length))
+ if (!is_equal(&trigname_file_type, parser->type()))
{
- my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext,
+ my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext+1,
"TRIGGERNAME");
DBUG_RETURN(0);
}
--- 1.68/mysql-test/r/variables.result 2005-07-29 04:22:45 +03:00
+++ 1.69/mysql-test/r/variables.result 2005-07-31 12:55:58 +03:00
@@ -530,6 +530,10 @@
@@max_heap_table_size > 0
1
set global max_heap_table_size= 4294967296;
-select @@global.max_heap_table_size > 0;
-@@global.max_heap_table_size > 0
+select @@max_heap_table_size > 0;
+@@max_heap_table_size > 0
+1
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+@@max_heap_table_size > 0
1
--- 1.45/mysql-test/t/variables.test 2005-07-29 19:25:07 +03:00
+++ 1.46/mysql-test/t/variables.test 2005-07-31 12:55:58 +03:00
@@ -415,4 +415,6 @@
set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0;
set global max_heap_table_size= 4294967296;
-select @@global.max_heap_table_size > 0;
+select @@max_heap_table_size > 0;
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
--- 1.38/client/client_priv.h 2005-07-29 23:39:04 +03:00
+++ 1.39/client/client_priv.h 2005-07-31 12:55:58 +03:00
@@ -49,6 +49,6 @@
#ifdef HAVE_NDBCLUSTER_DB
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
#endif
- OPT_IGNORE_TABLE, OPT_INSERT_IGNORE, OPT_SHOW_WARNINGS, OPT_DROP_DATABASE,
- OPT_TRIGGER
+ OPT_TRIGGERS,
+ OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
};
--- 1.128/sql/set_var.cc 2005-07-29 23:40:00 +03:00
+++ 1.129/sql/set_var.cc 2005-07-31 12:51:08 +03:00
@@ -1432,6 +1432,12 @@
if ((ulong) tmp > max_system_variables.*offset)
tmp= max_system_variables.*offset;
+#if SIZEOF_LONG == 4
+ /* Avoid overflows on 32 bit systems */
+ if (tmp > (ulonglong) ~(ulong) 0)
+ tmp= ((ulonglong) ~(ulong) 0);
+#endif
+
if (option_limits)
tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
if (var->type == OPT_GLOBAL)
@@ -1685,7 +1691,7 @@
pthread_mutex_lock(&LOCK_global_system_variables);
value= *(uint*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
- return new Item_uint((uint32) value);
+ return new Item_uint((ulonglong) value);
}
case SHOW_LONG:
{
@@ -1693,7 +1699,7 @@
pthread_mutex_lock(&LOCK_global_system_variables);
value= *(ulong*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
- return new Item_uint(value);
+ return new Item_uint((ulonglong) value);
}
case SHOW_LONGLONG:
{
--- 1.135/mysql-test/t/sp.test 2005-07-29 23:39:04 +03:00
+++ 1.136/mysql-test/t/sp.test 2005-07-31 12:51:08 +03:00
@@ -1232,12 +1232,14 @@
end|
select f5(1)|
# This should generate an error about insuficient number of tables locked
-# Nuw this crash server, comented until bug#11394 fix
-#--error 1100
-#select f5(2)|
+# Now this crash server
+--disable_parsing until bug#11394 fix
+--error 1100
+select f5(2)|
# But now it simply miserably fails because we are trying to use the same
# lex on the next iteration :/ It should generate some error too...
-# select f5(3)|
+select f5(3)|
+--enable_parsing
# OTOH this should work
create function f6() returns int
@@ -1285,9 +1287,11 @@
return (select sum(data) from t1) + (select sum(data) from v1)|
# This queries will crash server because we can't use LEX in
# reenterable fashion yet. Patch disabling recursion will heal this.
-#select f1()|
-#select * from v1|
-#select * from v2|
+--disable_parsing
+select f1()|
+select * from v1|
+select * from v2|
+--enable_parsing
# Back to the normal cases
drop function f1|
create function f1() returns int
@@ -1499,54 +1503,55 @@
#
# This part of test is disabled until we implement support for
# recursive stored procedures.
-#--disable_warnings
-#drop table if exists fib|
-#--enable_warnings
-#create table fib ( f bigint unsigned not null )|
-#
-## We deliberately do it the awkward way, fetching the last two
-## values from the table, in order to exercise various statements
-## and table accesses at each turn.
-#--disable_warnings
-#drop procedure if exists fib|
-#--enable_warnings
-#create procedure fib(n int unsigned)
-#begin
-# if n > 1 then
-# begin
-# declare x, y bigint unsigned;
-# declare c cursor for select f from fib order by f desc limit 2;
-#
-# open c;
-# fetch c into y;
-# fetch c into x;
-# close c;
-# insert into fib values (x+y);
-# call fib(n-1);
-# end;
-# end if;
-#end|
-#
-## Minimum test: recursion of 3 levels
-#
-#insert into fib values (0), (1)|
-#
-#call fib(3)|
-#
-#select * from fib order by f asc|
-#
-#delete from fib|
-#
-## Original test: 20 levels (may run into memory limits!)
-#
-#insert into fib values (0), (1)|
-#
-#call fib(20)|
-#
-#select * from fib order by f asc|
-#drop table fib|
-#drop procedure fib|
+--disable_parsing
+--disable_warnings
+drop table if exists fib|
+--enable_warnings
+create table fib ( f bigint unsigned not null )|
+
+# We deliberately do it the awkward way, fetching the last two
+# values from the table, in order to exercise various statements
+# and table accesses at each turn.
+--disable_warnings
+drop procedure if exists fib|
+--enable_warnings
+create procedure fib(n int unsigned)
+begin
+ if n > 1 then
+ begin
+ declare x, y bigint unsigned;
+ declare c cursor for select f from fib order by f desc limit 2;
+
+ open c;
+ fetch c into y;
+ fetch c into x;
+ close c;
+ insert into fib values (x+y);
+ call fib(n-1);
+ end;
+ end if;
+end|
+
+# Minimum test: recursion of 3 levels
+
+insert into fib values (0), (1)|
+
+call fib(3)|
+
+select * from fib order by f asc|
+
+delete from fib|
+
+# Original test: 20 levels (may run into memory limits!)
+insert into fib values (0), (1)|
+
+call fib(20)|
+
+select * from fib order by f asc|
+drop table fib|
+drop procedure fib|
+--enable_parsing
#
# Comment & suid
@@ -1830,49 +1835,51 @@
# FIXME: Other solution would be to use preopened proc table
# instead of opening it anew.
#
-#--disable_warnings
-#drop procedure if exists bug2267_1|
-#--enable_warnings
-#create procedure bug2267_1()
-#begin
-# show procedure status;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_2|
-#--enable_warnings
-#create procedure bug2267_2()
-#begin
-# show function status;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_3|
-#--enable_warnings
-#create procedure bug2267_3()
-#begin
-# show create procedure bug2267_1;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_4|
-#--enable_warnings
-#create procedure bug2267_4()
-#begin
-# show create function fac;
-#end|
-#
-#--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-#call bug2267_1()|
-#--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-#call bug2267_2()|
-#call bug2267_3()|
-#call bug2267_4()|
-#
-#drop procedure bug2267_1|
-#drop procedure bug2267_2|
-#drop procedure bug2267_3|
-#drop procedure bug2267_4|
+--disable_parsing
+--disable_warnings
+drop procedure if exists bug2267_1|
+--enable_warnings
+create procedure bug2267_1()
+begin
+ show procedure status;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_2|
+--enable_warnings
+create procedure bug2267_2()
+begin
+ show function status;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_3|
+--enable_warnings
+create procedure bug2267_3()
+begin
+ show create procedure bug2267_1;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_4|
+--enable_warnings
+create procedure bug2267_4()
+begin
+ show create function fac;
+end|
+
+--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
+call bug2267_1()|
+--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
+call bug2267_2()|
+call bug2267_3()|
+call bug2267_4()|
+
+drop procedure bug2267_1|
+drop procedure bug2267_2|
+drop procedure bug2267_3|
+drop procedure bug2267_4|
+--enable_parsing
#
# BUG#2227
@@ -1901,23 +1908,25 @@
# QQ For this reason we can't run this test any more (i.e., if we modify
# QQ it, it's no longer a test case for the bug), but we keep it here
# QQ anyway, for tracability.
-#--disable_warnings
-#drop procedure if exists bug2614|
-#--enable_warnings
-#create procedure bug2614()
-#begin
-# drop temporary table if exists t3;
-# create temporary table t3 (id int default '0' not null);
-# insert into t3 select 12;
-# insert into t3 select * from t3;
-#end|
-#
-#--disable_warnings
-#call bug2614()|
-#--enable_warnings
-#call bug2614()|
-#drop temporary table t3|
-#drop procedure bug2614|
+--disable_parsing
+--disable_warnings
+drop procedure if exists bug2614|
+--enable_warnings
+create procedure bug2614()
+begin
+ drop temporary table if exists t3;
+ create temporary table t3 (id int default '0' not null);
+ insert into t3 select 12;
+ insert into t3 select * from t3;
+end|
+
+--disable_warnings
+call bug2614()|
+--enable_warnings
+call bug2614()|
+drop temporary table t3|
+drop procedure bug2614|
+--enable_parsing
#
# BUG#2674
@@ -2508,27 +2517,29 @@
# BUG#4318
#
#QQ Don't know if HANDLER commands can work with SPs, or at all...
-#--disable_warnings
-#drop table if exists t3|
-#--enable_warnings
-#
-#create table t3 (s1 int)|
-#insert into t3 values (3), (4)|
-#
-#--disable_warnings
-#drop procedure if exists bug4318|
-#--enable_warnings
-#create procedure bug4318()
-# handler t3 read next|
-#
-#handler t3 open|
-## Expect no results, as tables are closed, but there shouldn't be any errors
-#call bug4318()|
-#call bug4318()|
-#handler t3 close|
-#
-#drop procedure bug4318|
-#drop table t3|
+--disable_parsing
+--disable_warnings
+drop table if exists t3|
+--enable_warnings
+
+create table t3 (s1 int)|
+insert into t3 values (3), (4)|
+
+--disable_warnings
+drop procedure if exists bug4318|
+--enable_warnings
+create procedure bug4318()
+ handler t3 read next|
+
+handler t3 open|
+# Expect no results, as tables are closed, but there shouldn't be any errors
+call bug4318()|
+call bug4318()|
+handler t3 close|
+
+drop procedure bug4318|
+drop table t3|
+--enable_parsing
#
# BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error
@@ -2563,11 +2574,13 @@
show variables like 'foo';
show warnings;
end|
-#show binlog events;
-#show storage engines;
-#show master status;
-#show slave hosts;
-#show slave status;
+--disable_parsing
+show binlog events;
+show storage engines;
+show master status;
+show slave hosts;
+show slave status;
+--enable_parsing
call bug4902()|
call bug4902()|
@@ -3911,7 +3924,6 @@
#drop procedure if exists bugNNNN|
#--enable_warnings
#create procedure bugNNNN...
-
# Add bugs above this line. Use existing tables t1 and t2 when
# practical, or create table t3, t4 etc temporarily (and drop them).
| Thread |
|---|
| • bk commit into 5.0 tree (monty:1.1913) | monty | 31 Jul |