Commit 6fd2435d authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/my/mysql-4.1

parents 415221f3 8793e219
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -949,11 +949,7 @@ static void do_exec(struct st_query* q)
    while (fgets(buf, sizeof(buf), res_file))
      replace_dynstr_append_mem(ds, buf, strlen(buf));
  }
#ifndef __WIN__
  error= pclose(res_file);
#else  
  error= _pclose(res_file);
#endif  

  if (error != 0)
    die("command \"%s\" failed", cmd);
@@ -4610,11 +4606,7 @@ FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
  FILE *res_file;

  subst_cmd= subst_env_var(cmd);
#ifndef __WIN__
  res_file= popen(subst_cmd, "r0");
#else
  res_file= _popen(subst_cmd, "r0");
#endif
  my_free(subst_cmd, MYF(0));
  return res_file;
}
+2 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ typedef uint rf_SetTimer;
#define sigset(A,B) signal((A),(B))
#define finite(A) _finite(A)
#define sleep(A)  Sleep((A)*1000)
#define popen(A) popen(A,B) _popen((A),(B))
#define pclose(A) _pclose(A)

#ifndef __BORLANDC__
#define access(A,B) _access(A,B)
+1 −1
Original line number Diff line number Diff line
--innodb-lock-wait-timeout=1
--loose-innodb-lock-wait-timeout=1
+6 −4
Original line number Diff line number Diff line
@@ -234,13 +234,13 @@ int berkeley_show_logs(Protocol *protocol)
{
  char **all_logs, **free_logs, **a, **f;
  int error=1;
  MEM_ROOT show_logs_root;
  MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
  MEM_ROOT **root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**,THR_MALLOC);
  MEM_ROOT show_logs_root, *old_mem_root= *root_ptr;
  DBUG_ENTER("berkeley_show_logs");

  init_sql_alloc(&show_logs_root, BDB_LOG_ALLOC_BLOCK_SIZE,
		 BDB_LOG_ALLOC_BLOCK_SIZE);
  my_pthread_setspecific_ptr(THR_MALLOC,&show_logs_root);
  *root_ptr= &show_logs_root;

  if ((error= db_env->log_archive(db_env, &all_logs,
				  DB_ARCH_ABS | DB_ARCH_LOG)) ||
@@ -277,15 +277,17 @@ int berkeley_show_logs(Protocol *protocol)
  }
err:
  free_root(&show_logs_root,MYF(0));
  my_pthread_setspecific_ptr(THR_MALLOC,old_root);
  *root_ptr= old_mem_root;
  DBUG_RETURN(error);
}


static void berkeley_print_error(const char *db_errpfx, char *buffer)
{
  sql_print_error("%s:  %s",db_errpfx,buffer); /* purecov: tested */
}


static void berkeley_noticecall(DB_ENV *db_env, db_notices notice)
{
  switch (notice)
+4 −4
Original line number Diff line number Diff line
@@ -1744,9 +1744,9 @@ void Item_func_in::fix_length_and_dec()
         Conversion is possible:
         All IN arguments are constants.
      */
      Item_arena *arena= thd->current_arena, backup;
      if (arena->is_stmt_prepare())
        thd->set_n_backup_item_arena(arena, &backup);
      Item_arena *arena, backup;
      arena= thd->change_arena_if_needed(&backup);

      for (arg= args+1, arg_end= args+arg_count; arg < arg_end; arg++)
      {
        if (!arg[0]->null_value &&
@@ -1764,7 +1764,7 @@ void Item_func_in::fix_length_and_dec()
          arg[0]= conv;
        }
      }
      if (arena->is_stmt_prepare())
      if (arena)
        thd->restore_backup_item_arena(arena, &backup);
    }
  }
Loading