Topic: Database error after .16 to .17 upgrade

I did an upgrade from .16 to .17 and got this error when I try to Print out Invoices.
Everything works fine in version .16

Any idea ??

can't retrieve child trans
error code : 1
error message : Can't create/write to file '/var/tmp/mysql.SUi1WS/#sql_6a8_0.MAI' (Errcode: 2)
sql that failed was : SELECT parent.* FROM 1_debtor_trans_details parent LEFT JOIN 1_debtor_trans_details trans ON trans.src_id=parent.id WHERE trans.debtor_trans_type='10' AND trans.debtor_trans_no='1' GROUP BY parent.debtor_trans_no ORDER BY parent.debtor_trans_no

2 (edited by apmuthu 09/30/2013 08:31:52 am)

Re: Database error after .16 to .17 upgrade

Lines 363-370 of sales/includes/sales_db.inc:

    $sql = "SELECT parent.*
            FROM
                ".TB_PREF."$par_tbl parent
            LEFT JOIN ".TB_PREF."debtor_trans_details trans 
                ON trans.src_id=parent.id
            WHERE
                trans.debtor_trans_type=".db_escape($trans_type)
                ." AND trans.debtor_trans_no=".db_escape($trans_no);

This file was last changed in 2011-02-14.
No significant changes since v2.3.14 (2013-01-18) in the sql schema for the US standard 4 digit Chart of Accounts.

What Chart of Accounts are you using? Compare with the current one and see if there is any significant difference that might cause this kind of trouble.

Take a backup zip of your company's database and check.

Try upgrading directly to v2.3.18+Git.

Post's attachments

FA_v2316_to_2318git.zip 385.3 kb, 1 downloads since 2013-09-30 

You don't have the permssions to download the attachments of this post.

Re: Database error after .16 to .17 upgrade

Hi,


ok smile, I tried to upgrade to .18, but got the same error.
This is why I tried figure out if the error is in .17 or .18

We are using the Norwegian chart of accounts

4 (edited by apmuthu 09/30/2013 03:23:42 pm)

Re: Database error after .16 to .17 upgrade

Please pm me your backup from within FA for the said company. Also attach your config.inc.php file after deleting the db password.

Looks like it is a clear case of either some new variables with backward compatibility options not conforming to your specific choices or a database schema incompatibility. The latter would be so if you have been using FA for quite some time and have been incrementally upgrading it as versions change.

State whether you are using Linux or Windows or Mac and the webserver, php and mysql versions. Will try to hammer out a sql that you can restore to get it working. Also please check the charset and collations used.

There are some errors in the Norweigian COA - one extra field is present there and some are mis-ordered besides some default diffs. Attached are the corrections that may be taken into the appropriate package in the FA repo.

Post's attachments

NorweigianCOAPatch.zip 35.7 kb, 1 downloads since 2013-09-30 

You don't have the permssions to download the attachments of this post.

Re: Database error after .16 to .17 upgrade

I guess the problem is outside FA code, and not really related to sql query: the message inform about some write problem in /var/tmp directory.
janusz

Re: Database error after .16 to .17 upgrade

Hi,

Yepp, the directory did not exist in my server.

I created /var/tmp/mysql.SUi1WS , now everything works ok smile

Don't understand, but I'm happy that everything is back in order smile