Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja 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@stripped, 2006-07-15 01:04:51+04:00, kostja@stripped +15 -0
Merge bodhi.local:/opt/local/work/tmp_merge
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
MERGE: 1.1810.1694.88
mysql-test/r/func_sapdb.result@stripped, 2006-07-15 01:01:50+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.15.1.2
mysql-test/r/func_time.result@stripped, 2006-07-15 01:01:50+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.47.1.12
mysql-test/r/information_schema.result@stripped, 2006-07-15 01:01:56+04:00, kostja@stripped +8 -44
Use local
MERGE: 1.87.1.24
mysql-test/r/sp-vars.result@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.1.1.2
mysql-test/t/func_sapdb.test@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.10.1.3
mysql-test/t/func_time.test@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.41.1.7
mysql-test/t/information_schema.test@stripped, 2006-07-15 01:04:48+04:00, kostja@stripped +3 -4
Manual merge.
MERGE: 1.65.1.18
sql/field_conv.cc@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.52.1.4
sql/item.h@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.183.1.19
sql/item_timefunc.cc@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.100.1.16
sql/sp_head.cc@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.200.1.18
sql/sql_lex.cc@stripped, 2006-07-15 01:01:51+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.142.1.48
sql/sql_lex.h@stripped, 2006-07-15 01:04:48+04:00, kostja@stripped +1 -2
Manual merge.
MERGE: 1.175.1.46
sql/sql_parse.cc@stripped, 2006-07-15 01:01:52+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.426.1.133
sql/sql_show.cc@stripped, 2006-07-15 01:01:52+04:00, kostja@stripped +0 -0
Auto merged
MERGE: 1.253.1.68
# 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: kostja
# Host: bodhi.local
# Root: /opt/local/work/mysql-5.1-runtime-merge-5.0/RESYNC
--- 1.59/sql/field_conv.cc 2006-07-15 01:05:01 +04:00
+++ 1.60/sql/field_conv.cc 2006-07-15 01:05:01 +04:00
@@ -674,9 +674,14 @@ void field_conv(Field *to,Field *from)
{ // Be sure the value is stored
Field_blob *blob=(Field_blob*) to;
from->val_str(&blob->value);
- if (!blob->value.is_alloced() &&
- from->real_type() != MYSQL_TYPE_STRING &&
- from->real_type() != MYSQL_TYPE_VARCHAR)
+ /*
+ Copy value if copy_blobs is set, or source is not a string and
+ we have a pointer to its internal string conversion buffer.
+ */
+ if (to->table->copy_blobs ||
+ (!blob->value.is_alloced() &&
+ from->real_type() != MYSQL_TYPE_STRING &&
+ from->real_type() != MYSQL_TYPE_VARCHAR))
blob->value.copy();
blob->store(blob->value.ptr(),blob->value.length(),from->charset());
return;
--- 1.204/sql/item.h 2006-07-15 01:05:01 +04:00
+++ 1.205/sql/item.h 2006-07-15 01:05:01 +04:00
@@ -890,13 +890,6 @@ protected:
public:
LEX_STRING m_name;
- /*
- Buffer, pointing to the string value of the item. We need it to
- protect internal buffer from changes. See comment to analogous
- member in Item_param for more details.
- */
- String str_value_ptr;
-
public:
#ifndef DBUG_OFF
/*
--- 1.192/sql/sql_lex.cc 2006-07-15 01:05:01 +04:00
+++ 1.193/sql/sql_lex.cc 2006-07-15 01:05:01 +04:00
@@ -42,8 +42,6 @@ sys_var *trg_new_row_fake_var= (sys_var*
#define yySkip() lex->ptr++
#define yyLength() ((uint) (lex->ptr - lex->tok_start)-1)
-pthread_key(LEX*,THR_LEX);
-
/* Longest standard keyword name */
#define TOCK_NAME_LENGTH 24
@@ -91,8 +89,6 @@ void lex_init(void)
symbols[i].length=(uchar) strlen(symbols[i].name);
for (i=0 ; i < array_elements(sql_functions) ; i++)
sql_functions[i].length=(uchar) strlen(sql_functions[i].name);
-
- VOID(pthread_key_create(&THR_LEX,NULL));
DBUG_VOID_RETURN;
}
--- 1.237/sql/sql_lex.h 2006-07-15 01:05:01 +04:00
+++ 1.238/sql/sql_lex.h 2006-07-15 01:05:01 +04:00
@@ -1191,8 +1191,4 @@ extern void lex_start(THD *thd, const uc
extern void lex_end(LEX *lex);
extern int MYSQLlex(void *arg, void *yythd);
-extern pthread_key(LEX*,THR_LEX);
-
-#define current_lex (current_thd->lex)
-
-#endif
+#endif /* MYSQL_SERVER */
--- 1.569/sql/sql_parse.cc 2006-07-15 01:05:01 +04:00
+++ 1.570/sql/sql_parse.cc 2006-07-15 01:05:01 +04:00
@@ -2431,7 +2431,7 @@ static void reset_one_shot_variables(THD
/*
- Execute command saved in thd and current_lex->sql_command
+ Execute command saved in thd and lex->sql_command
SYNOPSIS
mysql_execute_command()
@@ -5780,7 +5780,7 @@ bool check_stack_overrun(THD *thd, long
bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize)
{
- LEX *lex=current_lex;
+ LEX *lex= current_thd->lex;
ulong old_info=0;
if ((uint) *yystacksize >= MY_YACC_MAX)
return 1;
@@ -6245,7 +6245,7 @@ bool add_field_to_list(THD *thd, char *f
void store_position_for_column(const char *name)
{
- current_lex->last_field->after=my_const_cast(char*) (name);
+ current_thd->lex->last_field->after=my_const_cast(char*) (name);
}
bool
--- 1.355/sql/sql_show.cc 2006-07-15 01:05:01 +04:00
+++ 1.356/sql/sql_show.cc 2006-07-15 01:05:01 +04:00
@@ -3330,6 +3330,7 @@ bool store_schema_proc(THD *thd, TABLE *
{
get_field(thd->mem_root, proc_table->field[10], &tmp_string);
table->field[7]->store(tmp_string.ptr(), tmp_string.length(), cs);
+ table->field[7]->set_notnull();
}
table->field[6]->store(STRING_WITH_LEN("SQL"), cs);
table->field[10]->store(STRING_WITH_LEN("SQL"), cs);
@@ -5283,7 +5284,7 @@ ST_FIELD_INFO proc_fields_info[]=
{"ROUTINE_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"},
{"DTD_IDENTIFIER", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"ROUTINE_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0},
- {"ROUTINE_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"ROUTINE_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
{"EXTERNAL_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"EXTERNAL_LANGUAGE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"PARAMETER_STYLE", 8, MYSQL_TYPE_STRING, 0, 0, 0},
--- 1.5/mysql-test/r/sp-vars.result 2006-07-15 01:05:01 +04:00
+++ 1.6/mysql-test/r/sp-vars.result 2006-07-15 01:05:01 +04:00
@@ -1075,3 +1075,18 @@ SELECT f1();
f1()
abc
DROP FUNCTION f1;
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE v_char VARCHAR(255);
+DECLARE v_text TEXT DEFAULT '';
+SET v_char = 'abc';
+SET v_text = v_char;
+SET v_char = 'def';
+SET v_text = concat(v_text, '|', v_char);
+SELECT v_text;
+END|
+CALL p1();
+v_text
+abc|def
+DROP PROCEDURE p1;
--- 1.83/mysql-test/t/information_schema.test 2006-07-15 01:05:01 +04:00
+++ 1.84/mysql-test/t/information_schema.test 2006-07-15 01:05:01 +04:00
@@ -859,7 +859,40 @@ select concat(@a, table_name), @a, table
from information_schema.tables where table_schema = 'test';
drop table t1,t2;
-# End of 5.0 tests.
+#
+# Bug#20230: routine_definition is not null
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE PROCEDURE p1() SET @a= 1;
+CREATE FUNCTION f1() RETURNS INT RETURN @a + 1;
+CREATE USER mysql_bug20230@localhost;
+GRANT EXECUTE ON PROCEDURE p1 TO mysql_bug20230@localhost;
+GRANT EXECUTE ON FUNCTION f1 TO mysql_bug20230@localhost;
+
+SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE FUNCTION f1;
+
+connect (conn1, localhost, mysql_bug20230,,);
+
+SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE FUNCTION f1;
+CALL p1();
+SELECT f1();
+
+disconnect conn1;
+connection default;
+
+DROP FUNCTION f1;
+DROP PROCEDURE p1;
+DROP USER mysql_bug20230@localhost;
+
+--echo End of 5.0 tests.
#
# Show engines
#
@@ -876,4 +909,6 @@ connection con3148;
select user,db from information_schema.processlist;
connection default;
drop user user3148@localhost;
+
+--echo End of 5.1 tests.
--- 1.63/mysql-test/r/func_time.result 2006-07-15 01:05:01 +04:00
+++ 1.64/mysql-test/r/func_time.result 2006-07-15 01:05:01 +04:00
@@ -361,12 +361,6 @@ extract(SECOND FROM "1999-01-02 10:11:12
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
2
-SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
-DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
-9999-12-31 00:00:00
-SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
-DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
-9999-12-31 00:00:00
SELECT EXTRACT(QUARTER FROM '2004-01-15') AS quarter;
quarter
1
@@ -403,6 +397,12 @@ quarter
SELECT EXTRACT(QUARTER FROM '2004-12-15') AS quarter;
quarter
4
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
1968-01-20 03:14:08
--- 1.50/mysql-test/t/func_time.test 2006-07-15 01:05:01 +04:00
+++ 1.51/mysql-test/t/func_time.test 2006-07-15 01:05:01 +04:00
@@ -143,10 +143,6 @@ select extract(SECOND FROM "1999-01-02 1
select extract(MONTH FROM "2001-02-00");
#
-# MySQL Bugs: #12356: DATE_SUB or DATE_ADD incorrectly returns null
-#
-SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
-SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
# test EXTRACT QUARTER (Bug #18100)
#
@@ -162,7 +158,11 @@ SELECT EXTRACT(QUARTER FROM '2004-09-15'
SELECT EXTRACT(QUARTER FROM '2004-10-15') AS quarter;
SELECT EXTRACT(QUARTER FROM '2004-11-15') AS quarter;
SELECT EXTRACT(QUARTER FROM '2004-12-15') AS quarter;
-
+#
+# MySQL Bugs: #12356: DATE_SUB or DATE_ADD incorrectly returns null
+#
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
#
# Test big intervals (Bug #3498)
--- 1.229/sql/sp_head.cc 2006-07-15 01:05:01 +04:00
+++ 1.230/sql/sp_head.cc 2006-07-15 01:05:01 +04:00
@@ -1933,8 +1933,11 @@ sp_head::show_create_procedure(THD *thd)
field_list.push_back(new Item_empty_string("Procedure", NAME_LEN));
field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
// 1024 is for not to confuse old clients
- field_list.push_back(new Item_empty_string("Create Procedure",
- max(buffer.length(), 1024)));
+ Item_empty_string *definition=
+ new Item_empty_string("Create Procedure", max(buffer.length(),1024));
+ definition->maybe_null= TRUE;
+ field_list.push_back(definition);
+
if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS |
Protocol::SEND_EOF))
DBUG_RETURN(1);
@@ -1943,6 +1946,8 @@ sp_head::show_create_procedure(THD *thd)
protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
if (full_access)
protocol->store(m_defstr.str, m_defstr.length, system_charset_info);
+ else
+ protocol->store_null();
res= protocol->write();
send_eof(thd);
@@ -1998,8 +2003,11 @@ sp_head::show_create_function(THD *thd)
&sql_mode_len);
field_list.push_back(new Item_empty_string("Function",NAME_LEN));
field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
- field_list.push_back(new Item_empty_string("Create Function",
- max(buffer.length(),1024)));
+ Item_empty_string *definition=
+ new Item_empty_string("Create Function", max(buffer.length(),1024));
+ definition->maybe_null= TRUE;
+ field_list.push_back(definition);
+
if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(1);
@@ -2008,6 +2016,8 @@ sp_head::show_create_function(THD *thd)
protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
if (full_access)
protocol->store(m_defstr.str, m_defstr.length, system_charset_info);
+ else
+ protocol->store_null();
res= protocol->write();
send_eof(thd);
| Thread |
|---|
| • bk commit into 5.1 tree (kostja:1.2251) | konstantin | 14 Jul |