You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2013/09/13 17:57:53 UTC
svn commit: r1522987 - in /tcl/rivet/trunk: ChangeLog
rivet/packages/dio/dio_Mysql.tcl
Author: mxmanghi
Date: Fri Sep 13 15:57:53 2013
New Revision: 1522987
URL: http://svn.apache.org/r1522987
Log:
* rivet/packages/dio/dio_Mysql.tcl: attempting to correct detection of
SELECT query by checking if a SELECT keyword exists at the beginning of
query either following a '(' or only space characters (their trimmed away
in any case)
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/rivet/packages/dio/dio_Mysql.tcl
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1522987&r1=1522986&r2=1522987&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Fri Sep 13 15:57:53 2013
@@ -1,3 +1,9 @@
+2013-09-13 Massimo Manghi <mx...@apache.org>
+ * rivet/packages/dio/dio_Mysql.tcl: attempting to correct detection of
+ SELECT query by checking if a SELECT keyword exists at the beginning of
+ query either following a '(' or only space characters (their trimmed away
+ in any case)
+
2013-08-30 Massimo Manghi <mx...@apache.org>
* rivet/rivet-tcl/parray.tcl: escaping SGML characters that might appear
in the output to avoid cross scripting
Modified: tcl/rivet/trunk/rivet/packages/dio/dio_Mysql.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/dio/dio_Mysql.tcl?rev=1522987&r1=1522986&r2=1522987&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/dio/dio_Mysql.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/dio/dio_Mysql.tcl Fri Sep 13 15:57:53 2013
@@ -73,8 +73,10 @@ namespace eval DIO {
#
set q [::string trim $req]
set q [::string tolower $q]
- set q [::string range $q 0 5]
- if {[::string match select $q]} { set cmd mysqlsel }
+# set q [::string range $q 0 5]
+# if {[::string match select $q]} { set cmd mysqlsel }
+
+ if {[regexp {^\(*\s*select\s+} $pp]} { set cmd mysqlsel }
set errorinfo ""
if {[catch {$cmd $conn $req} error]} {
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org