use strict; use warnings; use DBI; use Data::Dumper; my $h = DBI->connect(); eval { $h->do(q/drop table mje/); }; $h->do(q/create table mje (a varbinary(max))/); my $t = $h->column_info(undef, undef, 'mje', 'a'); DBI::dump_results($t); my $x = 'a' x 1000; my $s = $h->prepare(q/insert into mje values(?)/); #foreach (1..15) { # $s->execute($x); # print "Inserted ", length($x), "\n"; # $x = $x x 2; #} $s = $h->prepare("insert into mje values (?)"); # 350kBites -> largest number is 2^(8*350000)-1 for(my $i = 75; $i<2**28000000;$i=$i*2){ print"did"; my $insert='g'x$i; $s->bind_param(1,$insert,DBI::SQL_VARBINARY); $s->execute() or print" not "; $s->finish(); my $sz=length($insert); print " succeed. size: $sz\n"; } $Data::Dumper::Indent = 0; my $r = $h->selectall_arrayref(q/select len(a) from mje/); print Dumper($r);