Paras Dagli | 5 Oct 2004 09:38
Picon

Re: Error with using DBD MySql

i made sure mysql_config is in my path. now i get the following error
when i try to reinstall DBD

[root <at> server DBD-mysql-2.9004]# make
gcc -c  -I/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
-I/usr/local/mysql/include/mysql -D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -march=i386 -mcpu=i686   -DVERSION=\"2.9004\"
-DXS_VERSION=\"2.9004\" -fpic
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   dbdimp.c
gcc -c  -I/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
-I/usr/local/mysql/include/mysql -D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -march=i386 -mcpu=i686   -DVERSION=\"2.9004\"
-DXS_VERSION=\"2.9004\" -fpic
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   mysql.c
In file included from mysql.c:34:
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI/Driver_xst.h:
In function `dbixst_bounce_method':
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI/Driver_xst.h:22:
warning: passing arg 1 of `PerlIO_printf' makes pointer from integer
without a cast
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI/Driver_xst.h:38:
warning: passing arg 1 of `PerlIO_printf' makes pointer from integer
without a cast

paras

On Tue, 28 Sep 2004 20:16:50 -0400 (EDT), Rudy Lippan
<rlippan <at> remotelinux.com> wrote:
(Continue reading)

Jochen Wiedmann | 5 Oct 2004 10:04
Picon
Favicon

Re: Error with using DBD MySql

Paras Dagli wrote:

> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI/Driver_xst.h:38:
> warning: passing arg 1 of `PerlIO_printf' makes pointer from integer
> without a cast

These are warnings and can most probably be ignored. I suppose you are 
omitting the actual error message, which comes later.

-- 
http://lilypie.com/baby1/050423/1/5/1/+1

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Scott Simpson | 13 Oct 2004 14:34

Rounding

Dear All,

If I create a simple table with a single column of type FLOAT and I
insert 2 values say 5.8 and 5.9.

When I issue 'SELECT * FROM t_table where f_float > 5.8, I get what I
expect.

When I issue 'SELECT * FROM t_table where f_float < 5.9, I get what I
expect.

When I issue 'SELECT * FROM t_table where f_float >= 5.8 I get what I
expect.

When I issue 'SELECT * FROM t_table where f_float <= 5.9, I only get 1
row returned (i.e. 5.8 and not 5.9, which is not what I expect).

Did I miss something?

MySQL version 3.23.54.

Regards,

Scott

Paul DuBois | 13 Oct 2004 14:42
Picon
Favicon

Re: Rounding

At 13:34 +0100 10/13/04, Scott Simpson wrote:
>Dear All,
>
>
>
>If I create a simple table with a single column of type FLOAT and I
>insert 2 values say 5.8 and 5.9.
>
>
>
>When I issue 'SELECT * FROM t_table where f_float > 5.8, I get what I
>expect.
>
>
>
>When I issue 'SELECT * FROM t_table where f_float < 5.9, I get what I
>expect.
>
>
>
>When I issue 'SELECT * FROM t_table where f_float >= 5.8 I get what I
>expect.
>
>
>
>When I issue 'SELECT * FROM t_table where f_float <= 5.9, I only get 1
>row returned (i.e. 5.8 and not 5.9, which is not what I expect).
>
>
>
(Continue reading)

Jamie McCarthy | 13 Oct 2004 15:07

Re: Rounding

On Wed, 2004-10-13 at 08:34, Scott Simpson wrote:

> When I issue 'SELECT * FROM t_table where f_float <= 5.9, I only get 1
> row returned (i.e. 5.8 and not 5.9, which is not what I expect).

That's how floating-point numbers work.  Integers, and other sums
of powers of two (like 1.5 or 5.75), can be represented exactly
in binary, given enough bits.  But there is no way to exactly
represent the value 1/3 in binary floating point, with any finite
number of bits.

Same for 5.8 and 5.9.  So these numbers are being stored
internally as slightly greater or less than the number you thought
you assigned.  As a general principle, you should never expect an
equality operator (=, <=, >=) on a float to return true.

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Robert Berman | 13 Oct 2004 21:23

Errors/Warning with Connect using DBI/DBD::MySQL under Win32 (ActiveState)

Using the ActiveState Win32 DBI/DBD::MySQL module (Version 2.9003) I get 
the following errors when I connect in my perl program, test.pl:

use DBI;
use DBD::mysql;

my ($dbh);

$dbh = DBI->connect("DBI:mysql:Aggregate", 'root', undef);

if (! $dbh) {
    print "Unable to connect to Aggregate DB.\n";
}
else {
    $dbh->disconnect;
}

perl test.pl
File 'C:\mysql\\share\charsets\?.conf' not found (Errcode: 22)
Character set '#33' is not a compiled character set and is not specified 
in the 'C:\mysql\\share\charsets\Index' file

I am connecting to MySQL 4.1.4-gamma-max which supports utf8. I have the 
entry

[mysqld]
default-character-set = utf8

in the my.ini file. If I remove the entry, the errors go away, but my 
application uses utf8 data!  Running the same program from Linux to the 
(Continue reading)

Nair, Sujith | 20 Oct 2004 20:12
Picon
Favicon

Mysql DBD drivers on Hpux

Hi , 
I have been trying to compile the mysql driver on a HPUX-11.11i platform and
am getting the following errors
are there any patches / workarounds that Ineed to look for while doing this
?
Any help would be appreciated

see the transcript below
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++

I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I'/opt/mysql/include/mysql'
  libs          (mysql_config) = -L/opt/mysql/lib/mysql -lmysqlclient
-lcrypt -lnsl -lm
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) = 
  testpassword  (default     ) = 
  testuser      (default     ) = 

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Using DBI 1.40 (for perl 5.008003 on PA-RISC2.0) installed in
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI
Writing Makefile for DBD::mysql
(Continue reading)

Fred Magee | 21 Oct 2004 17:51

Problems installing DBD::mysql-2.9004 under 64 bit linux

Good morning.

 

When I tried to make DBD::mysql on my Dell Precision workstation running:

 

Linux localhost.localdomain 2.4.21-20.EL #1 SMP Wed Aug 18 20:34:58 EDT 2004 x86_64 x86_64 x86_64 GNU/Linux

And mysql server version: 4.0.21-standard

 

I get the following error:

 

cc -c  -I/usr/lib64/perl5/site_perl/5.8.0/auto/DBI/ -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe   -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" -fPIC "-I/usr/lib64/perl5/5.8.0/x86_64-linux-thread-multi/CORE"   mysql.c

Running Mkbootstrap for DBD::mysql ()

chmod 644 mysql.bs

rm -f blib/arch/auto/DBD/mysql/mysql.so

LD_RUN_PATH="/usr/lib64" /usr/bin/perl myld gcc  -shared dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so   -L/usr/local/lib -lmysqlclient -lz -lcrypt -lnsl -lm

/usr/bin/ld: /usr/local/lib/libmysqlclient.a(libmysql.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libmysqlclient.a: could not read symbols: Bad value

 

 

Is this caused by the 64 bit nature of my system?  How do I recompile libmysqlclient.a(???) with the –fPIC switch?  Is there an RPM version of this that will run with Red Hat Enterprise linux?

 

Thanks for any help you can provide and have a great day.

 

Fred Magee

ATK Mission Research

(505)768-7783

fred.magee <at> mrcabq.com

 

Jochen Wiedmann | 21 Oct 2004 18:52
Picon
Favicon

Re: Problems installing DBD::mysql-2.9004 under 64 bit linux

Fred Magee wrote:

>
> Is this caused by the 64 bit nature of my system? How do I recompile 
> libmysqlclient.a(???) with the –fPIC switch? Is there an RPM version 
> of this that will run with Red Hat Enterprise linux?
>

I do not know this from Linux, but it sounds quite similar to the 
problems with mixed binaries known from Solaris or HP/UX. Recommended 
solutions is to forgen binary RPM's. Use source RPM's, and compile 
everything (MySQL, Perl, DBI, and DBD::mysql) for yourself.

Jochen

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Daniel Kasak | 28 Oct 2004 04:25
Picon

$dbh->last_insert_id() support?

Hi all.

I'm back again with the same issue as last time ... DBD::mysql doesn't 
seem to support $dbh->last_insert_id() as advertised in the DBI 
documentation:

---

       "last_insert_id"
             $rv = $dbh->last_insert_id($catalog, $schema, $table, $field);
             $rv = $dbh->last_insert_id($catalog, $schema, $table, 
$field, \%attr);

<snipped>

 * For some drivers the $catalog, $schema, $table, and $field parameters 
are required (e.g., Pg), for others they are ignored (e.g., mysql).

---

I haven't been able to sucessfully get the last inserted id from an 
auto_increment column in this way yet:

---

#!/usr/bin/perl -w
use strict;

use DBI;
use Cwd;

my $dbh = DBI->connect ("dbi:mysql:dbname=test;host=screamer;port=3306", 
"some_username", "somepassword", {

PrintError => 0,

RaiseError => 0,

AutoCommit => 1,

});

$dbh->do("create table my_test_table ( ID mediumint not null 
auto_increment, SomeStuff varchar(100), primary key (ID) )");
$dbh->do("insert into my_test_table ( SomeStuff ) values ( 'Hi there!' )");

my $inserted_id = $dbh->last_insert_id(undef, undef, undef, undef);
print "According to the 'last_insert_id' method of the DBH, I inserted a 
record with primary key: $inserted_id\n";

$inserted_id = $dbh->{'mysql_insertid'};
print "According to the 'mysql_insertid' attribute of the DBH, I 
inserted a record with primary key: $inserted_id\n";

$dbh->disconnect;

---

Does anyone know if the last_insert_id() method is supposed to be 
supported for MySQL? I would *really* like to use it instead of the 
MySQL-specific $dbh->{'mysql_insertid'};
I'm using DBD-mysql-2.9004, which according to 
http://search.cpan.org/dist/DBD-mysql/ is the latest stable release.

Dan

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak <at> nusconsulting.com.au
website: http://www.nusconsulting.com.au

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Gmane