What was wrong with the answers on those two questions? They were 100% accurate, so I'm not sure what more we can do to help you here.
I would suggest that you confirm that you never assume that you're in a transaction. Always check to make sure you are. In TSQL it would be as simple as checking @@TRANCOUNT to be greater than 0. That's rather the same as any threaded situation where you want to check mutexes. What happens if you do it with a stored procedure? It kills the stored procedure, yes? Because SPs are intended to be atomic. What you're demonstrating has nothing to do with atomicity.
To be clear, this behavior is by design! Don't run atomic transactions by hand in the console, put them in a program so if the connection goes away it's gone. This is not something that you can "just hope works right".
If you have something that must be ACID, you must put it in a container that can be made ACID. This means a stored procedure or the like.
1) GUI option
You can use Toad for MySQL Freeware from here.
To take an export that creates inserts for a specified set of data, after creating a connection to your mysql database, you can choose Tools->Export->Export Wizard
Click Next, then Add Button
Choose query as the Export category and then type your SQL statement for one of the tables
SELECT col1, col2 ...
FROM table_name
WHERE tool_id='xyz'
Then Click next - choose SQL SCRIPT any other relevant options
Choose file as the output
Repeat this for as many tables as required
Then execute it to create a set of insert scripts.
You can take a structure export either using TOAD or phpmyadmin and the combination should give you what you are looking for which i assume is a cut down set of data for a test environment.
2) Command line option
Use mysqldump at the command line and list all tables that have the tool_id column
mysqldump -t -u [username] -p test mytable anothertable --where="tool_id = 1"
This should generate a set of insert statements and as above, if you load these scripts into an empty schema exported with phpmyadmin using structure only, it should give you what you need.
Best Answer
If on Linux you can just use
ldd
to check which libraries it's dynamically linked against:In this example on my host, it's linked against
libreadline
.It's also in the
--help
output: