List:Commits« Previous MessageNext Message »
From:capttofu Date:August 15 2008 1:31pm
Subject:[svn:DBD-mysql] r11649 - in DBD-mysql/trunk: . lib/DBD
View as plain text  
Author: capttofu
Date: Fri Aug 15 06:31:25 2008
New Revision: 11649

Modified:
   DBD-mysql/trunk/ChangeLog
   DBD-mysql/trunk/INSTALL.html
   DBD-mysql/trunk/META.yml
   DBD-mysql/trunk/Makefile.PL
   DBD-mysql/trunk/README
   DBD-mysql/trunk/dbdimp.c
   DBD-mysql/trunk/lib/DBD/mysql.pm

Log:
Cleanups to make mysqlEmb work under Cygwin - Thanks to Chris Rodgers  
<http://rodgers.org.uk/> !


Modified: DBD-mysql/trunk/ChangeLog
==============================================================================
--- DBD-mysql/trunk/ChangeLog	(original)
+++ DBD-mysql/trunk/ChangeLog	Fri Aug 15 06:31:25 2008
@@ -1,6 +1,10 @@
 2008-8-15 Patrick Galbraith <patg@stripped> (4.008)
-* Multi statement patch, thank you Chris Heath!
+* Multi statement patch, thanks to Chris Heath!
 * Disabled TAKE_IMP_DATA_VERSION because segfault with DBI < 1.607
+* #29528: bind_param(..., SQL_FLOAT) ignores exponents - fixed, Thanks to
+Tokuhiro Matsuno!
+* Cleanups to make mysqlEmb work under Cygwin - Thanks to Chris Rodgers  
+<http://rodgers.org.uk/> ! 
 
 2008-5-11 Patrick Galbraith <patg@stripped> (4.007)
 

Modified: DBD-mysql/trunk/INSTALL.html
==============================================================================
--- DBD-mysql/trunk/INSTALL.html	(original)
+++ DBD-mysql/trunk/INSTALL.html	Fri Aug 15 06:31:25 2008
@@ -4,7 +4,7 @@
 <head>
 <title>INSTALL - How to install and configure DBD::mysql</title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:patg@stripped" />
+<link rev="made" href="mailto:root@stripped" />
 </head>
 
 <body style="background-color: white">

Modified: DBD-mysql/trunk/META.yml
==============================================================================
--- DBD-mysql/trunk/META.yml	(original)
+++ DBD-mysql/trunk/META.yml	Fri Aug 15 06:31:25 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         DBD-mysql
-version:      4.0.0
+version:      4.008
 version_from: lib/DBD/mysql.pm
 installdirs:  site
 requires:

Modified: DBD-mysql/trunk/Makefile.PL
==============================================================================
--- DBD-mysql/trunk/Makefile.PL	(original)
+++ DBD-mysql/trunk/Makefile.PL	Fri Aug 15 06:31:25 2008
@@ -108,7 +108,11 @@
   if ($source->{'embedded'} eq 'mysql_config')
   {
     #We have to use libmygcc to resolve linking problem  
-    $opt->{'embedded'} .= " -lmygcc";
+    # this causes problems for cygwin
+    #$opt->{'embedded'} .= " -lmygcc";
+    # Under Cygwin (at least) we have to use libstdc++ to resolve linking
+    # problem because libmysqld is built using g++ rather than gcc.
+    $opt->{'embedded'} .= " -lstdc++";
   }
 
   my @files = ($^O =~ /mswin32/i) ? qw(mysqlclient.lib) :
@@ -261,9 +265,6 @@
                                        replace =>  { '\$mdriver =.*' => "\$mdriver
=\'mysqlEmb\';"},
                                        makedir => 'mysqlEmb/t'
                                     },
-                       't/10dsnlist.t' => { filename => 'mysqlEmb/t/10dsnlist.t',
-                                            makedir => 'mysqlEmb/t'
-                                          },
                        't/20createdrop.t' => { filename =>
'mysqlEmb/t/20createdrop.t',
                                                makedir => 'mysqlEmb/t'
                                              },
@@ -294,21 +295,6 @@
                        't/60leaks.t' => { filename => 'mysqlEmb/t/60leaks.t',
                                                                     makedir =>
'mysqlEmb/t'
                                                                   },
-                       't/dbdadmin.t' => { filename => 'mysqlEmb/t/dbdadmin.t',
-                                                                    makedir =>
'mysqlEmb/t'
-                                                                  },
-                       't/insertid.t' => { filename => 'mysqlEmb/t/insertid.t',
-                                                                    makedir =>
'mysqlEmb/t'
-                                                                  },
-                       't/texecute.t' => { filename => 'mysqlEmb/t/texecute.t',
-                                                                    makedir =>
'mysqlEmb/t'
-                                                                  },
-                       't/prepare_noerror.t' => { filename =>
'mysqlEmb/t/prepare_noerror.t',
-                                                                    makedir =>
'mysqlEmb/t'
-                                                                  },
-                       't/param_values.t' => { filename =>
'mysqlEmb/t/param_values.t',
-                                                                    makedir =>
'mysqlEmb/t'
-                                                                  },
                        't/00base.t' => { filename => 'mysqlEmb/t/00base.t',
                                                                     makedir =>
'mysqlEmb/t'
                                                                   },
@@ -347,6 +333,8 @@
 
   $e{'INC'} .= " -DDBD_MYSQL_EMBEDDED";
 
+  print "Preparing embedded Makefile\n";
+
   #Create Makefile.conf for mysqlEmb Makefile.PL
   create_makefile(Data::Dumper->Dump([\%e], ["o"]));
 
@@ -387,9 +375,10 @@
   --libs=<libs>          Use <libs> for running the linker; defaults
                          to the value of "mysql_config --libs" or a gussed
                          value
-  --embedded=<libs>      Build embedded version of DBD and use <libs> for
this;
-                         defaults to the value of "mysql_config --embedded" 
-                         (default: off)
+  --force-embedded       Build version of driver supporting mysqlEmb
+  --embedded=<libs>      Use these libs when building the embedded version of
+                         DBD (with --force-embedded). Defaults to the value of
+                         "mysql_config --embedded".
   --testdb=<db>          Use the database <db> for running the test suite;
                          defaults to $TESTDB
   --testuser=<user>      Use the username <user> for running the test suite;
@@ -411,7 +400,6 @@
   --ps-protocol          Toggle the use of driver emulated prepared statements
                          prepare, requires MySQL server >= 4.1.3 for
                          server side prepared statements, off by default 
-  --force-embedded       Force to build embedded version of driver
   --ssl			 Enable SSL support
   --help                 Print this message and exit
 

Modified: DBD-mysql/trunk/README
==============================================================================
--- DBD-mysql/trunk/README	(original)
+++ DBD-mysql/trunk/README	Fri Aug 15 06:31:25 2008
@@ -50,6 +50,28 @@
       make test # Some minor error messages can be ignored here
       make install
 
+  Windows/CygWin (to build with embedded MySQL too)
+
+    First, build MySQL
+      tar -xzf mysql-5.0.51b.tar.gz
+      cd mysql-5.0.51b/
+      ./configure --without-server --with-embedded-server
+      make
+      make install
+
+    Then build DBD::mysqlEmb
+      cpan
+      look DBD::mysql
+      perl Makefile.PL --force-embedded
+      make
+      make install
+
+    Test with the following snippet
+      perl -e 'use DBI; $dbh =
DBI->connect("DBI:mysqlEmb:database=test;mysql_embedded=1;mysql_embedded_options=--help,--verbose","a","b");'
+    
+    If your build is OK, this will print the mysql embedded help.
+
+
   Linux/Red Hat (you may prefer gnorpm to use)
 
     rpm -i mysql mysql-devel mysql-server

Modified: DBD-mysql/trunk/dbdimp.c
==============================================================================
--- DBD-mysql/trunk/dbdimp.c	(original)
+++ DBD-mysql/trunk/dbdimp.c	Fri Aug 15 06:31:25 2008
@@ -4609,10 +4609,11 @@
 {
     int seen_neg;
     int seen_dec;
+    int seen_e;
+    int seen_plus;
     char *cp;
 
-    seen_neg= 0;
-    seen_dec= 0;
+    seen_neg= seen_dec= seen_e= seen_plus= 0;
 
     if (len <= 0) {
         len= strlen(string);
@@ -4628,17 +4629,14 @@
     {
         if ('-' == *cp)
         {
-            if (seen_neg)
+            if (seen_neg >= 2)
             {
-              /* second '-' */
+              /*
+                third '-'. number can contains two '-'.
+                because -1e-10 is valid number */
               break;
             }
-            else if (cp > string)
-            {
-              /* '-' after digit(s) */
-              break;
-            }
-            seen_neg= 1;
+            seen_neg += 1;
         }
         else if ('.' == *cp)
         {
@@ -4649,7 +4647,25 @@
             }
             seen_dec= 1;
         }
-        else if (!isdigit(*cp))
+        else if ('e' == *cp)
+        {
+            if (seen_e)
+            {
+                /* second 'e' */
+                break;
+            }
+            seen_e= 1;
+        }
+        else if ('+' == *cp)
+        {
+            if (seen_plus)
+            {
+                /* second '+' */
+                break;
+            }
+            seen_plus= 1;
+        }
+       else if (!isdigit(*cp))
         {
             break;
         }

Modified: DBD-mysql/trunk/lib/DBD/mysql.pm
==============================================================================
--- DBD-mysql/trunk/lib/DBD/mysql.pm	(original)
+++ DBD-mysql/trunk/lib/DBD/mysql.pm	Fri Aug 15 06:31:25 2008
@@ -1071,7 +1071,12 @@
 
 Example:
 
+use DBI;
 $testdsn="DBI:mysqlEmb:database=test;mysql_embedded_options=--help,--verbose";
+$dbh = DBI->connect($testdsn,"a","b");
+
+This would cause the command line help to the embedded MySQL server library
+to be printed.
 
 
 =item mysql_embedded_groups
Thread
[svn:DBD-mysql] r11649 - in DBD-mysql/trunk: . lib/DBDcapttofu15 Aug