MySQL Connector/C
2125
create your own class that inherits from
com.mysql.jdbc.util.BaseBugReport
and override the
methods
setUp()
,
tearDown()
and
runTest()
.
In the
setUp()
method, create code that creates your tables, and populates them with any data
needed to demonstrate the bug.
In the
runTest()
method, create code that demonstrates the bug using the tables and data you
created in the
setUp
method.
In the
tearDown()
method, drop any tables you created in the
setUp()
method.
In any of the above three methods, use one of the variants of the
getConnection()
method to create
a JDBC connection to MySQL:
•
getConnection()
- Provides a connection to the JDBC URL specified in
getUrl()
. If a
connection already exists, that connection is returned, otherwise a new connection is created.
•
getNewConnection()
- Use this if you need to get a new connection for your bug report (that is,
there is more than one connection involved).
•
getConnection(String url)
- Returns a connection using the given URL.
•
getConnection(String url, Properties props)
- Returns a connection using the given
URL and properties.
If you need to use a JDBC URL that is different from 'jdbc:mysql:///test', override the method
getUrl()
as well.
Use the
assertTrue(boolean expression)
and
assertTrue(String failureMessage,
boolean expression)
methods to create conditions that must be met in your testcase
demonstrating the behavior you are expecting (vs. the behavior you are observing, which is why you
are most likely filing a bug report).
Finally, create a
main()
method that creates a new instance of your testcase, and calls the
run
method:
public static void main(String[] args) throws Exception {
new MyBugReport().run();
}
Once you have finished your testcase, and have verified that it demonstrates the bug you are reporting,
upload it with your bug report to
http://bugs.mysql.com/
.
20.4. MySQL Connector/C
MySQL Connector/C is a client library that implements the C API for client/server communication. It is
a standalone replacement for the MySQL client library shipped with MySQL Server distributions. See
Section 20.6.1, “MySQL C API Implementations”
.
Reasons to use MySQL Connector/C:
• If you need only the client library, MySQL Connector/C provides everything required. There is no
need to compile or install the MySQL Server package, which is much larger.
• MySQL Connector/C does not rely on the MySQL Server release cycle, so bug fixes and new
features can be distributed independently of MySQL Server releases.
For documentation of the C API implemented by MySQL Connector/C, see
Section 20.6, “MySQL C
API”
.
For release notes detailing the changes in each release of MySQL Connector/C, see
MySQL
Connector/C Release Notes
.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...