Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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, 2007-09-22 11:37:10+04:00, evgen@stripped +3 -0
Merge epotemkin@stripped:/home/bk/mysql-5.0-opt
into sunlight.local:/local_work/27990-bug-5.0-opt-mysql
MERGE: 1.2410.32.1
sql/field.cc@stripped, 2007-09-22 11:37:02+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.344.2.1
sql/sql_select.cc@stripped, 2007-09-22 11:37:03+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.505.2.1
tests/mysql_client_test.c@stripped, 2007-09-22 11:37:03+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.223.3.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: evgen
# Host: sunlight.local
# Root: /local_work/27990-bug-5.0-opt-mysql/RESYNC
--- 1.360/sql/field.cc 2007-08-06 15:57:26 +04:00
+++ 1.361/sql/field.cc 2007-09-22 11:37:02 +04:00
@@ -1356,15 +1356,25 @@
void Field::make_field(Send_field *field)
{
- if (orig_table->s->table_cache_key &&
*(orig_table->s->table_cache_key))
+ if (orig_table && orig_table->s->table_cache_key &&
+ *(orig_table->s->table_cache_key))
{
field->org_table_name= orig_table->s->table_name;
field->db_name= orig_table->s->table_cache_key;
}
else
field->org_table_name= field->db_name= "";
- field->table_name= orig_table->alias;
- field->col_name= field->org_col_name= field_name;
+ if (orig_table)
+ {
+ field->table_name= orig_table->alias;
+ field->org_col_name= field_name;
+ }
+ else
+ {
+ field->table_name= "";
+ field->org_col_name= "";
+ }
+ field->col_name= field_name;
field->charsetnr= charset()->number;
field->length=field_length;
field->type=type();
--- 1.552/sql/sql_select.cc 2007-09-14 18:43:12 +04:00
+++ 1.553/sql/sql_select.cc 2007-09-22 11:37:03 +04:00
@@ -14330,6 +14330,8 @@
item_field= (Item*) new Item_field(field);
if (!item_field)
DBUG_RETURN(TRUE); // Fatal error
+
+ field->orig_table= 0;
item_field->name= item->name;
if (item->type() == Item::REF_ITEM)
{
--- 1.237/tests/mysql_client_test.c 2007-08-15 18:21:36 +04:00
+++ 1.238/tests/mysql_client_test.c 2007-09-22 11:37:03 +04:00
@@ -15506,28 +15506,35 @@
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (i INT)");
myquery(rc);
- rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
- myquery(rc);
+ /*
+ We need this loop to ensure correct behavior with both constant and
+ non-constant tables.
+ */
+ for (j= 0; j < 2 ; j++)
+ {
+ rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
+ myquery(rc);
- rc= mysql_real_query(mysql, query, query_end - query);
- myquery(rc);
+ rc= mysql_real_query(mysql, query, query_end - query);
+ myquery(rc);
- result= mysql_use_result(mysql);
- DIE_UNLESS(result);
+ result= mysql_use_result(mysql);
+ DIE_UNLESS(result);
- field_count= mysql_field_count(mysql);
- for (i= 0; i < field_count; ++i)
- {
- field= mysql_fetch_field_direct(result, i);
- printf("%s -> %s ... ", expr[i * 2], field->name);
- fflush(stdout);
- DIE_UNLESS(field->db[0] == 0 && field->org_table[0] == 0 &&
- field->table[0] == 0 && field->org_name[0] == 0);
- DIE_UNLESS(strcmp(field->name, expr[i * 2 + 1]) == 0);
- puts("OK");
- }
+ field_count= mysql_field_count(mysql);
+ for (i= 0; i < field_count; ++i)
+ {
+ field= mysql_fetch_field_direct(result, i);
+ printf("%s -> %s ... ", expr[i * 2], field->name);
+ fflush(stdout);
+ DIE_UNLESS(field->db[0] == 0 && field->org_table[0] == 0 &&
+ field->table[0] == 0 && field->org_name[0] == 0);
+ DIE_UNLESS(strcmp(field->name, expr[i * 2 + 1]) == 0);
+ puts("OK");
+ }
- mysql_free_result(result);
+ mysql_free_result(result);
+ }
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.2532) | eugene | 22 Sep |