Re: Why is selectrow_hashref complaining about a fetch without execute?
On Jul 16, 2015, at 6:40 AM, Tim Bunce tim.bu...@pobox.com wrote: Well, this contains lots more light! ... - dbd_st_execute for 03fdf4e0 parse_params statement SELECT c.change_id ... Binding parameters: SELECT c.change_id -- do_error Out of sort memory, consider increasing server sort buffer size error 1038 recorded: Out of sort memory, consider increasing server sort buffer size -- do_error - dbd_st_execute returning imp_sth-row_num 18446744073709551615 !! ERROR: 1038 'Out of sort memory, consider increasing server sort buffer size' (err#0) - execute= ( -1 ) [1 items] at /usr/lib/perl5/DBI.pm line 1632 via at /usr/local/share/perl/5.18.2/App/Sqitch/Role/DBIEngine.pm line 149 So execute failed. Note the crazy row_num. Execute seems to have returned -1, which is a true value. !! The ERROR '1038' was CLEARED by call to fetchrow_hashref method - fetchrow_hashref for DBD::mysql::st (DBI::st=HASH(0x42cfcc0)~0x4231cf8) thr#2603010 Then the higher-level code called fetchrow_hashref, which cleared the error recorded by execute(). FWIW, the database handle is created like this: my $dbh = DBI-connect($uri-dbi_dsn, scalar $self-username, $pass, { PrintError = 0, RaiseError = 0, AutoCommit = 1, mysql_enable_utf8= 1, mysql_auto_reconnect = 0, mysql_use_result = 0, # Prevent Commands out of sync error. HandleError = sub { my ($err, $dbh) = @_; $@ = $err; @_ = ($dbh-state || 'DEV' = $dbh-errstr); goto hurl; }, Context: https://github.com/theory/sqitch/blob/master/lib/App/Sqitch/Engine/mysql.pm#L59 So I’m a little confused as to why the execute failure was ignored. Is this an issue with DBD::mysql? I assume the OP’s server could use some tuning. Seems pretty weird, though. Thanks, David smime.p7s Description: S/MIME cryptographic signature
Re: Why is selectrow_hashref complaining about a fetch without execute?
On 15/07/15 18:49, David E. Wheeler wrote: On Jul 14, 2015, at 3:24 AM, Tim Bunce tim.bu...@pobox.com wrote: I can't see anything obvious from this trace. Come back with a level 4 trace and hopefully that'll shed sufficient light. Here we go. I presume you saw the Out of sort memory, consider increasing server sort buffer size error 1038 recorded: Out of sort memory, consider increasing server sort buffer size Martin
Re: Why is selectrow_hashref complaining about a fetch without execute?
On Wed, Jul 15, 2015 at 10:49:45AM -0700, David E. Wheeler wrote: On Jul 14, 2015, at 3:24 AM, Tim Bunce tim.bu...@pobox.com wrote: I can't see anything obvious from this trace. Come back with a level 4 trace and hopefully that'll shed sufficient light. Here we go. $ DBI_TRACE=4 sqitch status Well, this contains lots more light! ... - dbd_st_execute for 03fdf4e0 parse_params statement SELECT c.change_id ... Binding parameters: SELECT c.change_id -- do_error Out of sort memory, consider increasing server sort buffer size error 1038 recorded: Out of sort memory, consider increasing server sort buffer size -- do_error - dbd_st_execute returning imp_sth-row_num 18446744073709551615 !! ERROR: 1038 'Out of sort memory, consider increasing server sort buffer size' (err#0) - execute= ( -1 ) [1 items] at /usr/lib/perl5/DBI.pm line 1632 via at /usr/local/share/perl/5.18.2/App/Sqitch/Role/DBIEngine.pm line 149 So execute failed. Note the crazy row_num. Execute seems to have returned -1, which is a true value. !! The ERROR '1038' was CLEARED by call to fetchrow_hashref method - fetchrow_hashref for DBD::mysql::st (DBI::st=HASH(0x42cfcc0)~0x4231cf8) thr#2603010 Then the higher-level code called fetchrow_hashref, which cleared the error recorded by execute(). Then it all goes downhill from there. Tim. 1 - mysql_async_ready for DBD::mysql::st (DBI::st=HASH(0x4231cf8)~INNER) thr#2603010 -- do_error Handle is not in asynchronous mode error 2000 recorded: Handle is not in asynchronous mode -- do_error !! ERROR: 2000 'Handle is not in asynchronous mode' (err#0) 1 - mysql_async_ready= ( undef ) [1 items] at /usr/local/lib/perl/5.18.2/DBD/mysql.pm line 864 via at /usr/local/share/perl/5.18.2/App/Sqitch/Role/DBIEngine.pm line 116 1 - FETCH for DBD::mysql::st (DBI::st=HASH(0x4231cf8)~INNER 'NAME') thr#2603010 - dbd_st_FETCH_attrib for 03fdf4e0, key NAME -- do_error statement contains no result error 4 recorded: statement contains no result -- do_error !! ERROR: 4 'statement contains no result' (err#0) 1 - FETCH= ( undef ) [1 items] at /usr/local/lib/perl/5.18.2/DBD/mysql.pm line 867 via at /usr/local/share/perl/5.18.2/App/Sqitch/Role/DBIEngine.pm line 116 !! The ERROR '4' was CLEARED by call to fetch method 1 - fetch for DBD::mysql::st (DBI::st=HASH(0x4231cf8)~INNER) thr#2603010 - dbd_st_fetch dbd_st_fetch for 04243568, chopblanks 0 -- do_error fetch() without execute() error 19 recorded: fetch() without execute() -- do_error !! ERROR: 19 'fetch() without execute()' (err#0)