~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to db/drivers/mysql/describe.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    db_append_string(&sql, " where 1 = 0");
29
29
 
30
30
    if (mysql_query(connection, db_get_string(&sql)) != 0) {
31
 
        append_error(db_get_string(&sql));
32
 
        append_error("\n");
33
 
        append_error(mysql_error(connection));
34
 
        report_error();
 
31
        db_d_append_error("%s\n%s\n%s",
 
32
                          _("Unable to describe table:"),
 
33
                          db_get_string(&sql),
 
34
                          mysql_error(connection));
 
35
        db_d_report_error();
35
36
        return DB_FAILED;
36
37
    }
37
38
 
38
39
    res = mysql_store_result(connection);
39
40
 
40
41
    if (res == NULL) {
41
 
        append_error(db_get_string(&sql));
42
 
        append_error("\n");
43
 
        append_error(mysql_error(connection));
44
 
        report_error();
 
42
        db_d_append_error("%s\n%s",
 
43
                          db_get_string(&sql),
 
44
                          mysql_error(connection));
 
45
        db_d_report_error();
45
46
        return DB_FAILED;
46
47
    }
47
48
 
48
49
    if (describe_table(res, table, NULL) == DB_FAILED) {
49
 
        append_error("Cannot describe table\n");
50
 
        report_error();
 
50
        db_d_append_error(_("Unable to describe table"));
 
51
        db_d_report_error();
51
52
        mysql_free_result(res);
52
53
        return DB_FAILED;
53
54
    }