~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/61_replace_dash_with_bash_mbug675185.diff/scripts/mysqld_safe.sh

  • Committer: Package Import Robot
  • Author(s): James Page, Otto Kekäläinen
  • Date: 2014-02-17 16:51:52 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140217165152-k315d3175g865kkx
Tags: 5.5.35-1
[ Otto Kekäläinen ]
* New upstream release, fixing the following security issues:
  - Buffer overflow in client/mysql.cc (Closes: #737597).
    - CVE-2014-0001
  - http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html
    - CVE-2013-5891
    - CVE-2013-5908
    - CVE-2014-0386
    - CVE-2014-0393
    - CVE-2014-0401
    - CVE-2014-0402
    - CVE-2014-0412
    - CVE-2014-0420
    - CVE-2014-0437
* Upstream https://mariadb.atlassian.net/browse/MDEV-4902
  fixes compatibility with Bison 3.0 (Closes: #733002)
* Updated Russian debconf translation (Closes: #734426)
* Updated Japanese debconf translation (Closes: #735284)
* Updated French debconf translation (Closes: #736480)
* Renamed SONAME properly (Closes: #732967)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
nowatch=0
19
19
mysqld_ld_preload=
20
20
mysqld_ld_library_path=
 
21
flush_caches=0
 
22
numa_interleave=0
21
23
 
22
24
# Initial logging status: error log is not open, and not using syslog
23
25
logging=init
84
86
  --syslog                   Log messages to syslog with 'logger'
85
87
  --skip-syslog              Log messages to error log (default)
86
88
  --syslog-tag=TAG           Pass -t "mysqld-TAG" to 'logger'
 
89
  --flush-caches             Flush and purge buffers/caches before
 
90
                             starting the server
 
91
  --numa-interleave          Run mysqld with its memory interleaved
 
92
                             on all NUMA nodes
87
93
 
88
94
All other options are passed to the mysqld program.
89
95
 
243
249
      --skip-syslog) want_syslog=0 ;;
244
250
      --syslog-tag=*) syslog_tag="$val" ;;
245
251
      --timezone=*) TZ="$val"; export TZ; ;;
 
252
      --flush-caches) flush_caches=1 ;;
 
253
      --numa-interleave) numa_interleave=1 ;;
246
254
 
247
255
      --help) usage ;;
248
256
 
508
516
  SET_USER=0
509
517
fi
510
518
 
511
 
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld`
 
519
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe`
512
520
parse_arguments PICK-ARGS-FROM-ARGV "$@"
513
521
 
514
522
 
535
543
fi
536
544
plugin_dir="${plugin_dir}${PLUGIN_VARIANT}"
537
545
 
538
 
 
539
546
# Determine what logging facility to use
540
547
 
541
548
# Ensure that 'logger' exists, if it's requested
559
566
 
560
567
    # mysqld does not add ".err" to "--log-error=foo."; it considers a
561
568
    # trailing "." as an extension
 
569
    
562
570
    if expr "$err_log" : '.*\.[^/]*$' > /dev/null
563
571
    then
564
572
        :
761
769
fi
762
770
 
763
771
#
 
772
# Flush and purge buffers/caches.
 
773
#
 
774
 
 
775
if @TARGET_LINUX@ && test $flush_caches -eq 1
 
776
then
 
777
  # Locate sync, ensure it exists.
 
778
  if ! my_which sync > /dev/null 2>&1
 
779
  then
 
780
    log_error "sync command not found, required for --flush-caches"
 
781
    exit 1
 
782
  # Flush file system buffers.
 
783
  elif ! sync
 
784
  then
 
785
    # Huh, the sync() function is always successful...
 
786
    log_error "sync failed, check if sync is properly installed"
 
787
  fi
 
788
 
 
789
  # Locate sysctl, ensure it exists.
 
790
  if ! my_which sysctl > /dev/null 2>&1
 
791
  then
 
792
    log_error "sysctl command not found, required for --flush-caches"
 
793
    exit 1
 
794
  # Purge page cache, dentries and inodes.
 
795
  elif ! sysctl -q -w vm.drop_caches=3
 
796
  then
 
797
    log_error "sysctl failed, check the error message for details"
 
798
    exit 1
 
799
  fi
 
800
elif test $flush_caches -eq 1
 
801
then
 
802
  log_error "--flush-caches is not supported on this platform"
 
803
  exit 1
 
804
fi
 
805
 
 
806
#
764
807
# From now on, we catch signals to do a proper shutdown of mysqld
765
808
# when signalled to do so.
766
809
#
787
830
 
788
831
cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
789
832
 
 
833
#
 
834
# Set mysqld's memory interleave policy.
 
835
#
 
836
 
 
837
if @TARGET_LINUX@ && test $numa_interleave -eq 1
 
838
then
 
839
  # Locate numactl, ensure it exists.
 
840
  if ! my_which numactl > /dev/null 2>&1
 
841
  then
 
842
    log_error "numactl command not found, required for --numa-interleave"
 
843
    exit 1
 
844
  # Attempt to run a command, ensure it works.
 
845
  elif ! numactl --interleave=all true
 
846
  then
 
847
    log_error "numactl failed, check if numactl is properly installed"
 
848
  fi
 
849
 
 
850
  # Launch mysqld with numactl.
 
851
  cmd="$cmd numactl --interleave=all"
 
852
elif test $numa_interleave -eq 1
 
853
then
 
854
  log_error "--numa-interleave is not supported on this platform"
 
855
  exit 1
 
856
fi
 
857
 
790
858
for i in  "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
791
859
  "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
792
860
do