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 - 2009, 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.1046 2009/11/23 16:49:16 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1047 2009/11/23 16:52:01 grubba 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:4207:    "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, "    "timeout INT NULL, "    "contents MEDIUMBLOB NOT NULL, " -  "index(timeout))"); +  " INDEX(timeout))");    }       if (catch (QUERY ("SELECT rep_time FROM " + name + "2 LIMIT 0")))    {    // Upgrade a table without rep_time.    QUERY ("ALTER TABLE " + name + "2"    " ADD rep_time DATETIME NOT NULL"    " AFTER atime");    }       if (catch (QUERY ("SELECT timeout FROM " + name + "2 LIMIT 0")))    {    // Upgrade a table without timeout. -  QUERY ("ALTER TABLE " + name + "2" -  " ADD timeout INT NULL" -  " AFTER rep_time"); +  QUERY ("ALTER TABLE " + name + "2 " +  " ADD timeout INT NULL " +  "AFTER rep_time"); +  QUERY ("ALTER TABLE " + name + "2 " +  " ADD INDEX(timeout)");    }       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);    }