diff --git a/mysqlloadcsv b/mysqlloadcsv index d567b9e..3e798ea 100755 --- a/mysqlloadcsv +++ b/mysqlloadcsv @@ -361,7 +361,11 @@ elif [ "$method" == insert ]; then [ -n "$prefix" ] && echo "$prefix" >>"$inserts" [ -n "$truncate" ] && echo "$truncate" >>"$inserts" awkcsv <"$input" >>"$inserts" -s "$skip_lines" -v table="$table" \ - -v null_value="$null_value" -v types[@] -a "$__AWK_MYSQLFUNCS"'{ + -v null_value="$null_value" -v types[@] -a "$__AWK_MYSQLFUNCS"' +BEGIN { + print "start transaction;" +} +{ count = length(ORIGHEADERS) fields = "" for (i = 1; i <= count; i++) { diff --git a/sqlmig b/sqlmig index d50463a..c72b1f4 100755 --- a/sqlmig +++ b/sqlmig @@ -946,7 +946,7 @@ elif [ "$action" == export ]; then if [ -n "$dbdir" ]; then dbdirs=("$dbdir") elif [ -z "$updatedir" ]; then - array_lsfiles files . "*.sql" + array_lsfiles files . "*.sql" "*my.cnf" "*ora.conf" if [ ${#files[*]} -gt 0 ]; then enote "Autosélection répertoire courant" dbdir="$cwd" @@ -967,7 +967,7 @@ elif [ "$action" == export ]; then etitled "$dbname" destdir="$exportdir/$dbname" - array_lsfiles updates "$dbdir" "*.sql" + array_lsfiles updates "$dbdir" for update in "${updates[@]}"; do [ -d "$destdir" ] || mkdir -p "$destdir" copy_update "$update" "$destdir"