Commit 91b1630d authored by unknown's avatar unknown
Browse files

Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0

into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0

parents 77afc169 17742635
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1297,7 +1297,6 @@ int openfrm(THD *thd, const char *name,const char *alias,uint filestat,
int readfrm(const char *name, const void** data, uint* length);
int writefrm(const char* name, const void* data, uint len);
int closefrm(TABLE *table);
db_type get_table_type(THD *thd, const char *name);
int read_string(File file, gptr *to, uint length);
void free_blobs(TABLE *table);
int set_zone(int nr,int min_zone,int max_zone);
+2 −1
Original line number Diff line number Diff line
@@ -1193,10 +1193,11 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
    */
    {
      char path[FN_REFLEN];
      db_type not_used;
      strxnmov(path, FN_REFLEN, mysql_data_home, "/", table_list->db, "/",
               table_list->table_name, reg_ext, NullS);
      (void) unpack_filename(path, path);
      if (mysql_frm_type(path) == FRMTYPE_VIEW)
      if (mysql_frm_type(thd, path, &not_used) == FRMTYPE_VIEW)
      {
        TABLE tab;// will not be used (because it's VIEW) but have to be passed
        table= &tab;
+2 −1
Original line number Diff line number Diff line
@@ -833,7 +833,8 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
  if (!dont_send_ok)
  {
    db_type table_type;
    if ((table_type=get_table_type(thd, path)) == DB_TYPE_UNKNOWN)
    mysql_frm_type(thd, path, &table_type);
    if (table_type == DB_TYPE_UNKNOWN)
    {
      my_error(ER_NO_SUCH_TABLE, MYF(0),
               table_list->db, table_list->table_name);
+4 −3
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error)
{
  TABLE_LIST *ren_table,*new_table;
  frm_type_enum frm_type;
  db_type table_type;

  DBUG_ENTER("rename_tables");

  for (ren_table= table_list; ren_table; ren_table= new_table->next_local)
@@ -166,13 +168,12 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error)
	    reg_ext);
    unpack_filename(name, name);

    frm_type= mysql_frm_type(name);
    frm_type= mysql_frm_type(thd, name, &table_type);
    switch (frm_type)
    {
      case FRMTYPE_TABLE:
      {
        db_type table_type;
        if ((table_type= get_table_type(thd, name)) == DB_TYPE_UNKNOWN) 
        if (table_type == DB_TYPE_UNKNOWN) 
          my_error(ER_FILE_NOT_FOUND, MYF(0), name, my_errno);
        else
          rc= mysql_rename_table(table_type, ren_table->db, old_alias,
+2 −1
Original line number Diff line number Diff line
@@ -2006,6 +2006,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
  Security_context *sctx= thd->security_ctx;
  uint derived_tables= lex->derived_tables; 
  int error= 1;
  db_type not_used;
  Open_tables_state open_tables_state_backup;
  DBUG_ENTER("get_all_tables");

@@ -2117,7 +2118,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
              else
              {
                my_snprintf(end, len, "/%s%s", file_name, reg_ext);
                switch (mysql_frm_type(path)) {
                switch (mysql_frm_type(thd, path, &not_used)) {
                case FRMTYPE_ERROR:
                  table->field[3]->store("ERROR", 5, system_charset_info);
                  break;
Loading