mariadb-corporation / dev-example-todo Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
if you run the example app code with address sanatizer it shows that it leaks memory.
==451983==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x7fdb7d4f8f27 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
#1 0x7fdb7d3bbdd0 in sql::mariadb::SelectResultSet::create(sql::mariadb::Results*, sql::mariadb::Protocol*, sql::mariadb::capi::st_mysql*, bool) /home/buildbot/src/src/SelectResultSet.cpp:79
The issue is the result sets, eg this:
sql::ResultSet *res = stmnt->executeQuery("select * from tasks");
needs to be wrapped in a unique_ptr
to ensure it gets cleaned up at end of scope:
std::unique_ptr<sql::ResultSet> res(stmnt->executeQuery("select * from tasks"));
This applies to every result_set in the example app. ie every time stmnt->execute*()
is called
bug in example:
updateTaskStatus(conn, atoi(argv[2]), argv[3]);
passes a char*
as a bool
. as a result the task is always set to completed = true.
more correct would be
updateTaskStatus(conn, atoi(argv[2]), atoi(argv[3]));
node_modules are not ignored in the repo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.