perl.dbi.users https://www.nntp.perl.org/group/perl.dbi.users/ ... Copyright 1998-2018 perl.org Sat, 20 Oct 2018 08:28:06 +0000 ask@perl.org Statically linking DBI and DBD::SQLite into my (Web)Perl by Max Maischein Hello all,<br/><br/>I&#39;m not sure if dbi-users is the correct mailing list for my question -<br/>feel free to forward this mail to dbi-dev or whereever is more appropriate.<br/><br/>I&#39;m building a statically linked Perl binary, and I want to include SQL<br/>functionality. This is easy by statically linking DBI. But I&#39;ve<br/>encountered problems linking DBD::SQLite statically, because its<br/>Makefile.PL uses DBI and wants to use and modify the postamble that<br/>DBI::DBD provides.<br/><br/>My question is: Is there a recipe how I can link DBD::SQLite statically<br/>into my Perl binary? Is there a way I can fake enough of an &quot;installed<br/>DBI&quot; for my static Perl to get the Makefile.PL of a DBD to run, or<br/>should I patch the Makefile.PL to use hardcoded values?<br/><br/>This is all for WebPerl [1] to provide a safe online Perl playground and<br/>also to run Perl in your browser.<br/><br/>Thank you very much,<br/>-max<br/><br/>[1] https://webperl.zero-g.net/<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/10/msg37632.html Thu, 18 Oct 2018 05:31:27 +0000 Re: Wierd issue with printf and DBD::Pg by Peter Vanroose Use sprintf instead of printf. <br/> <br/>-- Peter Vanroose. <br/> <br/> <br/>On 1 october 2018 12:13 Mike Martin &lt;&lt;redtux1@gmail.com&gt;&gt; wrote: <br/> <br/>&gt; If I use printf to round a numeric value before inserting into postgres table it is altered to 1 rather than the value when it is put into a table <br/>&gt; <br/>&gt; example <br/>&gt; <br/>&gt; CREATE TABLE public.chksize <br/>&gt; ( <br/>&gt; size numeric(10,2), #does not matter what field type <br/>&gt; path1 character varying COLLATE pg_catalog.&quot;default&quot; <br/>&gt; ) <br/>&gt; <br/>&gt; this creates a value of 1 for every value <br/>&gt; <br/>&gt; <br/>&gt; my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;); <br/>&gt; open my $list ,&#39;chksizer.txt&#39;; <br/>&gt; no strict &#39;refs&#39;; <br/>&gt; my @list=(&lt;$list&gt;); <br/>&gt; foreach my $k (@list){ <br/>&gt; chomp $k; <br/>&gt; my ($size,$path)=split /,/,$k; <br/>&gt; my $size1=printf(&#39;%.1f&#39;,$size/(1024*1024)); <br/>&gt; $ins-&gt;bind_param(1,$size1); <br/>&gt; $ins-&gt;bind_param(2,$path); <br/>&gt; $ins-&gt;execute; <br/>&gt; } <br/>&gt; <br/>&gt; without printf this inserts proper value <br/>&gt; <br/>&gt; <br/>&gt; my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;); <br/>&gt; open my $list ,&#39;chksizer.txt&#39;; <br/>&gt; no strict &#39;refs&#39;; <br/>&gt; my @list=(&lt;$list&gt;); <br/>&gt; foreach my $k (@list){ <br/>&gt; chomp $k; <br/>&gt; my ($size,$path)=split /,/,$k; <br/>&gt; my $size1=$size/(1024*1024); <br/>&gt; $ins-&gt;bind_param(1,$size1); <br/>&gt; $ins-&gt;bind_param(2,$path); <br/>&gt; $ins-&gt;execute; <br/>&gt; } <br/>&gt; <br/>&gt; Any ideas what is happening here? <br/>&gt; <br/>&gt; thanks <br/>&gt; <br/>&gt; Mike <br/>&gt; <br/>&gt; <br/>&gt; <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/10/msg37631.html Mon, 01 Oct 2018 19:13:24 +0000 Re: Wierd issue with printf and DBD::Pg by pali On Monday 01 October 2018 11:13:48 Mike Martin wrote:<br/>&gt; HI<br/>&gt; If I use printf to round a numeric value before inserting into postgres<br/>&gt; table it is altered to 1 rather than the value when it is put into a table<br/><br/>Hi! Function printf takes format string with parameters and then it<br/>prints to the standard output. And returns 1 (true) if is succeed.<br/><br/>&gt; example<br/>&gt; CREATE TABLE public.chksize<br/>&gt; (<br/>&gt; size numeric(10,2), #does not matter what field type<br/>&gt; path1 character varying COLLATE pg_catalog.&quot;default&quot;<br/>&gt; )<br/>&gt; <br/>&gt; this creates a value of 1 for every value<br/>&gt; <br/>&gt; my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;);<br/>&gt; open my $list ,&#39;chksizer.txt&#39;;<br/>&gt; no strict &#39;refs&#39;;<br/>&gt; my @list=(&lt;$list&gt;);<br/>&gt; foreach my $k (@list){<br/>&gt; chomp $k;<br/>&gt; my ($size,$path)=split /,/,$k;<br/>&gt; my $size1=printf(&#39;%.1f&#39;,$size/(1024*1024));<br/><br/>... so value &#39;%.1f&#39;,$size/(1024*1024) is printed to STDOUT. Printing<br/>succeed and therefore into $size1 is assigned 1 (true value).<br/><br/>You probably want to use sprintf function which returns formatted string<br/>instead of printing it to STDOUT.<br/><br/>&gt; $ins-&gt;bind_param(1,$size1);<br/>&gt; $ins-&gt;bind_param(2,$path);<br/>&gt; $ins-&gt;execute;<br/>&gt; }<br/>&gt; <br/>&gt; without printf this inserts proper value<br/>&gt; <br/>&gt; my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;);<br/>&gt; open my $list ,&#39;chksizer.txt&#39;;<br/>&gt; no strict &#39;refs&#39;;<br/>&gt; my @list=(&lt;$list&gt;);<br/>&gt; foreach my $k (@list){<br/>&gt; chomp $k;<br/>&gt; my ($size,$path)=split /,/,$k;<br/>&gt; my $size1=$size/(1024*1024);<br/>&gt; $ins-&gt;bind_param(1,$size1);<br/>&gt; $ins-&gt;bind_param(2,$path);<br/>&gt; $ins-&gt;execute;<br/>&gt; }<br/>&gt; <br/>&gt; Any ideas what is happening here?<br/>&gt; <br/>&gt; thanks<br/>&gt; <br/>&gt; Mike<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/10/msg37630.html Mon, 01 Oct 2018 10:19:04 +0000 Wierd issue with printf and DBD::Pg by Mike Martin HI<br/>If I use printf to round a numeric value before inserting into postgres<br/>table it is altered to 1 rather than the value when it is put into a table<br/><br/>example<br/>CREATE TABLE public.chksize<br/>(<br/> size numeric(10,2), #does not matter what field type<br/> path1 character varying COLLATE pg_catalog.&quot;default&quot;<br/>)<br/><br/>this creates a value of 1 for every value<br/><br/>my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;);<br/>open my $list ,&#39;chksizer.txt&#39;;<br/>no strict &#39;refs&#39;;<br/>my @list=(&lt;$list&gt;);<br/>foreach my $k (@list){<br/>chomp $k;<br/>my ($size,$path)=split /,/,$k;<br/>my $size1=printf(&#39;%.1f&#39;,$size/(1024*1024));<br/>$ins-&gt;bind_param(1,$size1);<br/>$ins-&gt;bind_param(2,$path);<br/>$ins-&gt;execute;<br/>}<br/><br/>without printf this inserts proper value<br/><br/>my $ins=$dbh-&gt;prepare(&quot;INSERT into chksize (size,path1) VALUES (?,?) &quot;);<br/>open my $list ,&#39;chksizer.txt&#39;;<br/>no strict &#39;refs&#39;;<br/>my @list=(&lt;$list&gt;);<br/>foreach my $k (@list){<br/>chomp $k;<br/>my ($size,$path)=split /,/,$k;<br/>my $size1=$size/(1024*1024);<br/>$ins-&gt;bind_param(1,$size1);<br/>$ins-&gt;bind_param(2,$path);<br/>$ins-&gt;execute;<br/>}<br/><br/>Any ideas what is happening here?<br/><br/>thanks<br/><br/>Mike<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/10/msg37629.html Mon, 01 Oct 2018 10:14:30 +0000 RE: Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perlmodules in cPanel environment by Fennell, Brian Correction: <br/> <br/>MYSQL uses &quot;BIGINT&quot; (or another type with &quot;INT&quot; in its name) where Oracle uses NUMBER. <br/> <br/>https://docs.oracle.com/cd/E12151_01/doc.150/e12155/oracle_mysql_compared.htm#BABHHAJC <br/> <br/>The rest of what I said still stands (I think). <br/> <br/>YMMV <br/> <br/> <br/> <br/> <br/> <br/>The information contained in this electronic mail transmission is intended only for the use of the individual or entity named in this transmission. If you are not the intended recipient of this transmission, you are hereby notified that any disclosure, copying or distribution of the contents of this transmission is strictly prohibited and that you should delete the contents of this transmission from your system immediately. Any comments or statements contained in this transmission do not necessarily reflect the views or position of Radial or its subsidiaries and/or affiliates. <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37628.html Fri, 28 Sep 2018 15:41:55 +0000 RE: Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perlmodules in cPanel environment by Fennell, Brian If you encode your binary data as pure ascii, in and out, any database will do just fine. <br/> <br/>Encodings to consider are mime-64 (https://metacpan.org/pod/MIME::Base64) and q-encoding (https://en.wikipedia.org/wiki/Quoted-printable ) - both are lossless and can store any binary data. Hexadecimal representation of the binary data also works but is less efficient. You can also consider compressing the data before converting to a pure-ascii representation to help address space concerns. XML with &quot;character entities&quot; ( &amp;ddddd; encoding) is another option - or some mix of these. To store large runs of text in the database you can break the text into segments. If the &quot;binary files&quot; are mostly text with some &quot;binary&quot; characters you can use q-encoding fileid, line, segment (three fields of type &quot;NUMBER&quot; storing an integer). If the data is truly binary (no discernable structure) you can use fileid, block, segment (three NUMBER fields). You can then use VARCHAR with a size of 256 or 512 or 1024 (etc) to store the encoded binary data as characters. Databases which offer &quot;BLOB&quot; (Binary Large OBject) or &quot;CLOB&quot; (Character Large OBject) capability often do so in a way that trades efficiency for flexibility and standards compliance. The method I suggest should not need anything beyond standard capabilities that every database, mysql included, offers. It may be less efficient than choosing a specific database and exploiting the specific capabilities of that database. <br/> <br/>If you stick to LCD (Least Common Denominator) for your database interactions then you can even make the database type configurable at run-time. <br/> <br/>I once stored arbitrary text (log) files in an Oracle database which had a maximum VARCHAR size of 2048. My code broke lines up into segments of no more than 512 characters and I q-encoded any non-ascii characters. The source character encoding was a one-byte-to-a-character-always (Windows 1252) encoding so the worst case was expanding one character to three ( &quot;=3d&quot; represented &quot;=&quot; , while &quot;=FC&quot; represented &quot;LATIN SMALL LETTER U WITH DIAERESIS&quot;) <br/>I didn&#39;t have to worry about the database character set as long as it was a superset of ascii. I could store files of any size and with any length lines. I chose simplicity over fighting with the non-standard BLOB or CLOB apis. <br/> <br/>If the files had been really binary I could have used https://metacpan.org/pod/MIME::Base64 . <br/> <br/>This is the perl code I used for MIME Q-Encoding: <br/> <br/>sub mimeq <br/>{ <br/>my($in) = @_; <br/>my($out); <br/> <br/> $out = $in; <br/> $out =~ s/(\W)/sprintf(&#39;=%02x&#39;, ord($1))/eg ; <br/> <br/> return $out; <br/> <br/>} <br/> <br/>sub unmimeq <br/>{ <br/>my($in) = @_; <br/>my($out); <br/> <br/> $out = $in; <br/> $out =~ s/=([\da-fA-F][\da-fA-F])/chr hex $1/eg ; <br/> <br/> return $out; <br/> <br/>} <br/> <br/>And a variation I sometimes use: <br/> <br/>sub mimeq-permissive <br/>{ <br/>my($in) = @_; <br/>my($out); <br/> <br/> $out = $in; <br/> $out =~ s{([^]\-\s|#&#39;a-zA-Z0-9,+.?()*,_.:;%@&amp;/[])}{sprintf(&quot;=%02x&quot;,ord($1))}eg ; <br/> <br/> return $out; <br/> <br/>} <br/> <br/>I agree that using a filename or a URL/URI in the database and storing the actual file data someplace else, pointed to by the database, is another option, and one that is often used. <br/> <br/>If your &quot;binary data&quot; isn&#39;t very big and you really want to, you can just use mime-64 and a VARCHAR and go happily about your business. <br/> <br/>The choice is yours. <br/> <br/>Perl - there is more than one way to do it. <br/> <br/> <br/> <br/> <br/> <br/>The information contained in this electronic mail transmission is intended only for the use of the individual or entity named in this transmission. If you are not the intended recipient of this transmission, you are hereby notified that any disclosure, copying or distribution of the contents of this transmission is strictly prohibited and that you should delete the contents of this transmission from your system immediately. Any comments or statements contained in this transmission do not necessarily reflect the views or position of Radial or its subsidiaries and/or affiliates. <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37627.html Fri, 28 Sep 2018 15:08:42 +0000 Re: Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perlmodules in cPanel environment by John Scoles <br/>I would agree MySQL my not be the platform you want. It is limited in what it can do. I would give Postgress SQL a go. You have the use the &#39;pg_lo_???&#39; functions to manipulate your objects. They work quite well. <br/> <br/>By the way saving images, mp3 etc as blobs or lobs to a DB is not used in many new systems. It is now a rather dated as it is much cheaper, more efficient and even more secure to save the file up on the cloud someplace (ie Amazon S3) and then use the DB to simply point to that file. <br/> <br/>Blobs and Lobs where a solution to a problem from 20+ years ago when disk-space was very expensive and ban-with was low. If you had to download a 10mg file you would have to break it up into 10~1 mg blocks and lob/blobs where very good at this. At the time someone with a home line over 128k was quite rare 56k being the morm and 1meg being fantastically expensive. <br/> <br/> <br/> <br/> <br/>________________________________ <br/>From: Kimar Miller &lt;kmills877@gmail.com&gt; <br/>Sent: September 23, 2018 7:34 PM <br/>To: dbi-users@perl.org <br/>Subject: Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perl modules in cPanel environment <br/> <br/>Hi Tim - How&#39;s it going? <br/> <br/>My name is Kimar and I&#39;m looking to find out how to go about the development of a video application using the database MySQL as I own my own Domain name and am renting web host. This app may extend to greater than just a video but more of a multimedia app. <br/> <br/>I&#39;m a developer based in Florida; I was trained at Atlantic Technical College Coconut Creek. My instructor Ellen Williams; the hardest nut to crack but a very generous woman. Lots of years experience and lots of students. I graduated July 2017 and I&#39;ve been doing some serious work on my own until I was approached by some friends of mine that have angel investors interested in a security login I&#39;ve created. <br/> <br/>I was recently attacked by someone from In2Cable India. I traced the IP that was logged in the cPanel. The deal is my app is more secure than my cPanel that requires me to have a hardware firewall that much I discovered after the breach that there&#39;s little I can do about it unless there&#39;s a hardware firewall or an app that is integrated in my browser to encrypt my submission to the login until it hits the server. None the less I have ongoing copyrighting processes occurring. You may or may not know about it but copyright protects you more than patents. Explaining what your thing does in the copyright proves you are the creator based on copyright clause &quot;Works of the Mind&quot;. <br/> <br/>I am particularly interested in having the system input the actual audio and video files such as MP3, or MPEG files to the database. I don&#39;t care about memory or resources. <br/> <br/>CREATE TABLE `video` ( <br/> `ID` int(11) NOT NULL <br/> PRIMARY KEY , <br/> `NAME` varchar(40) DEFAULT NULL, <br/> `DESCRIPTION` varchar(100) DEFAULT NULL, <br/> `BLOBFILE` varchar(20) ); <br/> <br/>That&#39;s the table I used and the web page below <br/> <br/>&lt;head&gt; <br/>&lt;title&gt; Test submit &lt;/title&gt; <br/>&lt;/head&gt; <br/>&lt;body&gt; <br/>&lt;h1&gt; Test Perl Programming CGI post&lt;/h1&gt; <br/>&lt;form action=&quot;/cgi-bin/post.pl&lt;http://post.pl&gt;&quot; method=&quot;POST&quot;&gt; <br/>home.pl: Nr 1 w Polsce. Domeny, Hosting, Serwery WWW, Strony, Sklepy&lt;http://post.pl/&gt; <br/>post.pl <br/>Domeny internetowe: 1,2 mln | Serwery wirtualne: 150 tys. | Sklepy internetowe: 7 tys. | Dzia&sup3;amy niezawodnie od 20 lat. Do&sup3;&plusmn;cz do 2 mln u&iquest;ytkownik&oacute;w home.pl! <br/> <br/> <br/> <br/>&lt;label for=&quot;fileupload&quot;&gt; Select a file to upload&lt;/label&gt; <br/>Name: &lt;input type=&quot;TEXT&quot; name=&quot;Name&quot;&gt; <br/>Description: &lt;input type=&quot;TEXT&quot; name=&quot;Description&quot;&gt; <br/>&lt;input type=&quot;FILE&quot; name=&quot;fileupload&quot; name=&quot;Video&quot;&gt; <br/>&lt;input type=&quot;SUBMIT&quot; value=&quot;SUBMIT&quot;&gt; <br/>&lt;/form&gt; <br/>&lt;/body&gt; <br/>&lt;/html&gt; <br/> <br/>My question is how can I get the insert to work. <br/> <br/>I tried reading the books on this topic and did a global search, I long after exhausted all the links available. <br/> <br/>I also am interested in using modules, is there a better explanation on using the maker object on CPAN its a hard read as I still am lost to some of the concepts in the manual. <br/> <br/>I heavily rely on the perl.org&lt;http://perl.org&gt; resources so I decided to ask a professional. <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37626.html Fri, 28 Sep 2018 13:13:30 +0000 Re: Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perlmodules in cPanel environment by pali Hi! I do not know if it helps you, but processing binary data with MySQL<br/>or MariaDB server and Perl&#39;s DBI can be tricky due to limitation of<br/>MySQL protocol. Some details I wrote to the DBD::MariaDB documentation:<br/><br/>https://metacpan.org/pod/DBD::MariaDB#Working-with-binary-data<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37625.html Fri, 28 Sep 2018 09:07:26 +0000 Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perl modulesin cPanel environment by Kimar Miller &iuml;&raquo;&iquest;none of the tests were able to add a value pair set to the database. They did execute but no real data was submited. The perl results were shown as the name of the file selected but no real insert. Looking in the database with PHPmyAdmin I feel embarrassed. I didn&#39;t see any real results. <br/> <br/>worked <br/> <br/>#!/usr/bin/perlml -wT<br/>use cPanelUserConfig;<br/>use CGI;<br/>use warnings;<br/>use strict;<br/>use DBI;<br/>use utf8;<br/>my $q= new CGI;<br/>print $q-&gt;header(&quot;text/plain&quot;);<br/><br/>my $dsn= &quot;dbi:mysql:database=video;mysql_enable_utf8mb4=1&quot;;<br/># ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use<br/>my $user= &quot;test&quot;;<br/>my $pass= &#39;password&#39;;<br/>my ($dbh, $sth, @row);<br/><br/> $dbh= DBI-&gt;connect($dsn, $user, $pass, { PrintError =&gt; 0, RaiseError =&gt; 1, AutoCommit =&gt; 0 } ) or die &quot;Cannot Connect: &quot;.$DBI::errstr;<br/> <br/>print &quot;These are the results received\n&quot;;<br/><br/>my ($name, $value, @std, $num);<br/><br/>$num=0;<br/>foreach $name ($q-&gt;param) {<br/> <br/> print &quot;$name: &quot;;<br/><br/> foreach $value ($q-&gt;param($name) ) {<br/> $std[$num]= $value;<br/> print &quot;$value\n&quot;;<br/> $num= $num+1;<br/> }<br/><br/>}<br/><br/> print &quot;DB Connect Attempted...&lt;br&gt;\n&quot;;<br/> <br/> #$q-&gt;$cgi-&gt;upload(&quot;file&quot;);<br/> <br/> $sth= $dbh-&gt;prepare(&quot;insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])&quot;) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> #do statement can not be used with driver support placeholders hence the prepare statement must be used<br/> $sth-&gt;execute($q-&gt;param(&quot;upload_file&quot;)) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> <br/> print &quot;Statement Handle Executed...&quot;;<br/> <br/> $sth-&gt;finish();<br/> $dbh-&gt;disconnect();<br/> <br/>exit; <br/> <br/>worked <br/> <br/>#!/usr/bin/perlml -wT<br/>use cPanelUserConfig;<br/>use CGI;<br/>use warnings;<br/>use strict;<br/>use DBI;<br/>use utf8;<br/>my $q= new CGI;<br/>print $q-&gt;header(&quot;text/plain&quot;);<br/><br/>my $dsn= &quot;dbi:mysql:database=video;mysql_enable_utf8mb4=1&quot;;<br/># ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use<br/>my $user= &quot;test&quot;;<br/>my $pass= &#39;password&#39;;<br/>my ($dbh, $sth, @row);<br/><br/> $dbh= DBI-&gt;connect($dsn, $user, $pass, { PrintError =&gt; 0, RaiseError =&gt; 1, AutoCommit =&gt; 0 } ) or die &quot;Cannot Connect: &quot;.$DBI::errstr;<br/> <br/>print &quot;These are the results received\n&quot;;<br/><br/>my ($name, $value, @std, $num);<br/><br/>$num=0;<br/>foreach $name ($q-&gt;param) {<br/> <br/> print &quot;$name: &quot;;<br/><br/> foreach $value ($q-&gt;param($name) ) {<br/> $std[$num]= $value;<br/> print &quot;$value\n&quot;;<br/> $num= $num+1;<br/> }<br/><br/>}<br/><br/> print &quot;DB Connect Attempted...&lt;br&gt;\n&quot;;<br/> <br/> #$q-&gt;$cgi-&gt;upload(&quot;file&quot;);<br/> <br/> $sth= $dbh-&gt;prepare(&quot;insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])&quot;) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> #do statement can not be used with driver support placeholders hence the prepare statement must be used<br/> $sth-&gt;execute(my $cgi-&gt;param(&quot;upload_file&quot;)) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> <br/> print &quot;Statement Handle Executed...&quot;;<br/> <br/> $sth-&gt;finish();<br/> $dbh-&gt;disconnect();<br/> <br/>exit; <br/> <br/>worked <br/> <br/>#!/usr/bin/perlml -wT<br/>use cPanelUserConfig;<br/>use CGI;<br/>use warnings;<br/>use strict;<br/>use DBI;<br/>use utf8;<br/>my $q= new CGI;<br/>print $q-&gt;header(&quot;text/plain&quot;);<br/><br/>my $dsn= &quot;dbi:mysql:database=video;mysql_enable_utf8mb4=1&quot;;<br/># ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use<br/>my $user= &quot;test&quot;;<br/>my $pass= &#39;password&#39;;<br/>my ($dbh, $sth, @row);<br/><br/> $dbh= DBI-&gt;connect($dsn, $user, $pass, { PrintError =&gt; 0, RaiseError =&gt; 1, AutoCommit =&gt; 0 } ) or die &quot;Cannot Connect: &quot;.$DBI::errstr;<br/> <br/>print &quot;These are the results received\n&quot;;<br/><br/>my ($name, $value, @std, $num);<br/><br/>$num=0;<br/>foreach $name ($q-&gt;param) {<br/> <br/> print &quot;$name: &quot;;<br/><br/> foreach $value ($q-&gt;param($name) ) {<br/> $std[$num]= $value;<br/> print &quot;$value\n&quot;;<br/> $num= $num+1;<br/> }<br/><br/>}<br/><br/> print &quot;DB Connect Attempted...&lt;br&gt;\n&quot;;<br/> my $cgi-&gt;param(&quot;upload_file&quot;);<br/> #$q-&gt;$cgi-&gt;upload(&quot;file&quot;);<br/> <br/> $sth= $dbh-&gt;prepare(&quot;insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])&quot;) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> #do statement can not be used with driver support placeholders hence the prepare statement must be used<br/> $sth-&gt;execute() or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> <br/> print &quot;Statement Handle Executed...&quot;;<br/> <br/> $sth-&gt;finish();<br/> $dbh-&gt;disconnect();<br/> <br/>exit; <br/> <br/>worked <br/> <br/>#!/usr/bin/perlml -wT<br/>use cPanelUserConfig;<br/>use CGI;<br/>use warnings;<br/>use strict;<br/>use DBI;<br/>use utf8;<br/>my $q= new CGI;<br/>print $q-&gt;header(&quot;text/plain&quot;);<br/><br/>my $dsn= &quot;dbi:mysql:database=video;mysql_enable_utf8mb4=1&quot;;<br/># ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use<br/>my $user= &quot;test&quot;;<br/>my $pass= &#39;password&#39;;<br/>my ($dbh, $sth, @row);<br/><br/> $dbh= DBI-&gt;connect($dsn, $user, $pass, { PrintError =&gt; 0, RaiseError =&gt; 1, AutoCommit =&gt; 0 } ) or die &quot;Cannot Connect: &quot;.$DBI::errstr;<br/> <br/>print &quot;These are the results received\n&quot;;<br/><br/>my ($name, $value, @std, $num);<br/><br/>$num=0;<br/>foreach $name ($q-&gt;param) {<br/> <br/> print &quot;$name: &quot;;<br/><br/> foreach $value ($q-&gt;param($name) ) {<br/> $std[$num]= $value;<br/> print &quot;$value\n&quot;;<br/> $num= $num+1;<br/> }<br/><br/>}<br/><br/> print &quot;DB Connect Attempted...&lt;br&gt;\n&quot;;<br/> <br/> $q-&gt;upload(&quot;file&quot;);<br/> $sth= $dbh-&gt;prepare(&quot;insert into video (name, description, blobfile) values (?,?,?)&quot;) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> #do statement can not be used with driver support placeholders hence the prepare statement must be used<br/> $sth-&gt;execute($std[0], $std[1], $std[2]) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> <br/> $sth-&gt;finish();<br/> $dbh-&gt;disconnect();<br/> <br/>exit; <br/> <br/>worked <br/> <br/>#!/usr/bin/perlml -wT<br/>use cPanelUserConfig;<br/>use CGI;<br/>use warnings;<br/>use strict;<br/>use DBI;<br/>use utf8;<br/>my $q= new CGI;<br/>print $q-&gt;header(&quot;text/plain&quot;);<br/><br/>my $dsn= &quot;dbi:mysql:database=video;mysql_enable_utf8mb4=1&quot;;<br/># ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use<br/>my $user= &quot;test&quot;;<br/>my $pass= &#39;password&#39;;<br/>my ($dbh, $sth, @row);<br/><br/> $dbh= DBI-&gt;connect($dsn, $user, $pass, { PrintError =&gt; 0, RaiseError =&gt; 1, AutoCommit =&gt; 0 } ) or die &quot;Cannot Connect: &quot;.$DBI::errstr;<br/> <br/>print &quot;These are the results received\n&quot;;<br/><br/>my ($name, $value, @std, $num);<br/><br/>$num=0;<br/>foreach $name ($q-&gt;param) {<br/> <br/> print &quot;$name: &quot;;<br/><br/> foreach $value ($q-&gt;param($name) ) {<br/> $std[$num]= $value;<br/> print &quot;$value\n&quot;;<br/> $num= $num+1;<br/> }<br/> print &quot;$std[0], $std[1], $std[2]&quot;;<br/>}<br/> $q-&gt;upload(&quot;file&quot;);<br/><br/> <br/> print &quot;DB Connect Attempted...&lt;br&gt;\n&quot;;<br/><br/> $sth= $dbh-&gt;prepare(&quot;insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])&quot;) or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> #do statement can not be used with driver support placeholders hence the prepare statement must be used<br/> $sth-&gt;execute() or die &quot;Error due to - $dbh-&gt;errstr&quot;;<br/> <br/> $sth-&gt;finish();<br/> $dbh-&gt;disconnect();<br/> <br/>exit; <br/> <br/>worked <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37624.html Fri, 28 Sep 2018 02:47:14 +0000 DBD::mysql 4.047 Released by Patrick M. Galbraith Dear Community,<br/><br/>I&#39;m pleased to announce the release of DBD::mysql 4.047! This release <br/>has the following changes (Thanks to Dani&euml;l van Eeden from Booking.com!)<br/><br/>* Add options needed for public key based security.<br/>* Allow several spaces after LIMIT clause.<br/>* Basic GTID tracking.<br/>* Fix GCC 8.1 warnings<br/>* Fix warning: unused variable &lsquo;buffer_len&rsquo;<br/>* Fix warning about bind-&gt;is_null assignment with incompatible pointer type<br/>* Get rid of warning about unused variable ssl_verify_set<br/>* Fix space/tab issue which leads to misleading indentation<br/>* Change spaces/tabs to get rid of GCC8 warning<br/><br/>The github repo can be found here: https://github.com/perl5-dbi/DBD-mysql<br/><br/>CPAN: https://metacpan.org/pod/DBD::mysql<br/><br/>Thank you for using DBD::mysql!<br/><br/>Regards,<br/><br/>Patrick<br/><br/>-- <br/><br/>Patrick M. Galbraith<br/>http://patg.net<br/>patg@patg.net<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/09/msg37623.html Sun, 09 Sep 2018 14:07:21 +0000 DBD::MariaDB 1.00 released on CPAN by pali Hello!<br/><br/>I would like to announce public release of the DBD::MariaDB 1.00. Now it<br/>is available on CPAN and can be installed directly via cpan client.<br/><br/> https://metacpan.org/release/PALI/DBD-MariaDB-1.00<br/><br/>There is a problem with perl mailing lists and perl email servers,<br/>therefore it is possible that not all participants receive this message.<br/><br/>DBD::MariaDB is a DBI driver for connecting to the MariaDB or the MySQL<br/>database. It is a fork of the DBD::mysql 4.041 driver. This fork&#39;s<br/>primary focus is fixing Unicode bugs &amp; security problems, adding support<br/>for new versions of MariaDB and MySQL client libraries and other things<br/>which are not possible to fix in DBD::mysql due to legacy problems.<br/><br/>Documentation for DBD::MariaDB and install instructions are on metacpan:<br/><br/> https://metacpan.org/pod/DBD::MariaDB<br/> https://metacpan.org/pod/DBD::MariaDB::INSTALL<br/><br/>Public version 1.00 fixes only small problems found in previous beta<br/>version 0.90_01. More information can be found in previous email:<br/><br/> https://www.nntp.perl.org/group/perl.dbi.dev/2018/06/msg8174.html<br/><br/>Full changelog, including all fixed issues, is available in Changes file<br/>and also formatted at metacpan release page:<br/><br/> https://metacpan.org/release/PALI/DBD-MariaDB-1.00<br/><br/>If you found a bug in DBD::MariaDB, please report it to us via GitHub:<br/><br/> https://github.com/gooddata/DBD-MariaDB/issues<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/07/msg37622.html Thu, 12 Jul 2018 15:33:22 +0000 DBD::MariaDB beta 0.90_01 released on CPAN by pali Hello,<br/><br/>I would like to announce that after few months of DBD::MariaDB<br/>development, beta version 0.90_01 of DBD::MariaDB is now on CPAN:<br/><br/> https://metacpan.org/release/PALI/DBD-MariaDB-0.90_01<br/><br/>DBD::MariaDB is a DBI driver for connecting to the MariaDB or the MySQL<br/>database. It is a fork of the DBD::mysql 4.041 driver. This fork&#39;s<br/>primary focus is fixing Unicode bugs &amp; security problems, adding support<br/>for new versions of MariaDB and MySQL client libraries and other things<br/>which are not possible to fix in DBD::mysql due to legacy problems. See<br/>previous emails:<br/><br/> https://www.nntp.perl.org/group/perl.dbi.dev/2017/08/msg8030.html<br/> https://www.nntp.perl.org/group/perl.dbi.dev/2018/01/msg8151.html<br/><br/>DBD::MariaDB is currently developed in GoodData. Our git repository is<br/>public at GitHub and we are open for pull requests from the community,<br/>as well.<br/><br/> https://github.com/gooddata/DBD-MariaDB<br/><br/>Version 0.90_01 is marked as a beta. We would like to get feedback from<br/>the community. If you find a bug or have a suggestion for improvement,<br/>fell free to report it on GitHub:<br/><br/> https://github.com/gooddata/DBD-MariaDB/issues<br/><br/>We are using Travis for testing and continuous integration with more<br/>then hundred configurations of MySQL/MariaDB client/server versions and<br/>different Perl versions. This setup ensures that the driver can be<br/>compiled with any client library and can connect to remote MariaDB/MySQL<br/>server in any version. Travis status is available at:<br/><br/> https://travis-ci.org/gooddata/DBD-MariaDB<br/><br/>Major changes for DBD::MariaDB 0.90_01 since DBD::mysql 4.041 are:<br/><br/>- Fix for CVE-2017-10788 (use-after-free)<br/>- Fix for CVE-2017-3302 (use-after-free)<br/>- Fix for CVE-2018-2767 (TLS is not enforced)<br/><br/>- Compatibility fixes for MariaDB 10.2.4+, 10.3.0+<br/>- Compatibility fixes for MariaDB Connector/C 2.3.0+, 3.0.2+<br/>- Compatibility fixes for MySQL 5.7.6+, 8.0+<br/><br/>- Full Unicode support according to Perl Unicode model<br/>- Automatically established utf8mb4 (or utf8) connection encoding<br/>- Embedded server support integrated into main DBD::MariaDB driver<br/>- Fix $dbh-&gt;ping(), $dbh-&gt;last_insert_id() and $dbh-&gt;get_info()<br/>- Fix processing statements with nul bytes<br/><br/>The whole changelog for DBD::MariaDB 0.90_01 is available at:<br/><br/> https://metacpan.org/release/PALI/DBD-MariaDB-0.90_01<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/06/msg37621.html Wed, 27 Jun 2018 13:36:33 +0000 PERL 5.24.1 DBD::Sybase Module Build Error by mark.rehert via dbi-users I am trying to build the DBD::Sybase module for PERL 5.24.1 on Solaris 11 and Sybase Open Client 16.0 (ASE 16.0 is not installed on the host). The make test is failing. I found that the expected version string is not present in the version 16 libsybct modules so I hard-coded the version at line 366 of Makefile.PL but that has not resolved the issue. I would greatly appreciate any suggestions for fixing this. Below is the environment and the output of $PERL Makefile.PL, make, and make test. Thanks, in advance, for your time. <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ ls -l /opt/sybase/O* <br/>lrwxrwxrwx 1 sybase sybase 19 May 30 11:10 /opt/sybase/OC -&gt; /opt/sybase/OC-16.0 <br/>lrwxrwxrwx 1 sybase sybase 19 May 30 11:10 /opt/sybase/OCS -&gt; /opt/sybase/OC-16.0 <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $SYBASE <br/>/opt/sybase/OC <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $SYBASE_OCS <br/>OCS <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $PATH <br/>/opt/boksm/bin:/bin:/sbin:/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:/etc:/usr/local/bin:/opt/sybase/OC/OCS/bin:/opt/dba/sybadmin/tools:/usr/local/bin:/usr/sfw/bin:/opt/dba/dbaadmin/util:/bin <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $LD_LIBRARY_PATH <br/>/opt/dba/perl-5.24.1:/opt/sybase/OC/OCS/lib:/opt/sybase/OC/OCS/lib3p:/opt/sybase/OC/OCS/lib3p64:/usr/lib:/usr/lib/lwp:/usr/lib:/usr/local/lib <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $LD_LIBRARY_PATH_64 <br/>/opt/dba/perl-5.24.1:/opt/sybase/OC/OCS/lib:/opt/sybase/OC/OCS/lib3p64:/usr/bin <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $PERL <br/>/opt/dba/perl-5.24.1/bin/perl <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ $PERL Makefile.PL <br/>Sybase OpenClient 16.0 found. <br/> <br/>By default DBD::Sybase 1.05 and later use the &#39;CHAINED&#39; mode (where available) <br/>when &#39;AutoCommit&#39; is turned off. Versions 1.04 and older instead managed <br/>the transactions explicitly with a &#39;BEGIN TRAN&#39; before the first DML <br/>statement. Using the &#39;CHAINED&#39; mode is preferable as it is the way that <br/>Sybase implements AutoCommit handling for both its ODBC and JDBC drivers. <br/> <br/>Use &#39;CHAINED&#39; mode by default (Y/N) [Y]: <br/> <br/>Running in threaded mode - looking for _r libraries... <br/> <br/>***NOTE*** <br/>There is an incompatibility between perl (5.8.x or later) built in threaded <br/>mode and Sybase&#39;s threaded libraries, which means that signals delivered to <br/>the perl process result in a segment violation. <br/> <br/>I suggest building DBD::Sybase with the normal libraries in this case to get <br/>reasonable behavior for signal handling. <br/> <br/>Use the threaded (lib..._r) libraries [N]: <br/> <br/>OK - I&#39;ll use the normal libs <br/> <br/>Running in 64bit mode - looking for &#39;64&#39; libraries... <br/>Found -lsybct64 for -lsybct <br/>Found -lsybcs64 for -lsybcs <br/>Found -lsybtcl64 for -lsybtcl <br/>Found -lsybcomn64 for -lsybcomn <br/>Found -lsybintl64 for -lsybintl <br/>Found -lsybblk64 for -lsybblk <br/>BLK api available - found: sybblk64 <br/>The DBD::Sybase module need access to a Sybase server to run the tests. <br/>To clear an entry please enter &#39;undef&#39; <br/>Sybase server to use (default: SYBASE): dbat5 <br/>User ID to log in to Sybase (default: sa): n205306 <br/>Password (default: undef): abcdef <br/> <br/>Sybase database to use on dbat5 (default: undef): master <br/> <br/>* Writing login information, including password, to file PWD. <br/> <br/> <br/>Using DBI 1.636 (for perl 5.024001 on sun4-solaris-thread-multi-64) installed in /opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI/ <br/>Generating a Unix-style Makefile <br/>Writing Makefile for DBD::Sybase <br/>Writing MYMETA.yml and MYMETA.json <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ make <br/>Skip blib/lib/DBD/Sybase.pm (unchanged) <br/>Skip blib/lib/DBD/dbd-sybase.pod (unchanged) <br/>Running Mkbootstrap for DBD::Sybase () <br/>chmod 644 &quot;Sybase.bs&quot; <br/>gcc -c -I/opt/sybase/OC/OCS/include -DSYB_LP64 -I/opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\&quot;1.16\&quot; -DXS_VERSION=\&quot;1.16\&quot; -fPIC &quot;-I/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE&quot; Sybase.c <br/>In file included from /opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE/perl.h:5615:0, <br/> from /opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI/DBIXS.h:23, <br/> from Sybase.h:16, <br/> from Sybase.xs:14: <br/>Sybase.xs: In function &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;XS_DBD__Sybase__db_ping&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent;: <br/>Sybase.xs:83:32: warning: implicit declaration of function &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;syb_ping&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent; [-Wimplicit-function-declaration] <br/> ST(0) = sv_2mortal(newSViv(syb_ping(dbh, imp_dbh))); <br/> ^ <br/>/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE/embed.h:581:46: note: in definition of macro &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;sv_2mortal&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent; <br/>#define sv_2mortal(a) Perl_sv_2mortal(aTHX_ a) <br/> ^ <br/>Sybase.xs:83:24: note: in expansion of macro &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;newSViv&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent; <br/> ST(0) = sv_2mortal(newSViv(syb_ping(dbh, imp_dbh))); <br/> ^ <br/>Sybase.xs: In function &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;XS_DBD__Sybase__st_cancel&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent;: <br/>Sybase.xs:95:13: warning: implicit declaration of function &Atilde;&cent;&acirc;&#130;&not;&Euml;&#156;syb_st_cancel&Atilde;&cent;&acirc;&#130;&not;&acirc;&#132;&cent; [-Wimplicit-function-declaration] <br/> ST(0) = syb_st_cancel(sth, imp_sth) ? &amp;PL_sv_yes : &amp;PL_sv_no; <br/> ^ <br/>gcc -c -I/opt/sybase/OC/OCS/include -DSYB_LP64 -I/opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\&quot;1.16\&quot; -DXS_VERSION=\&quot;1.16\&quot; -fPIC &quot;-I/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE&quot; dbdimp.c <br/>rm -f blib/arch/auto/DBD/Sybase/Sybase.so <br/>LD_RUN_PATH=&quot;/opt/sybase/OC/OCS/lib&quot; gcc -L/opt/sybase/OC/OCS/lib -shared -m64 -L/usr/lib/sparcv9 -L/usr/gnu/lib -fstack-protector Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so \ <br/> -L/opt/sybase/OC/OCS/lib -lsybct64 -lsybcs64 -lsybtcl64 -lsybcomn64 -lsybintl64 -lsybblk64 -ldl -lm \ <br/> <br/>chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so <br/>&quot;/opt/dba/perl-5.24.1/bin/perl&quot; -MExtUtils::Command::MM -e &#39;cp_nonempty&#39; -- Sybase.bs blib/arch/auto/DBD/Sybase/Sybase.bs 644 <br/>Manifying 1 pod document <br/> <br/> <br/>sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ make test <br/>Running Mkbootstrap for DBD::Sybase () <br/>chmod 644 &quot;Sybase.bs&quot; <br/>PERL_DL_NONLAZY=1 &quot;/opt/dba/perl-5.24.1/bin/perl&quot; &quot;-MExtUtils::Command::MM&quot; &quot;-MTest::Harness&quot; &quot;-e&quot; &quot;undef *Test::Harness::Switches; test_harness(0, &#39;blib/lib&#39;, &#39;blib/arch&#39;)&quot; t/*.t <br/>t/autocommit.t .. ok <br/>t/base.t ........ ok <br/>t/exec.t ........ ok <br/>t/fail.t ........ ok <br/>t/login.t ....... 2/6 DBD::Sybase::db ping failed: ct_cmd_alloc failed at t/login.t line 32. <br/>t/login.t ....... ok <br/>t/main.t ........ Failed 5/36 subtests <br/>t/multi_sth.t ... ok <br/>t/nsql.t ........ ok <br/>t/place.t ....... ok <br/>t/thread.t ...... ok <br/>t/utf8.t ........ 1/11 <br/># Failed test &#39;got expected row back from \#utf8test&#39; <br/># at t/utf8.t line 91. <br/># Structures begin differing at: <br/># $got-&gt;[0]{ut} = &#39;&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&#39; <br/># $expected-&gt;[0]{ut} = &#39;&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&#39; <br/> <br/># Failed test &#39;got expected row back from \#utf8test&#39; <br/># at t/utf8.t line 151. <br/># Structures begin differing at: <br/># $got-&gt;[0]{ut} = &#39;&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&ordm; - smiley1 - &Atilde;&#131;&Acirc;&cent;&Atilde;&#130;&Euml;&#156;&Atilde;&#130;&Acirc;&raquo; - smiley2&#39; <br/># $expected-&gt;[0]{ut} = &#39;&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&Atilde;&cent;&Euml;&#156;&Acirc;&ordm; - smiley1 - &Atilde;&cent;&Euml;&#156;&Acirc;&raquo; - smiley2&#39; <br/># Looks like you failed 2 tests of 11. <br/>t/utf8.t ........ Dubious, test returned 2 (wstat 512, 0x200) <br/>Failed 2/11 subtests <br/>t/xblk.t ........ ok <br/>t/xblob.t ....... ok <br/> <br/>Test Summary Report <br/>------------------- <br/>t/main.t (Wstat: 139 Tests: 31 Failed: 0) <br/> Non-zero wait status: 139 <br/> Parse errors: Bad plan. You planned 36 tests but ran 31. <br/>t/utf8.t (Wstat: 512 Tests: 11 Failed: 2) <br/> Failed tests: 4, 9 <br/> Non-zero exit status: 2 <br/>Files=13, Tests=247, 3 wallclock secs ( 0.21 usr 0.12 sys + 1.43 cusr 0.50 csys = 2.26 CPU) <br/>Result: FAIL <br/>Failed 2/13 test programs. 2/247 subtests failed. <br/>*** Error code 255 <br/>make: Fatal error: Command failed for target `test_dynamic&#39; <br/> <br/> <br/> <br/>Mark Rehert <br/> <br/>DBA <br/> <br/>EIT | ETI | EIS | Enterprise Data Management (EDM) | Lending <br/>MAC X3800-017 | 8480 Stagecoach Circle | Frederick, Maryland 21701 <br/>Tel: 240-651-2536 | Cell: 301-461-9020 | Fax: 240-651-2840 <br/> <br/>mark.rehert@wellsfargo.com&lt;mailto:mark.rehert@wellsfargo.com&gt; <br/> <br/>I am a part-time employee. Below is my intended schedule for the next couple of weeks (Eastern Time). <br/>5/28 &acirc;&#128;&#147; 6/1: Tue &acirc;&#128;&#147; Thr: 8:30 &acirc;&#128;&#147; 5:00 <br/>6/4 &acirc;&#128;&#147; 6/8: Mon: 10 &acirc;&#128;&#147; 2, Tue - Wed: 8:30 &acirc;&#128;&#147; 5:00, Thr: 10 &acirc;&#128;&#147; 2 <br/>6/11 &acirc;&#128;&#147; 6/15: Tue &acirc;&#128;&#147; Thr: 8:30 &acirc;&#128;&#147; 5:00 <br/> <br/> <br/>This transmission may contain information that is confidential and/or proprietary. If you are not the individual or entity to which it is addressed, note that any review, disclosure, copying, retransmission, or other use is strictly prohibited. If you received this transmission in error, please notify the sender immediately and delete the material from your system. This transmission is for informational purposes only and is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. Any information regarding specific investments or other products is not warranted for completeness or accuracy and is subject to change without notice. <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/06/msg37620.html Fri, 01 Jun 2018 09:42:47 +0000 Re: Extend API for last_insert_id by pali On Tuesday 15 May 2018 21:12:19 Tim Bunce wrote:<br/>&gt; On Fri, May 04, 2018 at 02:10:18PM +0200, pali@cpan.org wrote:<br/>&gt; &gt; Hello, do you have any opinion or comments?<br/>&gt; &gt; <br/>&gt; &gt; Tim, you as a DBI maintainer, what do you think about those ideas?<br/>&gt; &gt; <br/>&gt; &gt; On Friday 27 April 2018 16:03:59 pali@cpan.org wrote:<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; So I&#39;m proposing change that caller would be allowed to call<br/>&gt; &gt; &gt; $dbh-&gt;last_insert_id() without any argument<br/>&gt; <br/>&gt; Ok.<br/>&gt; <br/>&gt; &gt; &gt; Second change: Add a new statement method $sth-&gt;last_insert_id().<br/>&gt; <br/>&gt; That seems fine. I&#39;d write the fallback code like this:<br/>&gt; <br/>&gt; sub last_insert_id { return shift-&gt;{Database}-&gt;last_insert_id(@_) }<br/><br/>Changed.<br/><br/>And now I created a pull request with these changes:<br/>https://github.com/perl5-dbi/dbi/pull/64<br/><br/>&gt; Thanks Pali.<br/>&gt; <br/>&gt; Tim.<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/05/msg37619.html Wed, 16 May 2018 08:36:00 +0000 Re: Extend API for last_insert_id by Tim Bunce On Fri, May 04, 2018 at 02:10:18PM +0200, pali@cpan.org wrote:<br/>&gt; Hello, do you have any opinion or comments?<br/>&gt; <br/>&gt; Tim, you as a DBI maintainer, what do you think about those ideas?<br/>&gt; <br/>&gt; On Friday 27 April 2018 16:03:59 pali@cpan.org wrote:<br/>&gt; &gt; <br/>&gt; &gt; So I&#39;m proposing change that caller would be allowed to call<br/>&gt; &gt; $dbh-&gt;last_insert_id() without any argument<br/><br/>Ok.<br/><br/>&gt; &gt; Second change: Add a new statement method $sth-&gt;last_insert_id().<br/><br/>That seems fine. I&#39;d write the fallback code like this:<br/><br/> sub last_insert_id { return shift-&gt;{Database}-&gt;last_insert_id(@_) }<br/><br/>Thanks Pali.<br/><br/>Tim.<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/05/msg37618.html Tue, 15 May 2018 20:12:31 +0000 Re: Extend API for last_insert_id by pali Hello, do you have any opinion or comments?<br/><br/>Tim, you as a DBI maintainer, what do you think about those ideas?<br/><br/>On Friday 27 April 2018 16:03:59 pali@cpan.org wrote:<br/>&gt; Hello,<br/>&gt; <br/>&gt; I would like to propose two new changes to DBI which extends<br/>&gt; last_insert_id API.<br/>&gt; <br/>&gt; First one: Allow to call $dbh-&gt;last_insert_id() method without<br/>&gt; arguments. Currently this method needs to take four arguments (plus<br/>&gt; $dbh) and XS code validates their count:<br/>&gt; <br/>&gt; XS_EUPXS(XS_DBD__Perl__db_last_insert_id)<br/>&gt; {<br/>&gt; dVAR; dXSARGS;<br/>&gt; if (items &lt; 5 || items &gt; 6)<br/>&gt; croak_xs_usage(cv, &quot;dbh, catalog, schema, table, field, attr=Nullsv&quot;);<br/>&gt; ...<br/>&gt; }<br/>&gt; <br/>&gt; More databases does not process these arguments and caller needs to<br/>&gt; supply four undefs.<br/>&gt; <br/>&gt; So I&#39;m proposing change that caller would be allowed to call<br/>&gt; $dbh-&gt;last_insert_id() without any argument and DBI would fill those<br/>&gt; missing arguments by undefs prior to calling DBI driver function. This<br/>&gt; does not change driver API, so all existing DBI drivers would work as<br/>&gt; before and allows application to not specify those useless four undef<br/>&gt; arguments.<br/>&gt; <br/>&gt; Second change: Add a new statement method $sth-&gt;last_insert_id().<br/>&gt; Some databases (e.g. MariaDB) supports tracking last insert id when more<br/>&gt; statement or cursor handles are open. This would allow to call e.g.<br/>&gt; <br/>&gt; $sth1-&gt;execute();<br/>&gt; $sth2-&gt;execute();<br/>&gt; ...<br/>&gt; $sth1-&gt;last_insert_id();<br/>&gt; $sth2-&gt;last_insert_id();<br/>&gt; <br/>&gt; for drivers which would support it. $sth1-&gt;last_insert_id() would return<br/>&gt; insert it which belongs to last -&gt;execute of $sth1 even there were more<br/>&gt; INSERT/execute calls (e.g. by $sth2).<br/>&gt; <br/>&gt; Currently database handle method $dbh-&gt;last_insert_id() returns id of<br/>&gt; the most recent INSERT statement.<br/>&gt; <br/>&gt; What do you think about those two enhancements?<br/>&gt; <br/>&gt; Here is my prototype implementation for DBI:<br/>&gt; https://github.com/perl5-dbi/dbi/compare/master...pali:last-insert-id<br/>&gt; <br/>&gt; DBI drivers can then implement own dbd_st_last_insert_id() function and<br/>&gt; provide correct id for the selected $sth statement.<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/05/msg37617.html Fri, 04 May 2018 12:10:45 +0000 Extend API for last_insert_id by pali Hello,<br/><br/>I would like to propose two new changes to DBI which extends<br/>last_insert_id API.<br/><br/>First one: Allow to call $dbh-&gt;last_insert_id() method without<br/>arguments. Currently this method needs to take four arguments (plus<br/>$dbh) and XS code validates their count:<br/><br/> XS_EUPXS(XS_DBD__Perl__db_last_insert_id)<br/> {<br/> dVAR; dXSARGS;<br/> if (items &lt; 5 || items &gt; 6)<br/> croak_xs_usage(cv, &quot;dbh, catalog, schema, table, field, attr=Nullsv&quot;);<br/> ...<br/> }<br/><br/>More databases does not process these arguments and caller needs to<br/>supply four undefs.<br/><br/>So I&#39;m proposing change that caller would be allowed to call<br/>$dbh-&gt;last_insert_id() without any argument and DBI would fill those<br/>missing arguments by undefs prior to calling DBI driver function. This<br/>does not change driver API, so all existing DBI drivers would work as<br/>before and allows application to not specify those useless four undef<br/>arguments.<br/><br/>Second change: Add a new statement method $sth-&gt;last_insert_id().<br/>Some databases (e.g. MariaDB) supports tracking last insert id when more<br/>statement or cursor handles are open. This would allow to call e.g.<br/><br/> $sth1-&gt;execute();<br/> $sth2-&gt;execute();<br/> ...<br/> $sth1-&gt;last_insert_id();<br/> $sth2-&gt;last_insert_id();<br/><br/>for drivers which would support it. $sth1-&gt;last_insert_id() would return<br/>insert it which belongs to last -&gt;execute of $sth1 even there were more<br/>INSERT/execute calls (e.g. by $sth2).<br/><br/>Currently database handle method $dbh-&gt;last_insert_id() returns id of<br/>the most recent INSERT statement.<br/><br/>What do you think about those two enhancements?<br/><br/>Here is my prototype implementation for DBI:<br/>https://github.com/perl5-dbi/dbi/compare/master...pali:last-insert-id<br/><br/>DBI drivers can then implement own dbd_st_last_insert_id() function and<br/>provide correct id for the selected $sth statement.<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37616.html Fri, 27 Apr 2018 14:05:32 +0000 Re: debugging and stepping into ->do by Tim Bunce On Wed, Apr 25, 2018 at 06:34:20PM +0000, Jeff Macdonald wrote:<br/>&gt; Thanks Brian!<br/>&gt; I&#39;m familiar with C. My goal with digging into DBI was to programmatically cause a SQL error in a test<br/>&gt; case. I needed somehow to create a wrapper around do (or execute) in which I&#39;d examine the Statement and<br/>&gt; &quot;die&quot; accordingly. This would allow me to validate database logic that rolled back a transaction.<br/><br/>https://metacpan.org/pod/DBI#Callbacks may help.<br/><br/>Tim.<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37615.html Fri, 27 Apr 2018 13:46:03 +0000 Re: debugging and stepping into ->do by Jeff Macdonald Thanks again Brian. Also, no need to apologize.<br/><br/>On Wed, Apr 25, 2018 at 3:29 PM Fennell, Brian &lt;fennellb@radial.com&gt; wrote:<br/><br/>&gt; P.S. Two other ways to do UPSERT in mysql - INSERT IGNORE and REPLACE<br/>&gt;<br/>&gt;<br/>&gt; https://chartio.com/resources/tutorials/how-to-insert-if-row-does-not-exist-upsert-in-mysql/<br/>&gt;<br/>&gt; --<br/>Jeff Macdonald<br/>Ayer, MA<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37614.html Wed, 25 Apr 2018 22:31:52 +0000 RE: debugging and stepping into ->do by Fennell, Brian P.S. Two other ways to do UPSERT in mysql - INSERT IGNORE and REPLACE <br/> <br/>https://chartio.com/resources/tutorials/how-to-insert-if-row-does-not-exist-upsert-in-mysql/ <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37613.html Wed, 25 Apr 2018 19:29:18 +0000 RE: debugging and stepping into ->do by Fennell, Brian Jeff, <br/> <br/>Sorry if I was telling you something you already knew. I do that sometimes &acirc;&#128;&#147; I am a computer geek and sometimes my social skills are lacking. <br/> <br/>All the best in your XS hacking. <br/> <br/>It looks to me that this is actually documented behavior (if you know that the documentation is on the DBI module page, and not the DBD::mysql module page): <br/>- if you need an exception you can test for &acirc;&#128;&#156;undef&acirc;&#128;&#157; (or false) and do your own die <br/>- If you need the actual error number / error string you can use $h-&gt;errstr and/or $h-&gt;err <br/> <br/>https://metacpan.org/pod/DBI <br/> <br/>[ . . . ] <br/> <br/>err <br/> <br/>$rv = $h-&gt;err; <br/> <br/>Returns the native database engine error code from the last driver method called. The code is typically an integer but you should not assume that. <br/> <br/>The DBI resets $h-&gt;err to undef before almost all DBI method calls, so the value only has a short lifespan. Also, for most drivers, the statement handles share the same error variable as the parent database handle, so calling a method on one handle may reset the error on the related handles. <br/> <br/>(Methods which don&#39;t reset err before being called include err() and errstr(), obviously, state(), rows(), func(), trace(), trace_msg(), ping(), and the tied hash attribute FETCH() and STORE() methods.) <br/> <br/>If you need to test for specific error conditions and have your program be portable to different database engines, then you&#39;ll need to determine what the corresponding error codes are for all those engines and test for all of them. <br/> <br/>The DBI uses the value of $DBI::stderr as the err value for internal errors. Drivers should also do likewise. The default value for $DBI::stderr is 2000000000. <br/> <br/>A driver may return 0 from err() to indicate a warning condition after a method call. Similarly, a driver may return an empty string to indicate a &#39;success with information&#39; condition. In both these cases the value is false but not undef. The errstr() and state() methods may be used to retrieve extra information in these cases. <br/> <br/>See &quot;set_err&quot; for more information. <br/> <br/> <br/>errstr <br/> <br/>$str = $h-&gt;errstr; <br/> <br/>Returns the native database engine error message from the last DBI method called. This has the same lifespan issues as the &quot;err&quot; method described above. <br/> <br/>The returned string may contain multiple messages separated by newline characters. <br/> <br/>The errstr() method should not be used to test for errors, use err() for that, because drivers may return &#39;success with information&#39; or warning messages via errstr() for methods that have not &#39;failed&#39;. <br/> <br/>See &quot;set_err&quot; for more information. <br/> <br/>[ . . . ] <br/> <br/>RaiseError <br/> <br/>Type: boolean, inherited <br/> <br/>The RaiseError attribute can be used to force errors to raise exceptions rather than simply return error codes in the normal way. It is &quot;off&quot; by default. When set &quot;on&quot;, any method which results in an error will cause the DBI to effectively do a die(&quot;$class $method failed: $DBI::errstr&quot;), where $class is the driver class and $method is the name of the method that failed. E.g., <br/> <br/>DBD::Oracle::db prepare failed: ... error text here ... <br/> <br/>If you turn RaiseError on then you&#39;d normally turn PrintError off. If PrintError is also on, then the PrintError is done first (naturally). <br/> <br/>[ . . . ] <br/> <br/>do <br/> <br/>$rows = $dbh-&gt;do($statement) or die $dbh-&gt;errstr; <br/>$rows = $dbh-&gt;do($statement, \%attr) or die $dbh-&gt;errstr; <br/>$rows = $dbh-&gt;do($statement, \%attr, @bind_values) or die ... <br/> <br/>Prepare and execute a single statement. Returns the number of rows affected or undef on error. A return value of -1 means the number of rows is not known, not applicable, or not available. <br/> <br/>This method is typically most useful for non-SELECT statements that either cannot be prepared in advance (due to a limitation of the driver) or do not need to be executed repeatedly. It should not be used for SELECT statements because it does not return a statement handle (so you can&#39;t fetch any data). <br/> <br/>The default do method is logically similar to: <br/> <br/>sub do { <br/> my($dbh, $statement, $attr, @bind_values) = @_; <br/> my $sth = $dbh-&gt;prepare($statement, $attr) or return undef; <br/> $sth-&gt;execute(@bind_values) or return undef; <br/> my $rows = $sth-&gt;rows; <br/> ($rows == 0) ? &quot;0E0&quot; : $rows; # always return true if no error <br/>} <br/> <br/>[ . . . ] <br/> <br/>In other news &acirc;&#128;&#147; <br/> <br/>You may also be interested in the mysql UPSERT syntax &acirc;&#128;&#156;ON DUPLICATE KEY&acirc;&#128;&#157; <br/> <br/>https://stackoverflow.com/questions/6107752/how-to-perform-an-upsert-so-that-i-can-use-both-new-and-old-values-in-update-par <br/> <br/>https://dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate.html <br/> <br/>That way you can have mysql handle the exceptional cases, which may be more efficient. <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37612.html Wed, 25 Apr 2018 19:08:39 +0000 Re: debugging and stepping into ->do by Jeff Macdonald Thanks Brian! <br/> <br/>I&#39;m familiar with C. My goal with digging into DBI was to programmatically <br/>cause a SQL error in a test case. I needed somehow to create a wrapper <br/>around do (or execute) in which I&#39;d examine the Statement and &quot;die&quot; <br/>accordingly. This would allow me to validate database logic that rolled <br/>back a transaction. The code I am testing is existing code and isn&#39;t <br/>modulure. My thinking was to create an extension of an existing DBD module <br/>(DBD::mysql) by having my extension module load first and insert &quot;hooks&quot; to <br/>wrap the needed function: The below code works when $dbh-&gt;prepare and <br/>$sth-&gt;execute are called in Perl code, but $dbh-&gt;do calls don&#39;t seem to <br/>follow the same code path (XS stuff makes it act different). The code I&#39;m <br/>writing the test against has lots of INSERTs into tables using do, and it <br/>is there that I&#39;d like to generate the exception. <br/> <br/>File DBD/mysql.pm (in a local directory to the test): <br/> <br/>BEGIN { <br/> # fiddle with INC so correct module is loaded <br/> my $path = shift(@INC); <br/> push(@INC, $path); <br/> <br/> # lie to Perl so it will load the real DBD::mysql <br/> delete $INC{&quot;DBD/mysql.pm&quot;}; <br/>} <br/> <br/># put INC back to normal <br/>INIT { <br/> my $path = pop(@INC); <br/> unshift(@INC, $path); <br/>} <br/> <br/>use DBD::mysql; # pulls in module from system dirs <br/> <br/>use strict; <br/> <br/>package DBD::mysql::st; <br/> <br/># hook into method by manipulating symbol table <br/>my $orig_execute = \&amp;execute; <br/>*execute = \&amp;my_execute; <br/> <br/>sub my_execute { <br/> my($sth, @bind_values) = @_; <br/> <br/> print &quot;execute: $sth-&gt;{&#39;Statement&#39;}\n&quot;; <br/> <br/> return $orig_execute-&gt;(@_); <br/>} <br/> <br/>I&#39;m resorting to having the production code crash when an environment <br/>variable is set and having the test set that variable and validating the <br/>results. :( <br/> <br/> <br/> <br/> <br/>On Wed, Apr 25, 2018 at 2:06 PM Fennell, Brian &lt;fennellb@radial.com&gt; wrote: <br/> <br/>&gt; For quick and dirty debugging in C I usually put together something like <br/>&gt; this : open file in append mode, write to file, close file. (this way is <br/>&gt; the code crashes you still have something useful in your debug log). <br/>&gt; <br/>&gt; Using C&acirc;&#128;&#153;s getenv allows the debug logging to be turned on/off with an <br/>&gt; environment variable at run time (no fancy config file parsing needed). <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; Here are some examples if you are new to C <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; https://www.tutorialspoint.com/c_standard_library/c_function_fprintf.htm <br/>&gt; <br/>&gt; https://www.tutorialspoint.com/c_standard_library/c_function_getenv.htm <br/>&gt; <br/>&gt; http://rosettacode.org/wiki/Category:C <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; And in the &acirc;&#128;&#156;more than you wanted to know&acirc;&#128;&#157; department (including xs <br/>&gt; tutorial, perl internals, and how to use gdb on perl) <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; http://perldoc.perl.org/perlhacktips.html <br/>&gt; <br/>&gt; http://perldoc.perl.org/index-internals.html <br/>&gt; <br/>-- <br/>Jeff Macdonald <br/>Ayer, MA <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37611.html Wed, 25 Apr 2018 18:34:39 +0000 RE: debugging and stepping into ->do by Fennell, Brian For quick and dirty debugging in C I usually put together something like this : open file in append mode, write to file, close file. (this way is the code crashes you still have something useful in your debug log). <br/>Using C&acirc;&#128;&#153;s getenv allows the debug logging to be turned on/off with an environment variable at run time (no fancy config file parsing needed). <br/> <br/>Here are some examples if you are new to C <br/> <br/>https://www.tutorialspoint.com/c_standard_library/c_function_fprintf.htm <br/>https://www.tutorialspoint.com/c_standard_library/c_function_getenv.htm <br/>http://rosettacode.org/wiki/Category:C <br/> <br/>And in the &acirc;&#128;&#156;more than you wanted to know&acirc;&#128;&#157; department (including xs tutorial, perl internals, and how to use gdb on perl) <br/> <br/>http://perldoc.perl.org/perlhacktips.html <br/>http://perldoc.perl.org/index-internals.html <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37610.html Wed, 25 Apr 2018 18:05:53 +0000 Re: debugging and stepping into ->do by "Martin J. Evans" via dbi-users On 25/04/18 16:13, Jeff Macdonald wrote:<br/>&gt; Hi,<br/>&gt;<br/>&gt; When using DBD::mysql, I can step into the prepare and execute methods of DBD, but I can&#39;t step into do (execution is the next code line after the do statement). &#39;do&#39; is defined in DBI.pm this way:<br/>&gt;<br/>&gt; sub do {<br/>&gt; my($dbh, $statement, $attr, @params) = @_;<br/>&gt; my $sth = $dbh-&gt;prepare($statement, $attr) or return undef;<br/>&gt; $sth-&gt;execute(@params) or return undef;<br/>&gt; my $rows = $sth-&gt;rows;<br/>&gt; ($rows == 0) ? &quot;0E0&quot; : $rows;<br/>&gt; }<br/>&gt;<br/>&gt; Based on this, if I were to put a breakpoint on execute, I should be able to see &#39;do&#39; statements via execute, but I don&#39;t. For example:<br/>&gt;<br/>&gt; $dbh-&gt;do(&#39;insert into foo (a, b) values (1,2)&#39;)<br/>&gt;<br/>&gt; should cause the execute method to be called, but that does not seem to be the case. Is &#39;do&#39; in DBI/DBD calling some magic method?<br/>&gt; -- <br/>&gt; Jeff Macdonald<br/>&gt; Ayer, MA<br/><br/>do may be implemented by the driver in XS (c code) in which case you would not be able to step into it. Drivers can override the DBI methods.<br/><br/>Martin<br/><br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37609.html Wed, 25 Apr 2018 15:17:19 +0000 debugging and stepping into ->do by Jeff Macdonald Hi,<br/><br/>When using DBD::mysql, I can step into the prepare and execute methods of<br/>DBD, but I can&#39;t step into do (execution is the next code line after the do<br/>statement). &#39;do&#39; is defined in DBI.pm this way:<br/><br/> sub do {<br/> my($dbh, $statement, $attr, @params) = @_;<br/> my $sth = $dbh-&gt;prepare($statement, $attr) or return undef;<br/> $sth-&gt;execute(@params) or return undef;<br/> my $rows = $sth-&gt;rows;<br/> ($rows == 0) ? &quot;0E0&quot; : $rows;<br/> }<br/><br/><br/>Based on this, if I were to put a breakpoint on execute, I should be able<br/>to see &#39;do&#39; statements via execute, but I don&#39;t. For example:<br/><br/>$dbh-&gt;do(&#39;insert into foo (a, b) values (1,2)&#39;)<br/><br/>should cause the execute method to be called, but that does not seem to be<br/>the case. Is &#39;do&#39; in DBI/DBD calling some magic method?<br/>-- <br/>Jeff Macdonald<br/>Ayer, MA<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37608.html Wed, 25 Apr 2018 15:13:58 +0000 Re: (Fwd) Perl with Oracle 12c by John D Groenveld In message &lt;2ceb8fe815e746e480d13c6cc8be327b@USCPMB01.PHOTOMASK.com&gt;, &quot;Seidler, <br/> Reinhard&quot; writes: <br/>&gt;Thanks to all. Who could know the compiled Oracle client version? <br/> <br/>$ perl -MDBD::Oracle -le &#39;print DBD::Oracle::ORA_OCI&#39; <br/>12.2.0.1 <br/> <br/>&gt;11.2 would be fine and certified by Oracle... <br/> <br/>Yes. <br/> <br/>John <br/>groenveld@acm.org <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37607.html Wed, 11 Apr 2018 12:59:37 +0000 RE: (Fwd) Perl with Oracle 12c by Seidler, Reinhard Thanks to all. Who could know the compiled Oracle client version? 11.2 would be fine and certified by Oracle... <br/> <br/>Cheers <br/>Reinhard <br/> <br/>From: John Scoles [mailto:byterock@hotmail.com] <br/>Sent: Tuesday, April 10, 2018 6:26 PM <br/>To: Seidler, Reinhard; dbi-users@perl.org <br/>Subject: Re: (Fwd) Perl with Oracle 12c <br/> <br/> <br/> <br/>Hmm unless you change the installed clients you DBD::Oracle should still work. as 11-&gt;12 should work <br/>If you are having problems you most likely will have to recompile DBD::Oracle against the new client <br/> <br/>Checking DBD::Oracle I see it hasn&#39;t seen an update for at least 4 years or so and therefor not sure if you will need to re-compile and they do not list a compatibly chart anymore so not 100% sure on the aboce. Hopefully your DBD::Oracle was copiled against the 11.2 client and therefor you should have a seemless update to the 12 server. <br/> <br/>cheers <br/>John <br/>________________________________ <br/>From: Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt; &lt;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&gt; <br/>Sent: April 10, 2018 11:02 AM <br/>To: dbi-users@perl.org&lt;mailto:dbi-users@perl.org&gt; <br/>Cc: Seidler, Reinhard <br/>Subject: (Fwd) Perl with Oracle 12c <br/> <br/>----- Forwarded message from &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; ----- <br/> <br/>Date: Tue, 10 Apr 2018 12:16:09 +0000 <br/>From: &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; <br/>To: &quot;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&quot; &lt;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&gt; <br/>Subject: Perl with Oracle 12c <br/> <br/> Hi Tim, <br/> <br/> We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was <br/> Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any <br/> answer would be appreciated. <br/> <br/> Thanks in advance. <br/> <br/> With best regards <br/> Reinhard <br/> <br/> *********************************************************** <br/> Reinhard Seidler <br/> Automation Engineer <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Phone: [+49] (0) 351 4048 384 <br/> Fax: [+49] (0) 351 4048 189 <br/> [1]mailto:reinhard.seidler@amtc-dresden.com <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Raehnitzer Allee 9 | D-01109 Dresden | GERMANY <br/> Sitz: Dresden <br/> Registergericht: Dresden <br/> HRA Nummer: HRA 4820 <br/> <br/> pers&ouml;nlich haftender Gesellschafter: <br/> Advanced Mask Technology Center Verwaltungs GmbH <br/> Sitz des pers&ouml;nlich haftenden Gesellschafters: Dresden <br/> Registergericht: Dresden <br/> HRB-Nummer: HRB 22745 <br/> Gesch&auml;ftsf&uuml;hrer: Thomas Schmidt <br/> *********************************************************** <br/> <br/> Diese Mail einschliesslich der Anh&auml;nge k&ouml;nnte vertraulich sein. Sollten Sie nicht der beabsichtigte <br/> Empf&auml;nger dieser Mail sein, so ist jegliches Verwenden, Offenbaren oder Kopieren der Mail und ihrer <br/> Anh&auml;nge untersagt. <br/> Bitte informieren Sie den Absender und l&ouml;schen Sie die Mail und deren Anh&auml;nge von Ihrem Rechner. <br/> Vielen Dank. <br/> <br/> This email and its attachments may be confidential and/or privileged. If you are not the intended <br/> recipient, any use, disclosure or copying of this email and its attachments is prohibited. <br/> If you have received this email in error, please notify immediately the sender by return email and <br/> delete this email and its attachments from your computer system. Thank you. <br/> <br/> <br/> <br/> <br/>References <br/> <br/> Visible links <br/> 1. mailto:reinhard.seidler@amtc-dresden.com <br/> <br/>----- End forwarded message ----- <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37606.html Wed, 11 Apr 2018 03:51:52 +0000 RE: (Fwd) Perl with Oracle 12c by Fennell, Brian DBD::Oracle is hard to build from source . . . just went thru this. <br/>If you don&#39;t build from source it may not be compatible with your Oracle shared libraries, OS Shared libraries or Oracle Server. <br/>Consider carefully Oracle client and server characterset (and Perl characterset, and OS characterset) - two flavors of Oracle &quot;text&quot; objects need to be considered - &quot;CHAR&quot; and &quot;WCHAR&quot; - for 8 combinations. <br/>UTF-8 end-to-end would be nice, but your environment may not allow (ours didn&#39;t). <br/>Read the general and the platform specific Troubleshooting guide here: https://metacpan.org/release/DBD-Oracle <br/> <br/>If you have to report a bug (or want to see is an error you are getting is a known bug) . . . <br/>Bug tracker is here: <br/>https://rt.cpan.org/Public/Dist/Display.html?Name=DBD-Oracle <br/>And here: <br/>https://github.com/pythian/DBD-Oracle/issues <br/> <br/>I found this one instructive: <br/> <br/>install DBD::Oracle from CPAN - various problems #47 https://github.com/pythian/DBD-Oracle/issues/47 <br/> <br/>You will need not only the client installed but the Oracle &quot;demo&quot; DVD-ROM files which include the &quot;sample&quot; makefiles (which are required prerequisites for building DBD::Oracle - making them more &quot;code&quot; than &quot;sample&quot;). <br/>Also there is no maintainer for the DBD::Oracle module - or at least the maintainer is not active. There is a &quot;co-maintainer&quot; but he basically maintains a fork in git now, so the official CPAN module is old. Wasn&#39;t able to find &quot;build from git&quot; instructions. I guess it is &quot;git clone https://github.com/pythian/DBD-Oracle.git&quot; followed by &quot;perl Makefile.PL ; make ; make test ; make install&quot; (the usual incantation from the MakeMaker documentation). If you reach out to him via CPAN he might respond. <br/>I found a bug in the latest version (memory leak exposed when reading a very large number of rows, something to do with Unicode/Characterset conversion and buffer size), had to downgrade the perl AND the DBD::Oracle to work-around. <br/>Prerequisites are gcc, gnu make, and Oracle Client that matches your database (or older client, but not too old). Look for a ftp CPAN mirror ( http://mirrors.cpan.org/ ) if you want to download an older version to work around a bug. <br/>If you are not already familiar - read up on https://metacpan.org/pod/ExtUtils::MakeMaker especially the section &quot;Default Makefile Behaviour&quot; (and other sections) - which is the hidden documentation to &quot;how CPAN modules really work&quot;. <br/>Seriously consider the DBD::JDBC module with Oracle JDBC driver (you will need a java process to act as a proxy). <br/>If you want to build the DBD::Oracle module try to build it on a test box similar to your production box and post results here if you run into errors (compile errors or runtime errors). <br/>Allocate time in your project for trial and error. No &quot;point and shoot&quot; solution. OS type and version matters if you are looking for a how-to on the internet. Read all the README and INSTALL files. Carefully. Twice. <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37605.html Tue, 10 Apr 2018 18:55:35 +0000 Re: (Fwd) Perl with Oracle 12c by John Scoles <br/>Hmm unless you change the installed clients you DBD::Oracle should still work. as 11-&gt;12 should work <br/>If you are having problems you most likely will have to recompile DBD::Oracle against the new client <br/> <br/>Checking DBD::Oracle I see it hasn&#39;t seen an update for at least 4 years or so and therefor not sure if you will need to re-compile and they do not list a compatibly chart anymore so not 100% sure on the aboce. Hopefully your DBD::Oracle was copiled against the 11.2 client and therefor you should have a seemless update to the 12 server. <br/> <br/>cheers <br/>John <br/>________________________________ <br/>From: Tim.Bunce@pobox.com &lt;Tim.Bunce@pobox.com&gt; <br/>Sent: April 10, 2018 11:02 AM <br/>To: dbi-users@perl.org <br/>Cc: Seidler, Reinhard <br/>Subject: (Fwd) Perl with Oracle 12c <br/> <br/>----- Forwarded message from &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&gt; ----- <br/> <br/>Date: Tue, 10 Apr 2018 12:16:09 +0000 <br/>From: &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&gt; <br/>To: &quot;Tim.Bunce@pobox.com&quot; &lt;Tim.Bunce@pobox.com&gt; <br/>Subject: Perl with Oracle 12c <br/> <br/> Hi Tim, <br/> <br/> We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was <br/> Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any <br/> answer would be appreciated. <br/> <br/> Thanks in advance. <br/> <br/> With best regards <br/> Reinhard <br/> <br/> *********************************************************** <br/> Reinhard Seidler <br/> Automation Engineer <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Phone: [+49] (0) 351 4048 384 <br/> Fax: [+49] (0) 351 4048 189 <br/> [1]mailto:reinhard.seidler@amtc-dresden.com <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Raehnitzer Allee 9 | D-01109 Dresden | GERMANY <br/> Sitz: Dresden <br/> Registergericht: Dresden <br/> HRA Nummer: HRA 4820 <br/> <br/> pers&ouml;nlich haftender Gesellschafter: <br/> Advanced Mask Technology Center Verwaltungs GmbH <br/> Sitz des pers&ouml;nlich haftenden Gesellschafters: Dresden <br/> Registergericht: Dresden <br/> HRB-Nummer: HRB 22745 <br/> Gesch&auml;ftsf&uuml;hrer: Thomas Schmidt <br/> *********************************************************** <br/> <br/> Diese Mail einschliesslich der Anh&auml;nge k&ouml;nnte vertraulich sein. Sollten Sie nicht der beabsichtigte <br/> Empf&auml;nger dieser Mail sein, so ist jegliches Verwenden, Offenbaren oder Kopieren der Mail und ihrer <br/> Anh&auml;nge untersagt. <br/> Bitte informieren Sie den Absender und l&ouml;schen Sie die Mail und deren Anh&auml;nge von Ihrem Rechner. <br/> Vielen Dank. <br/> <br/> This email and its attachments may be confidential and/or privileged. If you are not the intended <br/> recipient, any use, disclosure or copying of this email and its attachments is prohibited. <br/> If you have received this email in error, please notify immediately the sender by return email and <br/> delete this email and its attachments from your computer system. Thank you. <br/> <br/> <br/> <br/> <br/>References <br/> <br/> Visible links <br/> 1. mailto:reinhard.seidler@amtc-dresden.com <br/> <br/>----- End forwarded message ----- <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37604.html Tue, 10 Apr 2018 16:26:00 +0000 Re: (Fwd) Perl with Oracle 12c by Bruce Johnson <br/>On Apr 10, 2018, at 8:31 AM, Bruce Johnson &lt;johnson@pharmacy.arizona.edu&lt;mailto:johnson@pharmacy.arizona.edu&gt;&gt; wrote: <br/> <br/> <br/>On Apr 10, 2018, at 8:02 AM, Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt; wrote: <br/> <br/>----- Forwarded message from &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; ----- <br/> <br/>Date: Tue, 10 Apr 2018 12:16:09 +0000 <br/>From: &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; <br/>To: &quot;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&quot; &lt;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&gt; <br/>Subject: Perl with Oracle 12c <br/> <br/> Hi Tim, <br/> <br/> We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was <br/> Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any <br/> answer would be appreciated. <br/> <br/>Here is the canonical client compatibility guide for Oracle Database. <br/> <br/>Doh! <br/> <br/>Helps to attach the linky part! <br/> <br/>https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=284164169528262&amp;id=207303.1&amp;_afrWindowMode=0&amp;_adf.ctrl-state=u44guwdo9_4 <br/> <br/>More info: <br/> <br/>https://docs.oracle.com/en/database/oracle/oracle-database/12.2/upgrd/compatibility-rules-applications-when-upgrading-oracle-database-client-server-software.html#GUID-5E9ED158-696B-4320-A2F8-7AE21BDFA0FB <br/> <br/>https://blogs.oracle.com/upgrade/client-certification-for-oracle-database-1210212201 <br/> <br/>-- <br/>Bruce Johnson <br/>University of Arizona <br/>College of Pharmacy <br/>Information Technology Group <br/> <br/>Institutions do not have opinions, merely customs <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37603.html Tue, 10 Apr 2018 15:33:44 +0000 Re: (Fwd) Perl with Oracle 12c by Bruce Johnson <br/>On Apr 10, 2018, at 8:02 AM, Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt; wrote: <br/> <br/>----- Forwarded message from &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; ----- <br/> <br/>Date: Tue, 10 Apr 2018 12:16:09 +0000 <br/>From: &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&lt;mailto:Reinhard.Seidler@amtc-dresden.com&gt;&gt; <br/>To: &quot;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&quot; &lt;Tim.Bunce@pobox.com&lt;mailto:Tim.Bunce@pobox.com&gt;&gt; <br/>Subject: Perl with Oracle 12c <br/> <br/> Hi Tim, <br/> <br/> We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was <br/> Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any <br/> answer would be appreciated. <br/> <br/>Here is the canonical client compatibility guide for Oracle Database. <br/> <br/> <br/> <br/> <br/>-- <br/>Bruce Johnson <br/>University of Arizona <br/>College of Pharmacy <br/>Information Technology Group <br/> <br/>Institutions do not have opinions, merely customs <br/> <br/> <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37602.html Tue, 10 Apr 2018 15:32:10 +0000 Re: (Fwd) Perl with Oracle 12c by John D Groenveld In message &lt;20180410150233.7hxxrlqqhwoysp7m@timac&gt;, &quot;Tim.Bunce@pobox.com&quot; write <br/>s: <br/>&gt; We develop Perl applications connecting and working with Oracle database (D <br/>&gt;BD:Oracle). So far it was <br/>&gt; Oracle version 11. Now the database will be migrated to 12.2.0.1. How shoul <br/>&gt;d we deal with that? Any <br/>&gt; answer would be appreciated. <br/> <br/>Relinking DBD::Oracle against InstantClient 12.2 is probably not required <br/>but something I would do. <br/> <br/>John <br/>groenveld@acm.org <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37601.html Tue, 10 Apr 2018 15:22:28 +0000 (Fwd) Perl with Oracle 12c by Tim.Bunce@pobox.com ----- Forwarded message from &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&gt; ----- <br/> <br/>Date: Tue, 10 Apr 2018 12:16:09 +0000 <br/>From: &quot;Seidler, Reinhard&quot; &lt;Reinhard.Seidler@amtc-dresden.com&gt; <br/>To: &quot;Tim.Bunce@pobox.com&quot; &lt;Tim.Bunce@pobox.com&gt; <br/>Subject: Perl with Oracle 12c <br/> <br/> Hi Tim, <br/> <br/> We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was <br/> Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any <br/> answer would be appreciated. <br/> <br/> Thanks in advance. <br/> <br/> With best regards <br/> Reinhard <br/> <br/> *********************************************************** <br/> Reinhard Seidler <br/> Automation Engineer <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Phone: [+49] (0) 351 4048 384 <br/> Fax: [+49] (0) 351 4048 189 <br/> [1]mailto:reinhard.seidler@amtc-dresden.com <br/> <br/> Advanced Mask Technology Center GmbH &amp; Co. KG <br/> Raehnitzer Allee 9 | D-01109 Dresden | GERMANY <br/> Sitz: Dresden <br/> Registergericht: Dresden <br/> HRA Nummer: HRA 4820 <br/> <br/> pers&ouml;nlich haftender Gesellschafter: <br/> Advanced Mask Technology Center Verwaltungs GmbH <br/> Sitz des pers&ouml;nlich haftenden Gesellschafters: Dresden <br/> Registergericht: Dresden <br/> HRB-Nummer: HRB 22745 <br/> Gesch&auml;ftsf&uuml;hrer: Thomas Schmidt <br/> *********************************************************** <br/> <br/> Diese Mail einschliesslich der Anh&auml;nge k&ouml;nnte vertraulich sein. Sollten Sie nicht der beabsichtigte <br/> Empf&auml;nger dieser Mail sein, so ist jegliches Verwenden, Offenbaren oder Kopieren der Mail und ihrer <br/> Anh&auml;nge untersagt. <br/> Bitte informieren Sie den Absender und l&ouml;schen Sie die Mail und deren Anh&auml;nge von Ihrem Rechner. <br/> Vielen Dank. <br/> <br/> This email and its attachments may be confidential and/or privileged. If you are not the intended <br/> recipient, any use, disclosure or copying of this email and its attachments is prohibited. <br/> If you have received this email in error, please notify immediately the sender by return email and <br/> delete this email and its attachments from your computer system. Thank you. <br/> <br/> <br/> <br/> <br/>References <br/> <br/> Visible links <br/> 1. mailto:reinhard.seidler@amtc-dresden.com <br/> <br/>----- End forwarded message ----- <br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37600.html Tue, 10 Apr 2018 15:02:47 +0000 Re: DBD::ODBC and issues getting LongTruncOk / LongReadLen to takeeffect by "Martin J. Evans" via dbi-users On 05/04/18 12:24, Daniel Kasak wrote:<br/>&gt; Hi all.<br/>&gt; <br/>&gt; I&#39;m writing a database utility that has to access IBM&#39;s &quot;DashDB&quot; and other DB2-variants. I have their latest ODBC driver, and I have simple queries working. However queries against their system catalog are not working - queries appear to be returning *empty* recordsets. After some laborious debugging, I can see that when I call $sth-&gt;fetchrow_array, DBI::errstr is set to:<br/>&gt; <br/>&gt; st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) (SQL-HY000)<br/>&gt; <br/>&gt; I&#39;ve dealt with this before. So when constructing my $dbh, I do:<br/>&gt; <br/>&gt; $self-&gt;{dbh}-&gt;{LongReadLen} = 65535 * 1024 # 64MB - yes I know it&#39;s big<br/>&gt; $self-&gt;{dbh}-&gt;{LongTruncOK} = 1;<br/>&gt; <br/>&gt; This usually fixes things - or at least has for SQL Server and Netezza. For DB2 connections however, it appears to have no effect.<br/>&gt; <br/>&gt; I&#39;ve turned on ODBC tracing immediately prior to calling $sth-&gt;prepare ... $sth-&gt;execute ... $sth-&gt;fetchrow_array:<br/>&gt; https://paste.pound-python.org/show/hS6ur7dwGRsQubr29HFT/<br/>&gt; <br/>&gt; This one was from the query:<br/>&gt; select * from SYSCAT.COLUMNS<br/>&gt; <br/>&gt; Does anyone know why&nbsp;LongTruncOk / LongReadLen are not being honored here?<br/>&gt; <br/>&gt; I&#39;m using unixODBC-2.3.6, DBD::ODBC from git, and the latest available DB2 ODBC driver.<br/>&gt; <br/>&gt; Please help! Thanks :)<br/>&gt; <br/>&gt; Dan<br/><br/>There are some very long columns in that result-set but I can&#39;t tell from the unixodbc log alone what has happened.<br/>Can you reduce your perl to the simplest test you can and rerun with<br/><br/>DBI_TRACE=15=trace.log perl mycode.pl<br/><br/>and show me the trace.log file.<br/><br/>Martin<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37599.html Thu, 05 Apr 2018 11:50:52 +0000 DBD::ODBC and issues getting LongTruncOk / LongReadLen to takeeffect by Daniel Kasak Hi all.<br/><br/>I&#39;m writing a database utility that has to access IBM&#39;s &quot;DashDB&quot; and other<br/>DB2-variants. I have their latest ODBC driver, and I have simple queries<br/>working. However queries against their system catalog are not working -<br/>queries appear to be returning *empty* recordsets. After some laborious<br/>debugging, I can see that when I call $sth-&gt;fetchrow_array, DBI::errstr is<br/>set to:<br/><br/>st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or<br/>LongReadLen too small) (SQL-HY000)<br/><br/>I&#39;ve dealt with this before. So when constructing my $dbh, I do:<br/><br/>$self-&gt;{dbh}-&gt;{LongReadLen} = 65535 * 1024 # 64MB - yes I know it&#39;s big<br/>$self-&gt;{dbh}-&gt;{LongTruncOK} = 1;<br/><br/>This usually fixes things - or at least has for SQL Server and Netezza. For<br/>DB2 connections however, it appears to have no effect.<br/><br/>I&#39;ve turned on ODBC tracing immediately prior to calling $sth-&gt;prepare ...<br/>$sth-&gt;execute ... $sth-&gt;fetchrow_array:<br/>https://paste.pound-python.org/show/hS6ur7dwGRsQubr29HFT/<br/><br/>This one was from the query:<br/>select * from SYSCAT.COLUMNS<br/><br/>Does anyone know why LongTruncOk / LongReadLen are not being honored here?<br/><br/>I&#39;m using unixODBC-2.3.6, DBD::ODBC from git, and the latest available DB2<br/>ODBC driver.<br/><br/>Please help! Thanks :)<br/><br/>Dan<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/04/msg37598.html Thu, 05 Apr 2018 11:24:53 +0000 Results of DBI-check on SQL Server 2005. by "L" via dbi-users Hi, <br/>I send you the report which shows a small difference with the DBI documentation of <br/>the version 1.636. <br/> Best Regards <br/> Larry A. https://www.nntp.perl.org/group/perl.dbi.users/2018/03/msg37597.html Sat, 24 Mar 2018 05:24:49 +0000 Re: Hello Perl Comminity from ATL by John D Groenveld In message &lt;02db01d3c043$75a0ca50$60e25ef0$@gmail.com&gt;, &quot;Philip&quot; writes:<br/>&gt;Any clues on how to troubleshoot ?<br/><br/>Crawl before you run.<br/><br/>Create a small test script on your RT webserver and<br/>confirm you can connect to your database.<br/>&lt;URL:https://metacpan.org/pod/DBI&gt;<br/><br/>John<br/>groenveld@acm.org<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/03/msg37596.html Thu, 22 Mar 2018 21:37:05 +0000 Hello Perl Comminity from ATL by Philip <br/><br/>Hello Perl Community:<br/><br/> <br/><br/>I am working at the CDC in ATL and I found this thread from 2001.<br/><br/>###############################<br/><br/>From:<br/><br/> Sterin, Ilya<br/><br/>Date:<br/><br/> October 30, 2001 09:02<br/><br/>Subject:<br/><br/> RE: Can&#39;t locate loadable object for module DBI in @INC<br/><br/>Message ID:<br/><br/> <br/>&lt;https://www.nntp.perl.org/group/perl.dbi.users/;msgid=15977008ABB8D5118B130<br/>0805FA7A8F1815994@cibermail2.ciber.com&gt;<br/>15977008ABB8D5118B1300805FA7A8F1815994@cibermail2.ciber.com<br/><br/> <br/><br/>Which goes like this.<br/><br/>DBI doesn&#39;t work, although I&#39;ve seen the same script work fine on <br/><br/>&gt; another machine.<br/><br/>&gt; <br/><br/>&gt; The script (called load_bugs, which is supposed to use DBI to populate<br/><br/>a<br/><br/>&gt; <br/><br/>&gt; MySQL database) falls over when it gets to &quot;use DBI&quot;. Here is the full<br/><br/> <br/><br/>&gt; output:<br/><br/>&gt; <br/><br/>&gt; Can&#39;t locate loadable object for module DBI in @INC (@INC contains: <br/><br/>&gt; /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1 <br/><br/>&gt; /usr/local/lib/perl5/site_perl/5.6.1/i686-linux <br/><br/>&gt; /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .)<br/><br/> <br/><br/>&gt; at /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 189<br/><br/>&gt; BEGIN failed--compilation aborted at <br/><br/>&gt; /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 189.<br/><br/>&gt; Compilation failed in require at ./load_bugs line 9.<br/><br/>&gt; BEGIN failed--compilation aborted at ./load_bugs line 9.<br/><br/>&gt; <br/><br/>&gt; If you look around line 189 of DBI.pm, here&#39;s what it says:<br/><br/>&gt; <br/><br/>&gt; # If you get an error here like &quot;Can&#39;t find loadable object ...&quot;<br/><br/>&gt; # then you haven&#39;t installed the DBI correctly. Read the README<br/><br/>&gt; # then install it again.<br/><br/>&gt; bootstrap DBI;<br/><br/> <br/><br/> <br/><br/>Well here I am in 2018 and I have the exact same problem with DBIx.<br/><br/>I trying to bring up RT 4.4.2 and apache barf&#39;s when RT trying to connect to<br/>the database. RT Test dependencies and make test deps all work fine.<br/><br/> <br/><br/>But RT 4.4.2 ( rtserver that gets called from apache2.4 config file)<br/><br/>Complains that it cannot find a .pm called Search .pm when its right in the<br/>@INC of Perl.<br/><br/> <br/><br/>Any clues on how to troubleshoot ?<br/><br/> <br/><br/> <br/><br/> <br/><br/> <br/><br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/03/msg37595.html Thu, 22 Mar 2018 20:02:26 +0000 DBD::Pg version 3.7.4 released by Greg Sabino Mullane <br/>-----BEGIN PGP SIGNED MESSAGE-----<br/>Hash: RIPEMD160<br/><br/><br/>Versions 3.7.4, 3.7.3, 3.7.2, and 3.7.1 of DBD::Pg, the Perl DBI driver <br/>for PostgreSQL, are now available. Version 3.7.1 fixed a major bug <br/>caused by incorrect end of string null handling that may have caused <br/>Postgres errors in certain circumstances when using both the new \? escaping <br/>mechanism and the use of placeholders. Versions 3.7.2, 3.7.3, and 3.7.4 <br/>fixed minor problems found in the 3.7.1 release. As always, please use the <br/>highest version number, in this case, 3.7.4.<br/><br/>The full list of changes is provided below.<br/><br/>Development happens at:<br/>https://github.com/bucardo/dbdpg<br/><br/>Version 3.7.4 can be downloaded from CPAN at:<br/>http://search.cpan.org/dist/DBD-Pg/<br/><br/>Checksums for the 3.7.4 tarball;<br/><br/>820206a6829fd05d422d0d965c5f5135 DBD-Pg-3.7.4.tar.gz<br/>6f0598fef195203057bae7947859590e8b79e497 DBD-Pg-3.7.4.tar.gz<br/><br/>Complete list of changes:<br/><br/><br/>Version 3.7.4. Released February 12, 2018 (git tag 3.7.4)<br/><br/> - Fix typo in META.yml<br/> [CPAN ticket #124405]<br/><br/><br/>Version 3.7.3. Released February 12, 2018 (git tag 3.7.3)<br/><br/> - Test tweak so we don&#39;t try to use jsonb on older versions.<br/> [CPAN ticket #124934]<br/><br/><br/>Version 3.7.2 Released February 11, 2018 (git tag 3.7.2)<br/><br/> - Remove Data::Peek dependency accidentally left in t/12placeholders.t<br/> [CPAN ticket #124393]<br/><br/><br/>Version 3.7.1 Released February 11, 2017 (git tag 3.7.1)<br/><br/> - Fixed problem when using placeholders and escaped question marks, the recopied string <br/> was not terminated correctly.<br/> [Greg Sabino Mullane]<br/> (Github issue #33, CPAN tickets #121630, #123187, #123999)<br/><br/> - Make sure nulls in our self-generated arrays are not set as read-only in some Perls.<br/> [Greg Sabino Mullane]<br/> (CPAN ticket #107556)<br/><br/> - If the server returns no error message, and an &quot;unknown&quot; code from libpq, supply a custom<br/> message mentioning client_min_messages may be to blame.<br/> [Greg Sabino Mullane]<br/> (CPAN ticket #109591)<br/><br/> - Declare VERSION with &#39;our&#39; in seldom-used Bundle module<br/> (CPAN ticket #123218)<br/><br/>- -- <br/>Greg Sabino Mullane greg@turnstep.com<br/>PGP Key: 0x14964AC8 201802181020<br/>http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8<br/>-----BEGIN PGP SIGNATURE-----<br/><br/>iEYEAREDAAYFAlqJmd4ACgkQvJuQZxSWSsidvwCgq+IghKOQ6/Xi7q4DaIgLjnb+<br/>JmIAoO2OoIjZZ0uFJAfXGx8vD87uK+po<br/>=M+0N<br/>-----END PGP SIGNATURE-----<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/02/msg37594.html Sun, 18 Feb 2018 15:33:31 +0000 Re: DBD::mysql 4.046 released by Patrick M. Galbraith Yes, I will look at this later today.<br/><br/><br/>On 2/9/18 5:34 AM, H.Merijn Brand wrote:<br/>&gt; On Fri, 9 Feb 2018 05:20:25 -0500, &quot;Patrick M. Galbraith&quot;<br/>&gt; &lt;patg@patg.net&gt; wrote:<br/>&gt;<br/>&gt;&gt; Greetings!<br/>&gt;&gt;<br/>&gt;&gt; I&#39;m pleased to announce the release of DBD::mysql 4.046:<br/>&gt;&gt;<br/>&gt;&gt; * Use API function for reconnect; fixes compilation on MariaDB 10.2.6+.<br/>&gt;&gt; &nbsp; Fix provided by Pali.<br/>&gt;&gt; * Fixed broken link to MySQL download page, provided by Mohammad S Anwar.<br/>&gt;&gt; * Spelling fixes, provided by Ville Skytt&auml;.<br/>&gt; Could you please also address issue #232<br/>&gt; https://github.com/perl5-dbi/DBD-mysql/issues/232<br/>&gt;<br/>&gt; As DBD::mysql won&#39;t build at all on the affected systems<br/>&gt; Happy to help with questions you might have<br/>&gt;<br/>&gt;&gt; Many thanks to the Pali Roh&aacute;r, Ville Skytt&auml;, Michiel Beijen, and of<br/>&gt;&gt; course the community!<br/><br/>-- <br/>--<br/><br/>Patrick M. Galbraith<br/>Principal Platform Engineer, Oracle + Dyn<br/>http://patg.net<br/>patg@patg.net<br/>patrick.m.galbraith@oracle.com<br/> https://www.nntp.perl.org/group/perl.dbi.users/2018/02/msg37593.html Fri, 09 Feb 2018 12:24:25 +0000