~gz/ubuntu/wily/steam/new_rel_udev_rules

« back to all changes in this revision

Viewing changes to tools/debug/db_timeout.pike

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-10-29 19:51:18 UTC
  • mfrom: (1.1.4) (0.1.4 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131029195118-b9bxciz5hwx5z459
Tags: 1:1.0.0.39-2ubuntu1
Add an epoch to the version number as there was an unrelated steam package
in the archive with a higher version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2004  Thomas Bopp, Thorsten Hampel, Ludger Merkens
2
 
 *
3
 
 *  This program is free software; you can redistribute it and/or modify
4
 
 *  it under the terms of the GNU General Public License as published by
5
 
 *  the Free Software Foundation; either version 2 of the License, or
6
 
 *  (at your option) any later version.
7
 
 *
8
 
 *  This program is distributed in the hope that it will be useful,
9
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 *  GNU General Public License for more details.
12
 
 *
13
 
 *  You should have received a copy of the GNU General Public License
14
 
 *  along with this program; if not, write to the Free Software
15
 
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
 
 * 
17
 
 * $Id: db_timeout.pike,v 1.1.1.1 2006/03/27 12:40:19 exodusd Exp $
18
 
 */
19
 
 
20
 
constant cvs_version="$Id: db_timeout.pike,v 1.1.1.1 2006/03/27 12:40:19 exodusd Exp $";
21
 
 
22
 
Sql.Sql db_handle;
23
 
Calendar.ISO cal = Calendar.ISO->set_language("german");
24
 
 
25
 
void test_connect(int time)
26
 
{
27
 
    werror(sprintf("%s: (%d) connecting database - ",
28
 
                   cal->Second()->format_nice(), time));
29
 
    string erg = db_handle->host_info();
30
 
    werror("("+erg+")");
31
 
    Sql.sql_result res = db_handle->big_query("select ob_id, ob_class from "+
32
 
                                              "objects where ob_id = "+
33
 
                                              (random(17)+2));
34
 
 
35
 
    string sId, sClass;
36
 
 
37
 
    [sId, sClass] = res->fetch_row();
38
 
    werror(sprintf(" [%s, %s]\n", sId, sClass));
39
 
    call_out(test_connect, 2*time, 2*time);
40
 
}
41
 
 
42
 
int main() {
43
 
    db_handle = Sql.Sql("mysql://balduin:steam?mysql@localhost/balduinDev");
44
 
    call_out(test_connect,1 ,1);
45
 
    return -1;
46
 
}