Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.962 2007/05/10 12:54:27 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.963 2007/07/17 09:24:05 marty Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:3874:    master()->resolv("DBManager.is_module_table")    ( 0, "local", name+"2",    "The argument cache, used to map between "    "a unique string and an argument mapping" );    catch(QUERY("DROP TABLE "+name+"2" ));    QUERY("CREATE TABLE "+name+"2 ("    "id CHAR(32) PRIMARY KEY, "    "ctime DATETIME NOT NULL, "    "atime DATETIME NOT NULL, "    "rep_time DATETIME NOT NULL, " -  "contents BLOB NOT NULL)"); +  "contents MEDIUMBLOB NOT NULL)");    }       if (catch (QUERY ("SELECT rep_time FROM " + name + "2 WHERE id = 0")))    {    // Upgrade a table without rep_time.    QUERY ("ALTER TABLE " + name + "2"    " ADD rep_time DATETIME NOT NULL"    " AFTER atime");    } -  +  +  catch { +  array(mapping(string:mixed)) res = +  QUERY("DESCRIBE "+name+"2 contents"); +  +  if(res[0]->Type == "blob") { +  QUERY("ALTER TABLE "+name+"2 MODIFY contents MEDIUMBLOB NOT NULL"); +  werror("ArgCache: Extending \"contents\" field in table \"%s2\" from BLOB to MEDIUMBLOB.\n", name);    } -  +  }; +  }       static void init_db()    {    // Delay DBManager resolving to before the 'roxen' object is    // compiled.    cache = ([]);    db = dbm_cached_get("local");    setup_table( );    }