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.972 2008/01/10 15:35:50 jonasw Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.973 2008/02/05 17:41:49 wellhard 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:3902:   #define dwerror(ARGS...) werror(ARGS)   #else   #define dwerror(ARGS...) 0   #endif       static mapping(string|int:mixed) cache = ([ ]);       static void setup_table()    {    // New style argument2 table. -  if(catch(QUERY("SELECT id FROM "+name+"2 WHERE id = 0"))) +  if(catch(QUERY("SELECT id FROM "+name+"2 LIMIT 0")))    {    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 MEDIUMBLOB NOT NULL)");    }    -  if (catch (QUERY ("SELECT rep_time FROM " + name + "2 WHERE id = 0"))) +  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");    }       catch {    array(mapping(string:mixed)) res =    QUERY("DESCRIBE "+name+"2 contents");