Explorar o código

remove test if SELECT statement is used

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35478 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler %!s(int64=16) %!d(string=hai) anos
pai
achega
b84011dff2
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  1. 1 6
      db/db.execute/execute.c

+ 1 - 6
db/db.execute/execute.c

@@ -135,7 +135,7 @@ static void parse_command_line(int argc, char **argv)
 
 static int get_stmt(FILE * fd, dbString * stmt)
 {
-    char buf[4000], buf2[4000], buf3[7];
+    char buf[4000], buf2[4000];
     int len, row = 0;
 
     db_init_string(stmt);
@@ -145,11 +145,6 @@ static int get_stmt(FILE * fd, dbString * stmt)
 	G_chop(buf2);
 	len = strlen(buf2);
 
-	strncpy(buf3, buf2, 6);
-	if (G_strcasecmp(buf3, "select") == 0)
-	    G_fatal_error(_("Use db.select for SELECT SQL statements"));
-
-	len = strlen(buf2);
 	if (buf2[len - 1] == ';') {	/* end of statement */
 	    buf2[len - 1] = 0;	/* truncate ';' */
 	    db_append_string(stmt, buf2);	/* append truncated */