summaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorade <ade@FreeBSD.org>2000-09-18 21:44:45 +0000
committerade <ade@FreeBSD.org>2000-09-18 21:44:45 +0000
commit88285405289a5aad0f34f8a898930403a5ffc7e1 (patch)
treec35c4f8f63118e6d54ba6f945219f7f24c61a05c /databases
parent800f0f1250708f7916ab6f7bd3e0f38909829ce9 (diff)
downloadFreeBSD-ports-88285405289a5aad0f34f8a898930403a5ffc7e1.zip
FreeBSD-ports-88285405289a5aad0f34f8a898930403a5ffc7e1.tar.gz
Fix a number of issues in the code. See the PR for the long
and detailed explanation. PORTREVISION bumped. PR: 20058 Submitted by: maintainer
Diffstat (limited to 'databases')
-rw-r--r--databases/tcl-Mysql/Makefile1
-rw-r--r--databases/tcl-Mysql/files/patch-aa14
-rw-r--r--databases/tcl-Mysql/files/patch-ab52
3 files changed, 60 insertions, 7 deletions
diff --git a/databases/tcl-Mysql/Makefile b/databases/tcl-Mysql/Makefile
index 5f495e5..79162d6 100644
--- a/databases/tcl-Mysql/Makefile
+++ b/databases/tcl-Mysql/Makefile
@@ -7,6 +7,7 @@
PORTNAME= tcl-sql
PORTVERSION= 20000114
+PORTREVISION= 1
CATEGORIES= databases ${TCL_NODOT}
MASTER_SITES= http://www.binevolve.com/~tdarugar/tcl-sql/download/
EXTRACT_SUFX= .tgz
diff --git a/databases/tcl-Mysql/files/patch-aa b/databases/tcl-Mysql/files/patch-aa
index e6007cc..954548f 100644
--- a/databases/tcl-Mysql/files/patch-aa
+++ b/databases/tcl-Mysql/files/patch-aa
@@ -109,7 +109,7 @@ same queries.
+ if (objc == 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, "command ?handle?");
return TCL_ERROR;
-@@ -133,75 +93,84 @@
+@@ -133,58 +93,58 @@
Manager_sql *mgr = (Manager_sql *)clientData;
- int res = TCL_OK;
+ int res;
@@ -207,17 +207,17 @@ same queries.
- res = selectdbCmd(interp, conn, argv[3]);
- } else {
- Tcl_AppendResult(interp, "sql: unknown sql command: ", argv[1], NULL);
-- return TCL_ERROR;
+ // take care of the command:
+ if (subcommand < Disconnect && subcommand > Query) {
+ /* get the "result handle" returned previously */
-+ if (Tcl_GetIntFromObj(NULL, objv[3], &res) != TCL_OK ||
++ if (objc < 4) res = 0; /* oddly, this is how it was -- bug? */
++ else if (Tcl_GetIntFromObj(NULL, objv[3], &res) != TCL_OK ||
+ res < 0) {
+ Tcl_SetObjResult(interp, objv[3]);
+ Tcl_AppendResult(interp, ": invalid result"
+ " handle", NULL);
-+ return TCL_OK;
- }
+ return TCL_ERROR;
+@@ -192,16 +152,26 @@
}
-
- return res;
@@ -256,7 +256,7 @@ same queries.
+ }
+ return TCL_ERROR; /* not reachable */
}
-@@ -226,7 +195,7 @@
+@@ -226,7 +196,7 @@
- Tcl_CreateCommand (interp, "sql", SqlCmd ,(ClientData) s,
- (Tcl_CmdDeleteProc*) NULL);
@@ -266,5 +266,5 @@ same queries.
- // Provide a package called Sample
- if (Tcl_PkgProvide(interp, "Sql", "1.0") == TCL_ERROR)
+ // Provide a package called ``sql''
-+ if (Tcl_PkgProvide(interp, "sql", "1.0") == TCL_ERROR)
++ if (Tcl_PkgProvide(interp, "sql", "1.1") == TCL_ERROR)
return TCL_ERROR;
diff --git a/databases/tcl-Mysql/files/patch-ab b/databases/tcl-Mysql/files/patch-ab
new file mode 100644
index 0000000..30ad95f
--- /dev/null
+++ b/databases/tcl-Mysql/files/patch-ab
@@ -0,0 +1,52 @@
+--- docs/api.html Wed Jul 22 21:54:38 1998
++++ docs/api.html Wed Jul 19 17:19:34 2000
+@@ -1,2 +1,5 @@
++<HTML>
++<HEAD>
+ <title>Generic Tcl Database Interface API</title>
++</HEAD>
+ <BODY BGCOLOR="#ffffff" LINK="#0000ff" ALINK="#ff0000" TEXT="#000000">
+@@ -55,3 +58,3 @@
+ statement). Use with <code><font color="#000099">fetchrow</font></code> and <code><font color="#000099">endquery</font></code>. <br>
+- <code><font color="#000099">sql query $conn "select * from sample where x > 3"</font></code>
++ <code><font color="#000099">set query [sql query $conn "select * from sample where x &gt; 3"]</font></code>
+
+@@ -62,3 +65,3 @@
+ is returned.<br>
+- <code><font color="#000099">while {[set row [sql fetchrow $conn]] != ""} { puts $row }</font></code>
++ <code><font color="#000099">while {[set row [sql fetchrow $conn $query]] != ""} { puts $row }</font></code>
+
+@@ -66,4 +69,4 @@
+ <p>
+-<hr width=50%>
+-<a name=sample><h3>Sample Usage:</h3></a>
++<hr width="50%">
++<h3><a name=sample>Sample Usage:</a></h3>
+ Also see
+@@ -86,3 +89,3 @@
+ # Put some dummy data in:
+-for {set i 0} {$i < 10} {incr i} {
++for {set i 0} {$i &lt; 10} {incr i} {
+ sql exec $conn "insert into junk values ($i, $i.01, 'xx $i xx')"
+@@ -91,5 +94,5 @@
+ # Do a select and display the results
+-sql query $conn "select * from junk where i > 3"
++set query [sql query $conn "select * from junk where i &gt; 3"]
+
+-while {[set row [sql fetchrow $conn]] != ""} {
++while {[set row [sql fetchrow $conn $query]] != ""} {
+ puts "row = $row"
+@@ -97,3 +100,3 @@
+
+-sql endquery $conn
++sql endquery $conn $query
+
+@@ -113 +116,3 @@
+ </pre>
++</BODY>
++</HTML>
+
+>Release-Note:
+>Audit-Trail:
+>Unformatted:
+
OpenPOWER on IntegriCloud