Re: DBI and field type 'bit'

2016-10-08 Thread hw
Chas. Owens schrieb: The URL for the bug report is https://rt.cpan.org/Ticket/Display.html?id=118207&results=52bad5c05e442e5750731e7011056012 Thank you very much! I resorted to use an integer instead of a bitfield, and it works fine with things like ... SET `status` = `status` + 32 WHERE (N

Re: DBI and field type 'bit'

2016-10-01 Thread Chas. Owens
The URL for the bug report is https://rt.cpan.org/Ticket/Display.html?id=118207&results=52bad5c05e442e5750731e7011056012 On Sat, Oct 1, 2016 at 11:44 AM Chas. Owens wrote: > Poking around in the source, it does not appear to be well tested WRT bind > variables (see the test file below). I will

Re: DBI and field type 'bit'

2016-10-01 Thread Chas. Owens
Poking around in the source, it does not appear to be well tested WRT bind variables (see the test file below). I will file a bug at https://rt.cpan.org/Public/Dist/Display.html?Name=DBD-mysql but I wouldn't hold my breath on seeing anything other than a documentation change. There is probably to

Re: DBI and field type 'bit'

2016-10-01 Thread Chas. Owens
Whoops, meant to include links for the docs to those two functions: http://perldoc.perl.org/functions/pack.html http://perldoc.perl.org/functions/vec.html On Sat, Oct 1, 2016 at 11:31 AM Chas. Owens wrote: > DBD::mysql is treating 1 and 3 as their ASCII values on insert due to > quoting. You n

Re: DBI and field type 'bit'

2016-10-01 Thread Chas. Owens
DBD::mysql is treating 1 and 3 as their ASCII values on insert due to quoting. You need to create values that are bit fields themselves. This being Perl, there are lots of ways of doing that: $dbh->do("create table bittest (lilbits bit(8))"); my $insert = $dbh->prepare("insert into bittest valu