瀏覽代碼

sql.html, MySQL manual: explain syntax error in case of using a reserved SQL word (help for trac https://trac.osgeo.org/grass/ticket/2184)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59058 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 11 年之前
父節點
當前提交
dc3b5e1e07
共有 3 個文件被更改,包括 18 次插入2 次删除
  1. 6 0
      db/drivers/mysql/grass-mesql.html
  2. 6 0
      db/drivers/mysql/grass-mysql.html
  3. 6 2
      lib/db/sqlp/sql.html

+ 6 - 0
db/drivers/mysql/grass-mesql.html

@@ -57,6 +57,12 @@ The embedded server is started with hardcoded '--bootstrap'
 option to avoid warning about missing 
 "mysql.time_zone_leap_second table". This can be fixed in future.
 
+<h2>Troubleshooting: SQL syntax error</h2>
+
+Attempting to use a reserved SQL word as column or table name will result
+in a "SQL syntax" error. The list of reserved words for MySQL can be
+found in the <a href="http://dev.mysql.com/doc/refman/5.7/en/reserved-words.html#table-reserved-words-5.7.4">MySQL manual</a>.
+
 <h2>SEE ALSO</h2>
 
 <em>

+ 6 - 0
db/drivers/mysql/grass-mysql.html

@@ -110,6 +110,12 @@ MySQL does not support user groups. Any settings specified
 by 'group' parameter of module db.connect are ignored by
 GRASS for MySQL driver.
 
+<h2>Troubleshooting: SQL syntax error</h2>
+
+Attempting to use a reserved SQL word as column or table name will result
+in a "SQL syntax" error. The list of reserved words for MySQL can be
+found in the <a href="http://dev.mysql.com/doc/refman/5.7/en/reserved-words.html#table-reserved-words-5.7.4">MySQL manual</a>.
+
 <h2>SEE ALSO</h2>
 
 <em>

+ 6 - 2
lib/db/sqlp/sql.html

@@ -1,5 +1,7 @@
 <!-- meta page description: SQL support in GRASS GIS -->
 
+<!-- this file is lib/db/sqlp/sql.html -->
+
 GRASS can use various RDBMS
 (<a href="http://en.wikipedia.org/wiki/Relational_database_management_system">Relational
 database management system</a>) and embedded databases. SQL
@@ -49,8 +51,10 @@ d.vect map where="individual='juvenile' and area='beach'"
 <li> An error message such as &quot;<tt>dbmi: Protocol
      error</tt>&quot; either indicates an invalid column name or an
      unsupported column type (then the GRASS SQL parser needs to be
-     extended).
-<li> DBF column names are limited to 10 characters (DBF API definition)
+     extended).</li>
+<li> DBF column names are limited to 10 characters (DBF API definition).</li>
+<li> Attempts to use a reserved SQL word (depends on database backend) as 
+     column or table name will cause a "SQL syntax error".</li>
 </ul>