Topic: SQL trail: inaccurate error message?
Hi all,
I activated SQL trail option ($sql_trail = 1), and found that some (or maybe all) of error messages are inaccurate.
For instance, I added a new customer. The new customer data was successfully saved. But in the sql_trail table I found these rows:
=================
sql | result |msg
BEGIN | 1 | could not start a transaction
INSERT INTO debtors_master (name, debtor_ref, address, tax_id, dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, sales_type, notes) VALUES ('Dummy Customer', 'Dummy Customer', 'Jakarta', '','0', '0', 'IDR', '1', '2', 0, 0, 1000, '1', '') | 1 | The customer could not be added
COMMIT | 1 | could not commit a transaction
=================
I saw that the new customer data existed in debtors_master table.
So why did the SQL trail tell me that the query was failed?
Was it because the debtors_master table is MyISAM?
Then I tried to do another transaction with InnoDB tables. I added a new item tax type (the item_tax_types table is of InnoDB type). The new data was saved correctly (I think so). But still, I got similar error message in sql_trail table:
=================
BEGIN 1 could not start a transaction
INSERT INTO item_tax_types (name, exempt) VALUES ('No tax','1') 1 could not add item tax type
COMMIT 1 could not commit a transaction
=================
Is there any body can help me to explain this?
Thanks in advance.
Albert