Showing entries 1 to 10 of 41
10 Older Entries »
Displaying posts with tag: debugging (reset)
On C++ Debugging. Interview with Greg Law

“Like it or not, debugging is part of programming. There is a lot of research and cool technology about preventing bugs (programming language features or design decisions that make certain bugs impossible) or catching bugs very early (through static or dynamic analysis or better testing), and all this is of course laudable and good stuff. But I’ve often been struck by how little attention is placed on making it easier to fix those bugs when they inevitably do happen.” — Greg Law

Q1: You are a prolific speaker at C++ conferences and podcasts. In your experience, who is still using C++?

Greg Law: C++ is used widely and its use is growing. I see a lot of C++ usage in Data Management, Networking, Electronic Design Automation (EDA), Aerospace, Games, Finance, etc.

It’s probably true that use of some other languages – particularly JavaScript …

[Read more]
Finding a Regression in MySQL Source Code: A Case Study

At the Percona engineering team, we often receive requests to analyze changes in MySQL/Percona Server for MySQL behavior from one version to another, either due to regression or a bug fix (when having to point out to a customer that commit X has fixed their issue and upgrading to a version including that fix will solve their problem).

In this blog post, we will analyze the approach used to fix PS-7019 – Correct query results for LEFT JOIN with GROUP BY.

Each release comes with a lot of changes. For example, the difference between MySQL 8.0.19 to 8.0.20:

git diff mysql-8.0.19..mysql-8.0.20 | wc -l
git diff mysql-8.0.19..mysql-8.0.20 --name-only | wc -l

737K lines in 4495 files have changed from one minor version to another.

git …
[Read more]
Why Optimization derived_merge can Break Your Queries

Lately, I worked on several queries which started returning wrong results after upgrading MySQL Server to version 5.7 The reason for the failure was derived merge optimization which is one of the default


  options. Issues were solved, though at the price of performance, when we turned it


 . But, more importantly, we could not predict if any other query would start returning incorrect data, to allow us to fix the application before it was too late. Therefore I tried to find reasons why


  can fail. Analyzing the problem

In the first run, we turned SQL Mode


on, and this removed most of the problematic queries. That said, few of the queries that were successfully working with


  were affected.

A quick search in the …

[Read more]
Restore data from InnoDB file (idb & frm) using TwinDB toolkit

We have been told many times that modifying live database should be done with extreme care, we should always make a backup before doing something big to the database. However, there are countless stories on the Internet about losing data due to various reason, one of them is forgetting to create a backup (Gitlab is an example: I was facing the same issue when upgrading MySQL server to a new version. Luckily I was able to restore most of the data but it was still a very good lesson for me. One of lesson I learned is how we could restore the data from the *.ibd and *.frm file.

The database I worked with had many tables. There were about 5 of them using MyISAM engine while others were using InnoDB engine. I was asked to upgrade the entire the …

[Read more]
Percona Live Europe Featured Talks: Debugging with Logs (and Other Events) Featuring Charity Majors

Welcome to another post in our series of interview blogs for the upcoming Percona Live Europe 2017 in Dublin. This series highlights a number of talks that will be at the conference and gives a short preview of what attendees can expect to learn from the presenter.

This blog post is with Charity Majors, CEO/Cofounder of Honeycomb. Her talk is Debugging with Logs (and Other Events). Her presentation covers some of the lessons every engineer should know (and often learns the hard way): why good logging solutions are so expensive, why treating your logs as strings can be costly and dangerous, how logs can impact code …

[Read more]
When order of appearance of indexes matters in MySQL

Sometimes MySQL surprises you in ways you would have never imagined.

Would you think that the order in which the indexes appear in a table matters?
It does. Mind you, not the order of the columns - the order of the indexes.
MySQL optimizer can, in specific circumstances, take different paths, sometimes with nefarious effects.

Please consider the following table:

CREATE TABLE `mypartitionedtable ` (
  `HASH_ID` char(64) NOT NULL,
  `RAW_DATA` mediumblob NOT NULL,

[Read more]
Install TensorFlow with GPU support on a RedHat (supercluster)

I am working on a deep learning model for text summarization and I use TensorFlow as my main framework. It is a great framework and contains many built-in functions to ease the implementation. However, when I trained my model, it was too slow. It took about 7 seconds to train a batch containing 10 documents. Considering that my dataset contains about 150,000 documents, it would take around 29 hours to train all documents per epoch, which is way too slow. Generally it took more than 10 epochs for the model to converge, so I had to figure out how to resolve this issue. Beside optimizing the neural network, a preferred option is to train my model on GPU to take advantage of the fast matrix computation.

Unfortunately, the TensorFlow package installed using pip on the supercluster at my school did not support GPU. The reason is because it requires both CUDA 7.5 and CuDNN to be installed, which they do not support on the server. They …

[Read more]
Resolve issue "No Qt bindings could be found" on Git-cola (OSX)

I am using OSX and I wanted to install git-cola for manage my Git projects. Unfortunately, after installing python using brew, I could not run it. When typing git cola to terminal, I kept getting the following error message:

Traceback (most recent call last):
  File "/usr/local/bin/git-cola", line 53, in <module>
    from cola.main import main
  File "/usr/local/Cellar/git-cola/2.8/share/git-cola/lib/cola/", line 9, in <module>
    from .app import add_common_arguments
  File "/usr/local/Cellar/git-cola/2.8/share/git-cola/lib/cola/", line 32, in <module>
    from qtpy import QtCore
  File "/usr/local/Cellar/git-cola/2.8/share/git-cola/lib/qtpy/", line 125, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

As you can see from the above code, the error occurred when I was trying to run the …

[Read more]
Common DNS configuration issues

DNS is one of the most fundamental parts of a website. No website can run without a proper configuration on DNS. For beginners, it might be a bit difficult for them to understand and resolve DNS-related issues. This post aims to provide a bit more help for those who are still struggling to configure the DNS for their websites.

In short, what is DNS and why we need it?

DNS stands for Domain Name Service. You can think of it as a computer responsible for converting the domain name to an IP address. For example, if I type into my browser, the DNS will look into its database and return the IP address of this domain, which is Because of this, most of the issues about the domain name of your websites are related to DNS.

We need DNS because our human memory is limited and we cannot remember all complex and meaningless IP addresses of all websites in the world. It is just like …

[Read more]
MySQL QA Episode 3: How to use the debugging tool GDB

Welcome to MySQL QA Episode 3: “Debugging: GDB, Backtraces, Frames and Library Dependencies”

In this episode you’ll learn how to use debugging tool GDB. The following debugging topics are covered:

1. GDB Introduction
2. Backtrace, Stack trace
3. Frames
4. Commands & Logging
5. Variables
6. Library dependencies
7. c++filt
8. Handy references
– GDB Cheat sheet (page #2):
– From Crash to testcase:

Also expands on live debugging & more. In HD quality (set your player to 720p!)

The post MySQL QA Episode 3: How to use the debugging tool GDB appeared …

[Read more]
Showing entries 1 to 10 of 41
10 Older Entries »