List:Internals« Previous MessageNext Message »
From:ramil Date:March 30 2005 2:07pm
Subject:bk commit into 5.0 tree (ramil:1.1840)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.1840 05/03/30 17:07:40 ramil@stripped +4 -0
  Merge

  sql/sql_select.cc
    1.306 05/03/30 17:07:36 ramil@stripped +3 -12
    Manual merge

  sql/sql_parse.cc
    1.433 05/03/30 16:59:47 ramil@stripped +0 -0
    Auto merged

  mysql-test/r/ps_7ndb.result
    1.22 05/03/30 16:59:46 ramil@stripped +0 -0
    Auto merged

  include/violite.h
    1.40 05/03/30 16:59:46 ramil@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:	ramil
# Host:	gw.mysql.r18.ru
# Root:	/usr/home/ram/work/mysql-5.0/RESYNC

--- 1.39/include/violite.h	2005-03-06 01:10:03 +04:00
+++ 1.40/include/violite.h	2005-03-30 16:59:46 +05:00
@@ -144,8 +144,8 @@
 #if !defined(DONT_MAP_VIO)
 #define vio_delete(vio) 			(vio)->viodelete(vio)
 #define vio_errno(vio)	 			(vio)->vioerrno(vio)
-#define vio_read(vio, buf, size) 		(vio)->read(vio,buf,size)
-#define vio_write(vio, buf, size) 		(vio)->write(vio, buf, size)
+#define vio_read(vio, buf, size)                ((vio)->read)(vio,buf,size)
+#define vio_write(vio, buf, size)               ((vio)->write)(vio, buf, size)
 #define vio_blocking(vio, set_blocking_mode, old_mode)\
  	(vio)->vioblocking(vio, set_blocking_mode, old_mode)
 #define vio_is_blocking(vio) 			(vio)->is_blocking(vio)

--- 1.432/sql/sql_parse.cc	2005-03-29 02:02:35 +05:00
+++ 1.433/sql/sql_parse.cc	2005-03-30 16:59:47 +05:00
@@ -4579,6 +4579,7 @@
 {
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   ulong db_access;
+  bool  db_is_pattern= test(want_access & GRANT_ACL);
 #endif
   ulong dummy;
   DBUG_ENTER("check_access");
@@ -4610,9 +4611,8 @@
     */
     db_access= thd->db_access;
     if (!(thd->master_access & SELECT_ACL) &&
-	(db && (!thd->db || strcmp(db,thd->db))))
-      db_access=acl_get(thd->host, thd->ip,
-			thd->priv_user, db, test(want_access & GRANT_ACL));
+	(db && (!thd->db || db_is_pattern || strcmp(db,thd->db))))
+      db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern);
     *save_priv=thd->master_access | db_access;
     DBUG_RETURN(FALSE);
   }
@@ -4633,9 +4633,8 @@
   if (db == any_db)
     DBUG_RETURN(FALSE);				// Allow select on anything
 
-  if (db && (!thd->db || strcmp(db,thd->db)))
-    db_access=acl_get(thd->host, thd->ip,
-		      thd->priv_user, db, test(want_access & GRANT_ACL));
+  if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))
+    db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern);
   else
     db_access=thd->db_access;
   DBUG_PRINT("info",("db_access: %lu", db_access));

--- 1.305/sql/sql_select.cc	2005-03-25 14:33:18 +04:00
+++ 1.306/sql/sql_select.cc	2005-03-30 17:07:36 +05:00
@@ -7591,14 +7591,13 @@
     create_tmp_field_from_field()
     thd			Thread handler
     org_field           field from which new field will be created
-    item		Item to create a field for
+    name                New field name
     table		Temporary table
-    modify_item	        1 if item->result_field should point to new item.
-			This is relevent for how fill_record() is going to
-			work:
-			If modify_item is 1 then fill_record() will update
+    item	        !=NULL if item->result_field should point to new field.
+			This is relevant for how fill_record() is going to work:
+			If item != NULL then fill_record() will update
 			the record in the original table.
-			If modify_item is 0 then fill_record() will update
+			If item == NULL then fill_record() will update
 			the temporary table
     convert_blob_length If >0 create a varstring(convert_blob_length) field 
                         instead of blob.
@@ -7609,9 +7608,8 @@
 */
 
 Field* create_tmp_field_from_field(THD *thd, Field* org_field,
-				   Item *item, TABLE *table,
-				   bool modify_item,
-				   uint convert_blob_length)
+                                   const char *name, TABLE *table,
+                                   Item_field *item, uint convert_blob_length)
 {
   Field *new_field;
 
@@ -7624,10 +7622,10 @@
     new_field= org_field->new_field(thd->mem_root, table);
   if (new_field)
   {
-    if (modify_item)
-      ((Item_field *)item)->result_field= new_field;
+    if (item)
+      item->result_field= new_field;
     else
-      new_field->field_name= item->name;
+      new_field->field_name= name;
     if (org_field->maybe_null())
       new_field->flags&= ~NOT_NULL_FLAG;	// Because of outer join
     if (org_field->type() == MYSQL_TYPE_VAR_STRING ||
@@ -7782,8 +7780,10 @@
   case Item::DEFAULT_VALUE_ITEM:
   {
     Item_field *field= (Item_field*) item;
-    return create_tmp_field_from_field(thd, (*from_field= field->field), item,
-                                       table, modify_item, convert_blob_length);
+    return create_tmp_field_from_field(thd, (*from_field= field->field),
+                                       item->name, table,
+                                       modify_item ? (Item_field*) item : NULL,
+                                       convert_blob_length);
   }
   case Item::FUNC_ITEM:
   case Item::COND_ITEM:
@@ -7805,7 +7805,7 @@
   {
     Field *example= ((Item_type_holder *)item)->example();
     if (example)
-      return create_tmp_field_from_field(thd, example, item, table, 0,
+      return create_tmp_field_from_field(thd, example, item->name, table, NULL,
                                          convert_blob_length);
     return create_tmp_field_from_item(thd, item, table, copy_func, 0,
                                       convert_blob_length);
Thread
bk commit into 5.0 tree (ramil:1.1840)ramil30 Mar