Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
dc3b5e1e07

+ 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 
 option to avoid warning about missing 
 "mysql.time_zone_leap_second table". This can be fixed in future.
 "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>
 <h2>SEE ALSO</h2>
 
 
 <em>
 <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
 by 'group' parameter of module db.connect are ignored by
 GRASS for MySQL driver.
 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>
 <h2>SEE ALSO</h2>
 
 
 <em>
 <em>

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

@@ -1,5 +1,7 @@
 <!-- meta page description: SQL support in GRASS GIS -->
 <!-- meta page description: SQL support in GRASS GIS -->
 
 
+<!-- this file is lib/db/sqlp/sql.html -->
+
 GRASS can use various RDBMS
 GRASS can use various RDBMS
 (<a href="http://en.wikipedia.org/wiki/Relational_database_management_system">Relational
 (<a href="http://en.wikipedia.org/wiki/Relational_database_management_system">Relational
 database management system</a>) and embedded databases. SQL
 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
 <li> An error message such as &quot;<tt>dbmi: Protocol
      error</tt>&quot; either indicates an invalid column name or an
      error</tt>&quot; either indicates an invalid column name or an
      unsupported column type (then the GRASS SQL parser needs to be
      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>
 </ul>