Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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-27 13:47:36+04:00, kroki@stripped +13 -0
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main
MERGE: 1.2191.24.25
VC++Files/sql/mysqld.vcproj@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.7.1.1
mysql-test/mysql-test-run.pl@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -5
Auto merged
MERGE: 1.102.2.1
mysql-test/r/sp.result@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.202.1.1
mysql-test/r/warnings.result@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -7
Auto merged
MERGE: 1.35.1.1
mysql-test/t/warnings-master.opt@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -1
Auto merged
MERGE: 1.2.1.1
mysql-test/t/warnings.test@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -4
Auto merged
MERGE: 1.23.1.1
sql/handler.cc@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -3
Auto merged
MERGE: 1.212.3.1
sql/mysql_priv.h@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -4
Auto merged
MERGE: 1.395.2.1
sql/mysqld.cc@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -11
Auto merged
MERGE: 1.559.1.1
sql/set_var.cc@stripped, 2006-07-27 13:47:31+04:00, kroki@stripped +0 -1
Auto merged
MERGE: 1.157.1.1
sql/sql_class.cc@stripped, 2006-07-27 13:47:32+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.236.3.1
sql/sql_class.h@stripped, 2006-07-27 13:47:32+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.292.2.1
sql/sql_parse.cc@stripped, 2006-07-27 13:47:32+04:00, kroki@stripped +0 -0
Auto merged
MERGE: 1.556.5.1
# 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: kroki
# Host: moonlight.intranet
# Root: /home/tomash/src/mysql_ab/mysql-5.0-main/RESYNC
--- 1.243/sql/sql_class.cc 2006-07-27 13:47:46 +04:00
+++ 1.244/sql/sql_class.cc 2006-07-27 13:47:46 +04:00
@@ -43,6 +43,7 @@
table name
*/
char internal_table_name[2]= "*";
+char empty_c_string[1]= {0}; /* used for not defined db */
const char * const THD::DEFAULT_WHERE= "field list";
--- 1.295/sql/sql_class.h 2006-07-27 13:47:46 +04:00
+++ 1.296/sql/sql_class.h 2006-07-27 13:47:46 +04:00
@@ -41,6 +41,7 @@ enum enum_check_fields { CHECK_FIELD_IGN
CHECK_FIELD_ERROR_FOR_NULL };
extern char internal_table_name[2];
+extern char empty_c_string[1];
extern const char **errmesg;
#define TC_LOG_PAGE_SIZE 8192
@@ -1983,11 +1984,21 @@ public:
{
db.str=0;
}
+ /*
+ This constructor is used only for the case when we create a derived
+ table. A derived table has no name and doesn't belong to any database.
+ Later, if there was an alias specified for the table, it will be set
+ by add_table_to_list.
+ */
inline Table_ident(SELECT_LEX_UNIT *s) : sel(s)
{
/* We must have a table name here as this is used with add_table_to_list */
- db.str=0; table.str= internal_table_name; table.length=1;
+ db.str= empty_c_string; /* a subject to casedn_str */
+ db.length= 0;
+ table.str= internal_table_name;
+ table.length=1;
}
+ bool is_derived_table() const { return test(sel); }
inline void change_db(char *db_name)
{
db.str= db_name; db.length= (uint) strlen(db_name);
--- 1.562/sql/sql_parse.cc 2006-07-27 13:47:46 +04:00
+++ 1.563/sql/sql_parse.cc 2006-07-27 13:47:46 +04:00
@@ -6118,8 +6118,7 @@ TABLE_LIST *st_select_lex::add_table_to_
if (!table)
DBUG_RETURN(0); // End of memory
alias_str= alias ? alias->str : table->table.str;
- if (check_table_name(table->table.str,table->table.length) ||
- table->db.str && check_db_name(table->db.str))
+ if (check_table_name(table->table.str, table->table.length))
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
DBUG_RETURN(0);
@@ -6140,6 +6139,11 @@ TABLE_LIST *st_select_lex::add_table_to_
DBUG_RETURN(0); /* purecov: inspected */
if (table->db.str)
{
+ if (table->is_derived_table() == FALSE && check_db_name(table->db.str))
+ {
+ my_error(ER_WRONG_DB_NAME, MYF(0), table->db.str);
+ DBUG_RETURN(0);
+ }
ptr->db= table->db.str;
ptr->db_length= table->db.length;
}
--- 1.9/VC++Files/sql/mysqld.vcproj 2006-07-27 13:47:46 +04:00
+++ 1.10/VC++Files/sql/mysqld.vcproj 2006-07-27 13:47:46 +04:00
@@ -43,7 +43,10 @@
OutputFile="../client_classic/mysqld-nt.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_classic/mysqld-nt.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_classic/mysqld-nt.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -104,6 +107,10 @@
OutputFile="../client_release/mysqld-max.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_release/mysqld-max.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_release/mysqld-max.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -164,9 +171,10 @@
OutputFile="../client_release/mysqld-max-nt.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- ProgramDatabaseFile=".\max_nt/mysqld-max-nt.pdb"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_release/mysqld-max-nt.pdb"
GenerateMapFile="TRUE"
- MapFileName=".\max_nt/mysqld-max-nt.map"
+ MapFileName="../client_release/mysqld-max-nt.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -227,9 +235,10 @@
OutputFile="../client_release/mysqld-nt.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- ProgramDatabaseFile=".\nt/mysqld-nt.pdb"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_release/mysqld-nt.pdb"
GenerateMapFile="TRUE"
- MapFileName=".\nt/mysqld-nt.map"
+ MapFileName="../client_release/mysqld-nt.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -290,7 +299,10 @@
OutputFile="../client_pro/mysqld-nt.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_pro/mysqld-nt.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_pro/mysqld-nt.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -350,7 +362,9 @@
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
- ProgramDatabaseFile=".\debug/mysqld-debug.pdb"
+ ProgramDatabaseFile="../client_debug/mysqld-debug.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_debug/mysqld-debug.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -411,7 +425,10 @@
OutputFile="../client_pro/mysqld.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_pro/mysqld.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_pro/mysqld.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -472,7 +489,10 @@
OutputFile="../client_classic/mysqld.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_classic/mysqld.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_classic/mysqld.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
@@ -533,6 +553,10 @@
OutputFile="../client_release/mysqld.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="../client_release/mysqld.pdb"
+ GenerateMapFile="TRUE"
+ MapFileName="../client_release/mysqld.map"
SubSystem="1"
TargetMachine="1"/>
<Tool
--- 1.203/mysql-test/r/sp.result 2006-07-27 13:47:46 +04:00
+++ 1.204/mysql-test/r/sp.result 2006-07-27 13:47:46 +04:00
@@ -5057,4 +5057,19 @@ concat('data was: /', var1, '/')
data was: /1/
drop table t3|
drop procedure bug15217|
+drop table if exists t3|
+drop database if exists mysqltest1|
+create table t3 (a int)|
+insert into t3 (a) values (1), (2)|
+create database mysqltest1|
+use mysqltest1|
+drop database mysqltest1|
+select database()|
+database()
+NULL
+select * from (select 1 as a) as t1 natural join (select * from test.t3) as t2|
+a
+1
+use test|
+drop table t3|
drop table t1,t2;
| Thread |
|---|
| • bk commit into 5.0 tree (kroki:1.2218) | kroki | 27 Jul |