Hello community,
here is the log from the commit of package sysbench for openSUSE:Factory checked in at 2018-12-28 12:36:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sysbench (Old)
and /work/SRC/openSUSE:Factory/.sysbench.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sysbench"
Fri Dec 28 12:36:04 2018 rev:21 rq:661728 version:1.0.16
Changes:
--------
--- /work/SRC/openSUSE:Factory/sysbench/sysbench.changes 2018-10-31 13:21:51.647033837 +0100
+++ /work/SRC/openSUSE:Factory/.sysbench.new.28833/sysbench.changes 2018-12-28 12:36:08.631928973 +0100
@@ -1,0 +2,10 @@
+Fri Dec 28 04:46:21 UTC 2018 - sean@suspend.net
+
+- Update to version 1.0.16:
+ * SQL API: fix GH-282 (MySQL fetch_row() is broken)
+ * --rate mode: fix latency stats skew on low rates
+ * Lua: Add /usr/share/lua/5.1 to LUA_ATH and /usr/lib/lua/5.1
+ * build/CI/packaging?: add -Wvla to default compiler flags
+ * build/CI/packaging: fix buildpack.sh to not push multiple file types
+
+-------------------------------------------------------------------
Old:
----
sysbench-1.0.15.tar.gz
New:
----
sysbench-1.0.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sysbench.spec ++++++
--- /var/tmp/diff_new_pack.gRZRLq/_old 2018-12-28 12:36:08.983928727 +0100
+++ /var/tmp/diff_new_pack.gRZRLq/_new 2018-12-28 12:36:08.983928727 +0100
@@ -17,7 +17,7 @@
Name: sysbench
-Version: 1.0.15
+Version: 1.0.16
Release: 0
Summary: A MySQL benchmarking tool
License: GPL-2.0-only
++++++ sysbench-1.0.15.tar.gz -> sysbench-1.0.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/.travis.yml new/sysbench-1.0.16/.travis.yml
--- old/sysbench-1.0.15/.travis.yml 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/.travis.yml 2018-12-16 17:42:10.000000000 +0100
@@ -30,20 +30,20 @@
- TARGET=coverage
- OS=el DIST=6
- OS=el DIST=7
- - OS=fedora DIST=27
- OS=fedora DIST=28
+ - OS=fedora DIST=29
- OS=fedora DIST=rawhide
- OS=ubuntu DIST=trusty
- OS=ubuntu DIST=xenial
- - OS=ubuntu DIST=artful
- OS=ubuntu DIST=bionic
+ - OS=ubuntu DIST=cosmic
- OS=debian DIST=jessie
- OS=debian DIST=stretch
- OS=debian DIST=sid
- OS=ubuntu DIST=trusty ARCH=i386
- OS=ubuntu DIST=xenial ARCH=i386
- - OS=ubuntu DIST=artful ARCH=i386
- OS=ubuntu DIST=bionic ARCH=i386
+ - OS=ubuntu DIST=cosmic ARCH=i386
- OS=debian DIST=jessie ARCH=i386
- OS=debian DIST=stretch ARCH=i386
- OS=debian DIST=sid ARCH=i386
@@ -54,20 +54,20 @@
compiler: clang
- env: OS=el DIST=7
compiler: clang
- - env: OS=fedora DIST=27
- compiler: clang
- env: OS=fedora DIST=28
compiler: clang
+ - env: OS=fedora DIST=29
+ compiler: clang
- env: OS=fedora DIST=rawhide
compiler: clang
- env: OS=ubuntu DIST=trusty
compiler: clang
- env: OS=ubuntu DIST=xenial
compiler: clang
- - env: OS=ubuntu DIST=artful
- compiler: clang
- env: OS=ubuntu DIST=bionic
compiler: clang
+ - env: OS=ubuntu DIST=cosmic
+ compiler: clang
- env: OS=debian DIST=jessie
compiler: clang
- env: OS=debian DIST=stretch
@@ -78,10 +78,10 @@
compiler: clang
- env: OS=ubuntu DIST=xenial ARCH=i386
compiler: clang
- - env: OS=ubuntu DIST=artful ARCH=i386
- compiler: clang
- env: OS=ubuntu DIST=bionic ARCH=i386
compiler: clang
+ - env: OS=ubuntu DIST=cosmic ARCH=i386
+ compiler: clang
- env: OS=debian DIST=jessie ARCH=i386
compiler: clang
- env: OS=debian DIST=stretch ARCH=i386
@@ -92,20 +92,20 @@
os: osx
- env: OS=el DIST=7
os: osx
- - env: OS=fedora DIST=27
- os: osx
- env: OS=fedora DIST=28
os: osx
+ - env: OS=fedora DIST=29
+ os: osx
- env: OS=fedora DIST=rawhide
os: osx
- env: OS=ubuntu DIST=trusty
os: osx
- env: OS=ubuntu DIST=xenial
os: osx
- - env: OS=ubuntu DIST=artful
- os: osx
- env: OS=ubuntu DIST=bionic
os: osx
+ - env: OS=ubuntu DIST=cosmic
+ os: osx
- env: OS=debian DIST=jessie
os: osx
- env: OS=debian DIST=stretch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/ChangeLog new/sysbench-1.0.16/ChangeLog
--- old/sysbench-1.0.15/ChangeLog 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/ChangeLog 2018-12-16 17:42:10.000000000 +0100
@@ -1,3 +1,20 @@
+2018-12-16 Alexey Kopytov
+
+ * version 1.0.16
+ * build/CI/packaging: add Ubuntu Cosmic.
+ * build/CI/packaging: add Fedora 29.
+ * build/CI/packaging: remove Fedora 27 (EOL).
+ * SQL API: fix GH-282 (Mysql's fetch_row() is broken)
+ * --rate mode: fix latency stats skew on low rates
+ * Lua: Add /usr/share/lua/5.1 to LUA_PATH and /usr/lib/lua/5.1
+ to LUA_CPATH.
+ * build/CI/packaging: add -Wvla to default compiler flags.
+ * build/CI/packaging: fix debian/changelog format
+ * build/CI/packaging: fix buildpack.sh to not push multiple file
+ types to packagecloud.
+ * build/CI/packaging: add libaio-dev to Debian/Ubuntu build
+ dependencies.
+
2018-07-03 Alexey Kopytov
* version 1.0.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/configure.ac new/sysbench-1.0.16/configure.ac
--- old/sysbench-1.0.15/configure.ac 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/configure.ac 2018-12-16 17:42:10.000000000 +0100
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.63)
-AC_INIT([sysbench],[1.0.15],[https://github.com/akopytov/sysbench/issues],
+AC_INIT([sysbench],[1.0.16],[https://github.com/akopytov/sysbench/issues],
[sysbench], [https://github.com/akopytov/sysbench])
AC_CONFIG_AUX_DIR([config])
@@ -443,7 +443,7 @@
CC_WARNINGS="-Wall -Wextra -Wpointer-arith -Wbad-function-cast \
-Wstrict-prototypes -Wnested-externs -Wno-format-zero-length \
-Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
--Wredundant-decls -Wcast-align ${W_FAIL}"
+-Wredundant-decls -Wcast-align -Wvla ${W_FAIL}"
fi
if test "$ax_cv_c_compiler_vendor" = "sun"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/debian/changelog new/sysbench-1.0.16/debian/changelog
--- old/sysbench-1.0.15/debian/changelog 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/debian/changelog 2018-12-16 17:42:10.000000000 +0100
@@ -1,3 +1,9 @@
+sysbench (1.0.15-2) unstable; urgency=low
+
+ * add libaio-dev to build dependencies
+
+ -- Alexey Kopytov Sat, 09 Jul 2018 09:24:42 +0300
+
sysbench (1.0.12-1) unstable; urgency=low
* remove vim-common from build dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/debian/control new/sysbench-1.0.16/debian/control
--- old/sysbench-1.0.15/debian/control 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/debian/control 2018-12-16 17:42:10.000000000 +0100
@@ -2,7 +2,7 @@
Section: misc
Priority: extra
Maintainer: Alexey Kopytov
-Build-Depends: debhelper, autoconf, automake, libtool, libmysqlclient-dev | default-libmysqlclient-dev, libpq-dev, pkg-config, python
+Build-Depends: debhelper, autoconf, automake, libaio-dev, libtool, libmysqlclient-dev | default-libmysqlclient-dev, libpq-dev, pkg-config, python
Standards-Version: 3.9.5
Homepage: https://github.com/akopytov/sysbench
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/scripts/buildpack.sh new/sysbench-1.0.16/scripts/buildpack.sh
--- old/sysbench-1.0.15/scripts/buildpack.sh 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/scripts/buildpack.sh 2018-12-16 17:42:10.000000000 +0100
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-# Build packages for a specified architecture and upload them packagecloud.io
+# Build packages for a specified architecture and upload them to packagecloud.io
# Expects the following environment variables to be defined:
#
# ARCH - architecture. 'aarch64', 'x86_64 and 'i386' are currently supported
@@ -49,12 +49,12 @@
distros_x86_64=(
"el 6 x86_64"
"el 7 x86_64"
- "fedora 27 x86_64"
"fedora 28 x86_64"
+ "fedora 29 x86_64"
"ubuntu trusty x86_64"
"ubuntu xenial x86_64"
- "ubuntu artful x86_64"
"ubuntu bionic x86_64"
+ "ubuntu cosmic x86_64"
"debian jessie x86_64"
"debian stretch x86_64"
)
@@ -62,18 +62,18 @@
distros_i386=(
"ubuntu trusty i386"
"ubuntu xenial i386"
- "ubuntu artful i386"
"ubuntu bionic i386"
+ "ubuntu cosmic i386"
"debian jessie i386"
"debian stretch i386"
)
distros_aarch64=(
"el 7 aarch64"
- "fedora 27 aarch64"
"fedora 28 aarch64"
- "ubuntu artful aarch64"
+ "fedora 29 aarch64"
"ubuntu bionic aarch64"
+ "ubuntu cosmic aarch64"
"ubuntu trusty aarch64"
"ubuntu xenial aarch64"
"debian jessie aarch64"
@@ -178,9 +178,12 @@
echo "Pushing packages to ${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO}"
- package_cloud push ${PACKAGECLOUD_EXTRA_ARGS} \
- ${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO}/${OS}/${DIST} \
- $files
+ for f in $files ; do
+ echo $f
+ package_cloud push ${PACKAGECLOUD_EXTRA_ARGS} \
+ ${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO}/${OS}/${DIST} \
+ $f
+ done
OS=${PPOS} packpack/packpack clean
done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/src/drivers/mysql/drv_mysql.c new/sysbench-1.0.16/src/drivers/mysql/drv_mysql.c
--- old/sysbench-1.0.15/src/drivers/mysql/drv_mysql.c 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/src/drivers/mysql/drv_mysql.c 2018-12-16 17:42:10.000000000 +0100
@@ -969,8 +969,10 @@
DEBUG("mysql_fetch_row(%p) = %p", rs->ptr, my_row);
unsigned long *lengths = mysql_fetch_lengths(rs->ptr);
+ DEBUG("mysql_fetch_lengths(%p) = %p", rs->ptr, lengths);
+
if (lengths == NULL)
- return DB_ERROR_NONE;
+ return DB_ERROR_IGNORABLE;
for (size_t i = 0; i < rs->nfields; i++)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/src/drivers/pgsql/drv_pgsql.c new/sysbench-1.0.16/src/drivers/pgsql/drv_pgsql.c
--- old/sysbench-1.0.15/src/drivers/pgsql/drv_pgsql.c 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/src/drivers/pgsql/drv_pgsql.c 2018-12-16 17:42:10.000000000 +0100
@@ -721,7 +721,7 @@
*/
rownum = (intptr_t) row->ptr;
if (rownum >= (int) rs->nrows)
- return DB_ERROR_NONE;
+ return DB_ERROR_IGNORABLE;
for (i = 0; i < (int) rs->nfields; i++)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/src/sb_lua.c new/sysbench-1.0.16/src/sb_lua.c
--- old/sysbench-1.0.15/src/sb_lua.c 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/src/sb_lua.c 2018-12-16 17:42:10.000000000 +0100
@@ -592,7 +592,7 @@
}
lua_pushliteral(L, "/usr/local/share/lua/5.1/?.lua;");
-
+ lua_pushliteral(L, "/usr/share/lua/5.1/?.lua;");
lua_pushliteral(L, DATADIR "/?.lua;");
lua_concat(L, lua_gettop(L) - top);
@@ -618,8 +618,9 @@
}
lua_pushliteral(L, "/usr/local/lib/lua/5.1/?" DLEXT ";");
-
+ lua_pushliteral(L, "/usr/lib/lua/5.1/?" DLEXT ";");
lua_pushliteral(L, LIBDIR ";");
+
lua_concat(L, lua_gettop(L) - top);
/* Mimic the default Lua behavior with respect to LUA_CPATH and ';;' */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/src/sysbench.c new/sysbench-1.0.16/src/sysbench.c
--- old/sysbench-1.0.15/src/sysbench.c 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/src/sysbench.c 2018-12-16 17:42:10.000000000 +0100
@@ -134,6 +134,8 @@
static sb_barrier_t thread_start_barrier;
/* structures to handle queue of events, needed for tx_rate mode */
+static pthread_mutex_t queue_mutex;
+static pthread_cond_t queue_cond;
static uint64_t queue_array[MAX_QUEUE_LEN] CK_CC_CACHELINE;
static ck_ring_buffer_t queue_ring_buffer[MAX_QUEUE_LEN] CK_CC_CACHELINE;
static ck_ring_t queue_ring CK_CC_CACHELINE;
@@ -709,7 +711,23 @@
while (!ck_ring_dequeue_spmc(&queue_ring, queue_ring_buffer, &ptr) &&
!ck_pr_load_int(&queue_is_full))
- usleep(500000.0 * sb_globals.threads / sb_globals.tx_rate);
+ {
+ pthread_mutex_lock(&queue_mutex);
+ pthread_cond_wait(&queue_cond, &queue_mutex);
+ pthread_mutex_unlock(&queue_mutex);
+
+ /* Re-check for global error and time limit after waiting */
+
+ if (sb_globals.error)
+ return false;
+
+ if (sb_globals.max_time_ns > 0 &&
+ SB_UNLIKELY(sb_timer_value(&sb_exec_timer) >= sb_globals.max_time_ns))
+ {
+ log_text(LOG_INFO, "Time limit exceeded, exiting...");
+ return false;
+ }
+ }
if (ck_pr_load_int(&queue_is_full))
{
@@ -835,13 +853,11 @@
static inline double sb_rand_exp(double lambda)
{
- return -1.0 / lambda * log(1 - sb_rand_uniform_double());
+ return -lambda * log(1 - sb_rand_uniform_double());
}
static void *eventgen_thread_proc(void *arg)
{
- int i;
-
(void)arg; /* unused */
sb_tls_thread_id = SB_BACKGROUND_THREAD_ID;
@@ -851,7 +867,12 @@
ck_ring_init(&queue_ring, MAX_QUEUE_LEN);
- i = 0;
+ if (pthread_mutex_init(&queue_mutex, NULL) ||
+ pthread_cond_init(&queue_cond, NULL))
+ {
+ sb_barrier_wait(&thread_start_barrier);
+ return NULL;
+ }
log_text(LOG_DEBUG, "Event generating thread started");
@@ -865,24 +886,33 @@
Get exponentially distributed time intervals in nanoseconds with Lambda =
tx_rate. Alternatively, we can use Lambda = tx_rate / 1e9
*/
- double lambda = sb_globals.tx_rate / 1e9;
+ const double lambda = 1e9 / sb_globals.tx_rate;
+
uint64_t curr_ns = sb_timer_value(&sb_exec_timer);
uint64_t intr_ns = sb_rand_exp(lambda);
- uint64_t next_ns = curr_ns + intr_ns;;
+ uint64_t next_ns = curr_ns + intr_ns;
- for (;;)
+ for (int i = 0; ; i = (i+1) % MAX_QUEUE_LEN)
{
curr_ns = sb_timer_value(&sb_exec_timer);
intr_ns = sb_rand_exp(lambda);
next_ns += intr_ns;
+ if (sb_globals.max_time_ns > 0 &&
+ SB_UNLIKELY(curr_ns >= sb_globals.max_time_ns))
+ {
+ /* Wake all waiting threads */
+ pthread_cond_broadcast(&queue_cond);
+ return NULL;
+ }
+
if (next_ns > curr_ns)
sb_nanosleep(next_ns - curr_ns);
/* Enqueue a new event */
queue_array[i] = sb_timer_value(&sb_exec_timer);
if (ck_ring_enqueue_spmc(&queue_ring, queue_ring_buffer,
- &queue_array[i++]) == false)
+ &queue_array[i]) == false)
{
ck_pr_store_int(&queue_is_full, 1);
log_text(LOG_FATAL,
@@ -891,8 +921,8 @@
return NULL;
}
- if (i >= MAX_QUEUE_LEN - 1)
- i = 0;
+ /* Wake up one waiting thread, if there are any */
+ pthread_cond_signal(&queue_cond);
}
return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysbench-1.0.15/tests/include/api_sql_common.sh new/sysbench-1.0.16/tests/include/api_sql_common.sh
--- old/sysbench-1.0.15/tests/include/api_sql_common.sh 2018-07-03 21:49:50.000000000 +0200
+++ new/sysbench-1.0.16/tests/include/api_sql_common.sh 2018-12-16 17:42:10.000000000 +0100
@@ -181,9 +181,11 @@
sysbench $SB_ARGS run
+cat <$CRAMTMP/api_sql.lua <$CRAMTMP/api_sql.lua <$CRAMTMP/api_sql.lua <$CRAMTMP/api_sql.lua <