Commit info for scoop/struct:

Modified Files:
	scoop.sql 
Log Message:
Adding a Scoop::Session module, which removes the dependency on
Apache::Session. This one doesn't use deadlock-prone locking as the previous
one did, and seems to perform better (in a simple benchmark). It should also be
compatible with most databases without any changes, as it uses simple queries.
Also updated sessionreap cron to work with the new session table.

There's no migration script; it's not worth the effort. Users will just have to
log back in.



Index: scoop.sql
===================================================================
RCS file: /cvs/scoop/scoop/struct/scoop.sql,v
retrieving revision 1.196
retrieving revision 1.197
diff -r1.196 -r1.197
1,9c1,9
< # MySQL dump 8.14
< #
< # Host: localhost    Database: scoopdev
< #--------------------------------------------------------
< # Server version	3.23.39-log
< 
< #
< # Table structure for table 'ad_info'
< #
---
> -- MySQL dump 9.10
> --
> -- Host: localhost    Database: scoop
> -- ------------------------------------------------------
> -- Server version	4.0.18
> 
> --
> -- Table structure for table `ad_info`
> --
42c42
< ) TYPE=MyISAM;
---
> );
44,46c44,46
< #
< # Dumping data for table 'ad_info'
< #
---
> --
> -- Dumping data for table `ad_info`
> --
48c48
< INSERT INTO ad_info VALUES (1,'text_ad_template','7981192.png','http://scoop.kuro5hin.org','The swiss army chainsaw of Content Management',NULL,NULL,NULL,NULL,NULL,1,NULL,1,'Scoop','2001-12-21 09:39:12',0,1,0,NULL,0,0,0.00,NULL,NULL,NULL,1,NULL);
---
> INSERT INTO ad_info VALUES (1,'text_ad_template','7981192.png','http://scoop.kuro5hin.org','The swiss army chainsaw of Content Management',NULL,NULL,NULL,NULL,NULL,1,NULL,1,'Scoop','2001-12-21 09:39:12',0,1,0,NULL,0,0,"0.00",NULL,NULL,NULL,1,NULL);
50,52c50,52
< #
< # Table structure for table 'ad_log'
< #
---
> --
> -- Table structure for table `ad_log`
> --
62c62
< ) TYPE=MyISAM;
---
> );
64,66c64,66
< #
< # Dumping data for table 'ad_log'
< #
---
> --
> -- Dumping data for table `ad_log`
> --
69,71c69,71
< #
< # Table structure for table 'ad_payments'
< #
---
> --
> -- Table structure for table `ad_payments`
> --
82c82
< ) TYPE=MyISAM;
---
> );
84,86c84,86
< #
< # Dumping data for table 'ad_payments'
< #
---
> --
> -- Dumping data for table `ad_payments`
> --
89,91c89,91
< #
< # Table structure for table 'ad_types'
< #
---
> --
> -- Table structure for table `ad_types`
> --
109c109
< ) TYPE=MyISAM;
---
> );
111,113c111,113
< #
< # Dumping data for table 'ad_types'
< #
---
> --
> -- Dumping data for table `ad_types`
> --
115c115
< INSERT INTO ad_types VALUES ('text_ad_template','Simple Text Ad','This is a simple text advertisement that allows a title, some text, and a link to your site.','Put in your title, text, and where you want to link to below.',NULL,50,NULL,20,2.50,1,1000,1000000,1,0);
---
> INSERT INTO ad_types VALUES ('text_ad_template','Simple Text Ad','This is a simple text advertisement that allows a title, some text, and a link to your site.','Put in your title, text, and where you want to link to below.',NULL,50,NULL,20,"2.50",1,1000,1000000,1,0);
117,119c117,119
< #
< # Table structure for table 'admin_tools'
< #
---
> --
> -- Table structure for table `admin_tools`
> --
130c130
< ) TYPE=MyISAM;
---
> );
132,134c132,134
< #
< # Dumping data for table 'admin_tools'
< #
---
> --
> -- Dumping data for table `admin_tools`
> --
158,160c158,160
< #
< # Table structure for table 'advertisers'
< #
---
> --
> -- Table structure for table `advertisers`
> --
169c169
< ) TYPE=MyISAM;
---
> );
171,173c171,173
< #
< # Dumping data for table 'advertisers'
< #
---
> --
> -- Dumping data for table `advertisers`
> --
176,178c176,178
< #
< # Table structure for table 'blocks'
< #
---
> --
> -- Table structure for table `blocks`
> --
189c189
< ) TYPE=MyISAM;
---
> );
191,193c191,193
< #
< # Dumping data for table 'blocks'
< #
---
> --
> -- Dumping data for table `blocks`
> --
369,371c369,371
< #
< # Table structure for table 'box'
< #
---
> --
> -- Table structure for table `box`
> --
382c382
< ) TYPE=MyISAM;
---
> );
384,386c384,386
< #
< # Dumping data for table 'box'
< #
---
> --
> -- Dumping data for table `box`
> --
433,435c433,435
< #
< # Table structure for table 'cache_time'
< #
---
> --
> -- Table structure for table `cache_time`
> --
441c441
< ) TYPE=MyISAM;
---
> );
443,445c443,445
< #
< # Dumping data for table 'cache_time'
< #
---
> --
> -- Dumping data for table `cache_time`
> --
470,472c470,472
< #
< # Table structure for table 'commentcodes'
< #
---
> --
> -- Table structure for table `commentcodes`
> --
478c478
< ) TYPE=MyISAM;
---
> );
480,482c480,482
< #
< # Dumping data for table 'commentcodes'
< #
---
> --
> -- Dumping data for table `commentcodes`
> --
488,490c488,490
< #
< # Table structure for table 'commentratings'
< #
---
> --
> -- Table structure for table `commentratings`
> --
500c500
< ) TYPE=MyISAM;
---
> );
502,504c502,504
< #
< # Dumping data for table 'commentratings'
< #
---
> --
> -- Dumping data for table `commentratings`
> --
507,509c507,509
< #
< # Table structure for table 'comments'
< #
---
> --
> -- Table structure for table `comments`
> --
530c530
< ) TYPE=MyISAM;
---
> );
532,534c532,534
< #
< # Dumping data for table 'comments'
< #
---
> --
> -- Dumping data for table `comments`
> --
537,539c537,539
< #
< # Table structure for table 'cron'
< #
---
> --
> -- Table structure for table `cron`
> --
549c549
< ) TYPE=MyISAM;
---
> );
551,553c551,553
< #
< # Dumping data for table 'cron'
< #
---
> --
> -- Dumping data for table `cron`
> --
567,569c567,569
< #
< # Table structure for table 'displaycodes'
< #
---
> --
> -- Table structure for table `displaycodes`
> --
575c575
< ) TYPE=MyISAM;
---
> );
577,579c577,579
< #
< # Dumping data for table 'displaycodes'
< #
---
> --
> -- Dumping data for table `displaycodes`
> --
587,589c587,589
< #
< # Table structure for table 'editcategorycodes'
< #
---
> --
> -- Table structure for table `editcategorycodes`
> --
596c596
< ) TYPE=MyISAM;
---
> );
598,600c598,600
< #
< # Dumping data for table 'editcategorycodes'
< #
---
> --
> -- Dumping data for table `editcategorycodes`
> --
605,607c605,607
< #
< # Table structure for table 'hooks'
< #
---
> --
> -- Table structure for table `hooks`
> --
615c615
< ) TYPE=MyISAM;
---
> );
617,619c617,619
< #
< # Dumping data for table 'hooks'
< #
---
> --
> -- Dumping data for table `hooks`
> --
626,628c626,628
< #
< # Table structure for table 'log_info'
< #
---
> --
> -- Table structure for table `log_info`
> --
640c640
< ) TYPE=MyISAM;
---
> );
642,644c642,644
< #
< # Dumping data for table 'log_info'
< #
---
> --
> -- Dumping data for table `log_info`
> --
647,649c647,649
< #
< # Table structure for table 'log_info_extended'
< #
---
> --
> -- Table structure for table `log_info_extended`
> --
655c655
< ) TYPE=MyISAM;
---
> );
657,659c657,659
< #
< # Dumping data for table 'log_info_extended'
< #
---
> --
> -- Dumping data for table `log_info_extended`
> --
662,664c662,664
< #
< # Table structure for table 'macros'
< #
---
> --
> -- Table structure for table `macros`
> --
672c672
< ) TYPE=MyISAM;
---
> );
674,676c674,676
< #
< # Dumping data for table 'macros'
< #
---
> --
> -- Dumping data for table `macros`
> --
680,682c680,682
< #
< # Table structure for table 'ops'
< #
---
> --
> -- Table structure for table `ops`
> --
695c695
< ) TYPE=MyISAM;
---
> );
697,699c697,699
< #
< # Dumping data for table 'ops'
< #
---
> --
> -- Dumping data for table `ops`
> --
736,738c736,738
< #
< # Table structure for table 'patches'
< #
---
> --
> -- Table structure for table `patches`
> --
746c746
< ) TYPE=MyISAM;
---
> );
748,750c748,750
< #
< # Dumping data for table 'patches'
< #
---
> --
> -- Dumping data for table `patches`
> --
883a884,885
> INSERT INTO patches VALUES ('1_1-dev',1,'MultiPolls','sql');
> INSERT INTO patches VALUES ('1_1-dev',2,'Sessions','sql');
885,887c887,889
< #
< # Table structure for table 'perm_groups'
< #
---
> --
> -- Table structure for table `perm_groups`
> --
895c897
< ) TYPE=MyISAM;
---
> );
897,899c899,901
< #
< # Dumping data for table 'perm_groups'
< #
---
> --
> -- Dumping data for table `perm_groups`
> --
908,910c910,912
< #
< # Table structure for table 'pollanswers'
< #
---
> --
> -- Table structure for table `pollanswers`
> --
918c920
< ) TYPE=MyISAM;
---
> );
920,922c922,924
< #
< # Dumping data for table 'pollanswers'
< #
---
> --
> -- Dumping data for table `pollanswers`
> --
933,935c935,937
< #
< # Table structure for table 'pollquestions'
< #
---
> --
> -- Table structure for table `pollquestions`
> --
945c947
< ) TYPE=MyISAM;
---
> );
947,949c949,951
< #
< # Dumping data for table 'pollquestions'
< #
---
> --
> -- Dumping data for table `pollquestions`
> --
954,956c956,958
< #
< # Table structure for table 'pollvoters'
< #
---
> --
> -- Table structure for table `pollvoters`
> --
965c967
< ) TYPE=MyISAM;
---
> );
967,969c969,971
< #
< # Dumping data for table 'pollvoters'
< #
---
> --
> -- Dumping data for table `pollvoters`
> --
974,976c976,978
< #
< # Table structure for table 'post_throttle'
< #
---
> --
> -- Table structure for table `post_throttle`
> --
984c986
< ) TYPE=MyISAM;
---
> );
986,988c988,990
< #
< # Dumping data for table 'post_throttle'
< #
---
> --
> -- Dumping data for table `post_throttle`
> --
991,993c993,995
< #
< # Table structure for table 'rdf_channels'
< #
---
> --
> -- Table structure for table `rdf_channels`
> --
1012c1014
< ) TYPE=MyISAM;
---
> );
1014,1016c1016,1018
< #
< # Dumping data for table 'rdf_channels'
< #
---
> --
> -- Dumping data for table `rdf_channels`
> --
1022,1024c1024,1026
< #
< # Table structure for table 'rdf_items'
< #
---
> --
> -- Table structure for table `rdf_items`
> --
1033c1035
< ) TYPE=MyISAM;
---
> );
1035,1037c1037,1039
< #
< # Dumping data for table 'rdf_items'
< #
---
> --
> -- Dumping data for table `rdf_items`
> --
1070,1072c1072,1074
< #
< # Table structure for table 'section_perms'
< #
---
> --
> -- Table structure for table `section_perms`
> --
1080c1082
< ) TYPE=MyISAM;
---
> );
1082,1084c1084,1086
< #
< # Dumping data for table 'section_perms'
< #
---
> --
> -- Dumping data for table `section_perms`
> --
1105,1107c1107,1109
< #
< # Table structure for table 'sections'
< #
---
> --
> -- Table structure for table `sections`
> --
1115c1117
< ) TYPE=MyISAM;
---
> );
1117,1119c1119,1121
< #
< # Dumping data for table 'sections'
< #
---
> --
> -- Dumping data for table `sections`
> --
1125,1127c1127,1129
< #
< # Table structure for table 'sessions'
< #
---
> --
> -- Table structure for table `sessions`
> --
1130,1139c1132,1142
<   last_accessed timestamp(14) NOT NULL,
<   id varchar(32) NOT NULL default '',
<   length int(11) default NULL,
<   a_session text,
<   PRIMARY KEY  (id)
< ) TYPE=MyISAM;
< 
< #
< # Dumping data for table 'sessions'
< #
---
>   session_id varchar(32) NOT NULL default '',
>   item varchar(255) NOT NULL default '',
>   value text,
>   serialized int(1) default '0',
>   last_update datetime default NULL,
>   PRIMARY KEY  (session_id,item)
> );
> 
> --
> -- Dumping data for table `sessions`
> --
1142,1144c1145,1147
< #
< # Table structure for table 'special'
< #
---
> --
> -- Table structure for table `special`
> --
1152c1155
< ) TYPE=MyISAM;
---
> );
1154,1156c1157,1159
< #
< # Dumping data for table 'special'
< #
---
> --
> -- Dumping data for table `special`
> --
1169,1171c1172,1174
< #
< # Table structure for table 'statuscodes'
< #
---
> --
> -- Table structure for table `statuscodes`
> --
1177c1180
< ) TYPE=MyISAM;
---
> );
1179,1181c1182,1184
< #
< # Dumping data for table 'statuscodes'
< #
---
> --
> -- Dumping data for table `statuscodes`
> --
1187,1189c1190,1192
< #
< # Table structure for table 'stories'
< #
---
> --
> -- Table structure for table `stories`
> --
1215c1218
< ) TYPE=MyISAM;
---
> );
1217,1219c1220,1222
< #
< # Dumping data for table 'stories'
< #
---
> --
> -- Dumping data for table `stories`
> --
1223,1225c1226,1228
< #
< # Table structure for table 'storymoderate'
< #
---
> --
> -- Table structure for table `storymoderate`
> --
1234c1237
< ) TYPE=MyISAM;
---
> );
1236,1238c1239,1241
< #
< # Dumping data for table 'storymoderate'
< #
---
> --
> -- Dumping data for table `storymoderate`
> --
1241,1243c1244,1246
< #
< # Table structure for table 'subscription_info'
< #
---
> --
> -- Table structure for table `subscription_info`
> --
1254c1257
< ) TYPE=MyISAM;
---
> );
1256,1258c1259,1261
< #
< # Dumping data for table 'subscription_info'
< #
---
> --
> -- Dumping data for table `subscription_info`
> --
1261,1263c1264,1266
< #
< # Table structure for table 'subscription_payments'
< #
---
> --
> -- Table structure for table `subscription_payments`
> --
1275c1278
< ) TYPE=MyISAM;
---
> );
1277,1279c1280,1282
< #
< # Dumping data for table 'subscription_payments'
< #
---
> --
> -- Dumping data for table `subscription_payments`
> --
1282,1284c1285,1287
< #
< # Table structure for table 'subscription_types'
< #
---
> --
> -- Table structure for table `subscription_types`
> --
1293c1296
< ) TYPE=MyISAM;
---
> );
1295,1297c1298,1300
< #
< # Dumping data for table 'subscription_types'
< #
---
> --
> -- Dumping data for table `subscription_types`
> --
1300,1302c1303,1305
< #
< # Table structure for table 'subsections'
< #
---
> --
> -- Table structure for table `subsections`
> --
1311c1314
< ) TYPE=MyISAM;
---
> );
1313,1315c1316,1318
< #
< # Dumping data for table 'subsections'
< #
---
> --
> -- Dumping data for table `subsections`
> --
1318,1320c1321,1323
< #
< # Table structure for table 'topics'
< #
---
> --
> -- Table structure for table `topics`
> --
1329c1332
< ) TYPE=MyISAM;
---
> );
1331,1333c1334,1336
< #
< # Dumping data for table 'topics'
< #
---
> --
> -- Dumping data for table `topics`
> --
1339,1341c1342,1344
< #
< # Table structure for table 'userprefs'
< #
---
> --
> -- Table structure for table `userprefs`
> --
1348c1351
< ) TYPE=MyISAM;
---
> );
1350,1352c1353,1355
< #
< # Dumping data for table 'userprefs'
< #
---
> --
> -- Dumping data for table `userprefs`
> --
1355,1357c1358,1360
< #
< # Table structure for table 'users'
< #
---
> --
> -- Table structure for table `users`
> --
1390c1393
< ) TYPE=MyISAM;
---
> );
1392,1394c1395,1397
< #
< # Dumping data for table 'users'
< #
---
> --
> -- Dumping data for table `users`
> --
1398,1400c1401,1403
< #
< # Table structure for table 'vars'
< #
---
> --
> -- Table structure for table `vars`
> --
1409c1412
< ) TYPE=MyISAM;
---
> );
1411,1413c1414,1416
< #
< # Dumping data for table 'vars'
< #
---
> --
> -- Dumping data for table `vars`
> --
1617,1619c1620,1622
< #
< # Table structure for table 'viewed_stories'
< #
---
> --
> -- Table structure for table `viewed_stories`
> --
1629c1632
< ) TYPE=MyISAM;
---
> );
1631,1633c1634,1636
< #
< # Dumping data for table 'viewed_stories'
< #
---
> --
> -- Dumping data for table `viewed_stories`
> --
1637,1639c1640,1642
< #
< # Table structure for table 'whos_online'
< #
---
> --
> -- Table structure for table `whos_online`
> --
1646c1649
< ) TYPE=MyISAM;
---
> );
1648,1650c1651,1653
< #
< # Dumping data for table 'whos_online'
< #
---
> --
> -- Dumping data for table `whos_online`
> --