Home
last modified time | relevance | path

Searched full:mysql (Results 1 – 25 of 219) sorted by relevance

123456789

/external/oss-fuzz/projects/mysql-server/targets/
Dfuzz_real_query.cc6 #include <mysql.h>
7 #include <mysql/client_plugin.h>
15 MYSQL mysql; in LLVMFuzzerTestOneInput() local
28 mysql_init(&mysql); in LLVMFuzzerTestOneInput()
29 mysql_options(&mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN, &opt_cleartext); in LLVMFuzzerTestOneInput()
30 mysql_options(&mysql, MYSQL_OPT_SSL_MODE, &opt_ssl); in LLVMFuzzerTestOneInput()
31 mysql.options.protocol = MYSQL_PROTOCOL_FUZZ; in LLVMFuzzerTestOneInput()
34 if (!mysql_real_connect(&mysql, "localhost", "root", "root", "dbname", 0, NULL, flags)) { in LLVMFuzzerTestOneInput()
37 fprintf(logfile, "The last inserted row id is: %llu\n", mysql_insert_id(&mysql)); in LLVMFuzzerTestOneInput()
38 fprintf(logfile, "%llu affected rows\n", mysql_affected_rows(&mysql)); in LLVMFuzzerTestOneInput()
[all …]
Dfuzz_stmt_fetch.cc6 #include <mysql.h>
7 #include <mysql/client_plugin.h>
16 MYSQL mysql; in LLVMFuzzerTestOneInput() local
30 mysql_init(&mysql); in LLVMFuzzerTestOneInput()
31 mysql_options(&mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN, &opt_cleartext); in LLVMFuzzerTestOneInput()
32 mysql_options(&mysql, MYSQL_OPT_SSL_MODE, &opt_ssl); in LLVMFuzzerTestOneInput()
33 mysql.options.protocol = MYSQL_PROTOCOL_FUZZ; in LLVMFuzzerTestOneInput()
36 if (!mysql_real_connect(&mysql,"localhost","root","root","",0,NULL,0)) in LLVMFuzzerTestOneInput()
41 MYSQL_STMT *stmt = mysql_stmt_init(&mysql); in LLVMFuzzerTestOneInput()
45 mysql_close(&mysql); in LLVMFuzzerTestOneInput()
[all …]
Dfuzz_initfile.cc6 //#include <mysql.h>
7 //#include <mysql/client_plugin.h>
24 #include "mysql/psi/mysql_socket.h"
25 #include "mysql/psi/mysql_file.h"
71 …root --initialize-insecure --log-error-verbosity=5 --datadir=/out/mysql/data/ --basedir=/out/mysql/ in LLVMFuzzerTestOneInput()
78 snprintf(command, MAX_SIZE-1, "%s/mysql/data", filepath); in LLVMFuzzerTestOneInput()
81 snprintf(argbase, MAX_SIZE-1, "--basedir=%s/mysql/", filepath); in LLVMFuzzerTestOneInput()
Dfuzz_docommand.cc21 //#include <mysql.h>
22 //#include <mysql/client_plugin.h>
40 #include "mysql/psi/mysql_socket.h"
58 // FIXME: Fix this buffer with succesful authenticated connection for mysql 8.21.
115 …root --initialize-insecure --log-error-verbosity=5 --datadir=/out/mysql/data/ --basedir=/out/mysql/ in LLVMFuzzerTestOneInput()
121 snprintf(command, MAX_SIZE-1, "%s/mysql/data", filepath); in LLVMFuzzerTestOneInput()
124 snprintf(argbase, MAX_SIZE-1, "--basedir=%s/mysql/", filepath); in LLVMFuzzerTestOneInput()
Dfuzz_mysqld.cc6 //#include <mysql.h>
7 //#include <mysql/client_plugin.h>
24 #include "mysql/psi/mysql_socket.h"
123 …root --initialize-insecure --log-error-verbosity=5 --datadir=/out/mysql/data/ --basedir=/out/mysql/ in LLVMFuzzerTestOneInput()
129 snprintf(command, MAX_SIZE-1, "%s/mysql/data", filepath); in LLVMFuzzerTestOneInput()
132 snprintf(argbase, MAX_SIZE-1, "--basedir=%s/mysql/", filepath); in LLVMFuzzerTestOneInput()
/external/autotest/site_utils/
Dbind_mysql_to_cpuset.sh7 # This script creates a CPU set and binds the MySQL process to the
8 # set. It restarts MySQL if specified in the option. This script needs
14 MYSQL_PATH='/etc/init.d/mysql.server'
15 MYSQL_PID_PATH='/var/lib/mysql/atlantis1.mtv.corp.google.com.pid'
20 # The base cpuset directory for mysql.
21 MYSQL_CPUSET='mysql'
22 # CPUs in MySQL cpuset. E.g. 0-2,7,12-14.
29 echo -e "Create and bind the MySQL process to a specified CPU set.\n"
34 echo -e " MySQL process and delete the CPU set. It does not"
35 echo -e " restart MySQL nor create a new CPU set. (Default:"
[all …]
Ddump_to_cloudsql.py7 """Module to upload a MySQL dump file to Cloud SQL.
13 Uploads MySQL dump file to a MySQL database or Cloud SQL. With no optional
17 FILE text dump file containing MySQL commands
18 REMOTE Cloud SQL instance name or MySQL hostname
44 """Manages connections to a MySQL database.
60 data: A line of data from the MySQL dump.
114 """Creates local MySQL database connections."""
123 """Connects to the local MySQL database and returns the connection.
126 A MySQLdb database connection to the local MySQL database.
128 print('Connecting to mysql at localhost as %s.' % self._user)
[all …]
Dmysql_bootstrap.py6 """Bootstrap mysql.
19 Execute mysql -u <default_user> -p<default_pass> -e
36 Execute mysql -u <default_user> -p<default_pass> -e
57 """Generic mysql command execution exception."""
61 """Class to shell out to mysql.
80 """Wrap the given mysql command.
82 @param cmd: The mysql command to wrap with the --execute option.
86 @param port: The port mysql server is listening on.
88 return ('mysql -u %s -p%s --host %s --port %s -e "%s"' %
94 """Execute a mysql statement on a remote server by sshing into it.
[all …]
Dbackup_mysql_db.py7 """Module used to back up the mysql db and upload to Google Storage.
75 # Contrary to a conventional mysql dump which takes O(hours) on large databases,
77 # of a mysql command showing all hosts and their pool labels to a text file that
89 """Class that archives the Autotest MySQL DB to Google Storage.
137 """Returns the path to a mysql dump of the current autotest DB."""
140 logging.debug('Dumping mysql database to file %s', filename)
169 'set -o pipefail; mysql -u %(user)s -p%(password)s '
269 logging.debug('Uploading mysql dump to google storage')
313 help='Google storage bucket to store mysql db dumps.')
317 help='The type of mysql dump to store.')
[all …]
/external/bcc/tools/
Ddbslower_example.txt4 dbslower traces queries served by a MySQL or PostgreSQL server, and prints
8 # dbslower mysql
18 # dbslower mysql -m 1000
33 # dbslower mysql -p $(pidof mysql)
44 # dbslower mysql -m 0
47 6.003720 25776 2.363 /* mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80a…
64 Here we can see the MySQL connector initialization and connection establishment,
71 {mysql,postgres}
74 {mysql,postgres} the database engine to use
88 dbslower mysql -p 480 -m 30 # trace MySQL queries slower than 30ms
[all …]
Ddbslower.py3 # dbslower Trace MySQL and PostgreSQL queries slower than a threshold.
6 # {mysql,postgres}
12 # 1) USDT probes, which means it needs MySQL and PostgreSQL built with
15 # PATH_TO_BINARY parameter. (At the moment only MySQL support)
18 # all MySQL or PostgreSQL database processes and uses USDT probes.
36 dbslower mysql -p 480 -m 30 # trace MySQL queries slower than 30ms
37 dbslower mysql -p 480 -v # trace MySQL queries & print the BPF program
38 dbslower mysql -x $(which mysqld) # trace MySQL queries with uprobes
46 parser.add_argument("db", choices=["mysql", "postgres"],
62 if args.db == "mysql":
[all …]
Ddbstat_example.txt4 dbstat traces queries performed by a MySQL or PostgreSQL database process, and
7 # dbstat mysql
29 # dbstat mysql -m 1000
49 # dbstat mysql -p $(pidof mysql) -i 3
99 {mysql,postgres}
102 {mysql,postgres} the database engine to use
117 dbstat mysql -v # display MySQL latencies and print the BPF program
118 dbstat mysql -u # display query latencies in microseconds (default: ms)
119 dbstat mysql -m 5 # trace only queries slower than 5ms
120 dbstat mysql -p 408 # trace queries in a specific process
Ddbstat.py3 # dbstat Display a histogram of MySQL and PostgreSQL query latencies.
6 # [-i INTERVAL] {mysql,postgres}
8 # This tool uses USDT probes, which means it needs MySQL and PostgreSQL built
23 dbstat mysql -v # display MySQL latencies and print the BPF program
24 dbstat mysql -u # display query latencies in microseconds (default: ms)
25 dbstat mysql -m 5 # trace only queries slower than 5ms
26 dbstat mysql -p 408 # trace queries in a specific process
34 parser.add_argument("db", choices=["mysql", "postgres"],
47 if args.db == "mysql":
Dmysqld_qslower_example.txt4 mysqld_qslower traces queries served by a MySQL server, and prints those that
9 Tracing MySQL server queries for PID 14371 slower than 1 ms...
25 Tracing MySQL server queries for PID 14371 slower than 0.1 ms...
39 Tracing MySQL server queries for PID 14371 slower than 0 ms...
50 This includes an initialization of a mysql client command, and selecting the
/external/bcc/man/man8/
Ddbslower.83 dbslower \- Trace MySQL/PostgreSQL server queries slower than a threshold.
5 .B dbslower [-v] [-p PID [PID ...]] [-x PATH] [-m THRESHOLD] {mysql,postgres}
7 This traces queries served by a MySQL or PostgreSQL server, and prints
12 MySQL and PostgreSQL for DTrace support, but which may not be enabled on a
14 Alternativly, MySQL queries can be traced without the USDT support using the
19 CONFIG_BPF, bcc, and MySQL server with USDT probe support (when configuring
28 detect the MySQL or PostgreSQL processes running on the system.
31 Path to MySQL binary. This option allow to MySQL queries even when USDT probes
32 aren't enabled on the MySQL server.
41 Trace MySQL server queries slower than 1 ms:
[all …]
Ddbstat.83 dbstat \- Collect histograms of MySQL/PostgreSQL query latencies.
5 . B dbstat [-v] [-p PID [PID ...]] [-m THRESHOLD] [-u] [-i INTERVAL] {mysql,postgres}
7 This traces queries served by a MySQL or PostgreSQL server, and collects a
12 MySQL and PostgreSQL for DTrace support, but which may not be enabled on a
17 CONFIG_BPF, bcc, and MySQL server with USDT probe support (when configuring
26 detect the MySQL or PostgreSQL processes running on the system.
42 Display histogram of MySQL query latencies:
44 .B dbstat mysql
Dmysqld_qslower.83 mysqld_qslower \- Trace MySQL server queries slower than a threshold.
7 This traces queries served by a MySQL server, and prints those that exceed a
12 MySQL for DTrace support, but which may not be enabled on a given MySQL
17 CONFIG_BPF, bcc, and MySQL server with USDT probe support (when configuring
27 Trace MySQL server queries slower than 1 ms for PID 1981:
48 This adds low-overhead instrumentation to MySQL queries, and only emits output
/external/autotest/client/tests/dbt2/
Ddbt2.py6 # currently hardcoded to use PostgreSQL but the kit also supports MySQL.
19 self.job.setup_dep(['pgsql', 'pgpool', 'mysql'])
22 # Extract one copy of the kit for MySQL.
24 utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.mysql')
25 os.chdir(self.srcdir + '.mysql')
26 utils.configure('--with-mysql=%s/deps/mysql/mysql' % self.autodir)
40 (self.resultsdir, self.srcdir + '.mysql/scripts/output'))
48 if (db_type == "mysql"):
58 utils.system(self.srcdir + '.mysql/scripts/mysql/build_db.sh -g -w 1')
59 utils.system(self.srcdir + '.mysql/scripts/run_workload.sh ' + args)
Ddbt2-0.39.tar.bz2 ... .sh.in dbt2-0.39/scripts/mysql/ dbt2-0.39/scripts/mysql/build_db
Dcontrol8 currently hardcoded to use PostgreSQL but the kit also supports MySQL.
14 job.run_test('dbt2', db_type='mysql', args='-w 1 -c 20 -d 1800 -s 100 -n -z "autotest mysql"', tag=…
/external/autotest/client/tests/sysbench/
Dsysbench.py17 self.job.setup_dep(['pgsql', 'mysql'])
22 mysql_dir = os.path.join(self.autodir, 'deps/mysql/mysql')
26 'PATH=%s/bin:$PATH ./configure --with-mysql=%s --with-pgsql'
35 mlib = os.path.join(self.autodir, 'deps/mysql/mysql/lib/mysql')
54 elif (db_type == 'mysql'):
104 bin = os.path.join(self.autodir, 'deps/mysql/mysql/bin')
105 data = os.path.join(self.autodir, 'deps/mysql/mysql/var')
106 log = os.path.join(self.debugdir, 'mysql.log')
122 '--db-driver=mysql --mysql-user=root'
126 bin + '/mysql -u root')
Dcontrol9 The idea is to quickly get an impression about system performance for MySQL
10 usage without setting up complex benchmark and even without installing MySQL.
23 job.run_test('sysbench', db_type='mysql', build=build, \
24 num_threads=threads, read_only=1, tag='mysql.' + str(threads))
/external/autotest/client/deps/mysql/
Dmysql.py11 …utils.get_file('http://mirror.x10.com/mirror/mysql/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz', tarba…
14 utils.configure('--prefix=%s/mysql --enable-thread-safe-client' \
20 # MySQL doesn't create this directory on it's own.
24 os.mkdir(topdir + '/mysql/var')
30 utils.system('%s/mysql/bin/mysql_install_db' % topdir)
35 tarball = os.path.join(pwd, 'mysql-5.0.45.tar.gz')
/external/oss-fuzz/projects/mysql-server/
Dbuild.sh19 cd mysql-server
24 …OST=1 -DWITH_BOOST=. -DWITH_SSL=system -DFUZZING=1 -DCMAKE_INSTALL_PREFIX=$OUT/mysql -DWITH_UBSAN=1
26 …F -DDOWNLOAD_BOOST=1 -DWITH_BOOST=. -DWITH_SSL=system -DFUZZING=1 -DCMAKE_INSTALL_PREFIX=$OUT/mysql
29 mv $OUT/mysql/bin/fuzz* $OUT/
34 rm -Rf $OUT/mysql/data
35 $OUT/mysql/bin/mysqld --user=root --initialize-insecure --log-error-verbosity=5 --skip-ssl --datadi…
/external/autotest/site_utils/stats/
Dmysql_stats.py7 """Queries a MySQL database and emits status metrics to Monarch.
67 """Establishes a MySQL connection and creates a cursor."""
105 @returns The mysql query result.
117 """Queries MySQL for important stats and emits Monarch metrics
121 @param conn: The mysql connection object.
143 """Sets up ts_mon and repeatedly queries MySQL stats"""
157 @param conn: The mysql connection object.

123456789