From abc471575aa7287313ba87e35ae1092a4bdb5f0f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sat, 22 Oct 2016 17:00:19 +0200
Subject: [PATCH] Fix sql error

---
 build/debian/README.howto                      | 11 ++++++++---
 htdocs/install/mysql/migration/4.0.0-5.0.0.sql |  4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/build/debian/README.howto b/build/debian/README.howto
index 04aa4cfdeb7..86b2acababb 100644
--- a/build/debian/README.howto
+++ b/build/debian/README.howto
@@ -154,8 +154,10 @@ tag 729538 -moreinfo
 ##### Testing a package into unstable env
 
 Check you have a mysql server available from another interface than "localhost".
-Comment line in /etc/mysql/my.cnf if required and restart mysql
-#bind-address = 127.0.0.1
+Set line in /etc/mysql/my.cnf if required and restart mysql
+
+[mysqld]
+bind-address           = *
 
 Create a chroot called "unstable-amd64-sbuild".
 Chroot env is stored into /srv/chroot directory.
@@ -170,6 +172,8 @@ Puis pour se connecter et préparer l'environnement
 > schroot -c name_of_chroot
 > cat /etc/debian_chroot       to check which debian branch we are into
 > vi /usr/sbin/policy-rc.d     and replace return code 101 (not allowed) into 0 (ok)
+> apt-get update
+> apt-get upgrade
 > apt-get install links mysql-client
 
 To test a package
@@ -185,7 +189,7 @@ To test a package
 If there is a problem launching apache, because port is already used, change it into your chroot install with
 > vi /etc/apache2/ports.conf
 Then restart.
-Then you can call/test dolibarr with http://localhost:port/dolibarr/ (It can be also called from host).
+Then you can call/test dolibarr with http://localhost:port/dolibarr/ . It can be also called FROM HOST (port must be a not used port on host).
 
 
 
@@ -295,6 +299,7 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
 - htdocs/includes/jquery/plugins/datatables
 - htdocs/includes/mike42
 - htdocs/includes/phpexcel or htdocs/includes/phpoffice
+- htdocs/includes/swiftmailer
 - htdocs/includes/restler/framework/Luracast/Restler/explorer
 - htdocs/includes/tcpdf or htdocs/includes/tecnickcom
 And rename file into 
diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
index cf34086f066..9bd984bba1b 100644
--- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
@@ -139,7 +139,7 @@ ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms               timestamp;
 
 ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
 
-ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint
+ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint;
 
 
 ALTER TABLE llx_facturedet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
@@ -149,4 +149,4 @@ ALTER TABLE llx_commande_fournisseurdet ADD COLUMN vat_src_code varchar(10) DEFA
 ALTER TABLE llx_propaldet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
 ALTER TABLE llx_supplier_proposaldet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
 
-  
\ No newline at end of file
+  
-- 
GitLab