Branch: Tag:

2007-07-17

2007-07-17 09:24:06 by Martin Jonsson <marty@roxen.com>

Extended the contents field of the argcache tables from a maximum of 2^16 bytes to 2^24 bytes, to support the use of <cimg data=""> with pics larger than 64k.

Rev: server/arg_cache_plugins/replicate.pike:1.26
Rev: server/base_server/roxen.pike:1.963

6:   // 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   //!
3881:    "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")))
3891:    " 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()    {