Skip to content

Commit

Permalink
Merge tag 'v1.0-2'
Browse files Browse the repository at this point in the history
Initial release, compliant to the DBI specification.

- Test almost all test cases of the DBI specification.
- Fully support parametrized queries (#22, #27, #39).
- Queries not supported by the prepared statement protocol still can be run via `dbExecute()` or `dbSendStatement()`, the function `mariadbExecQuery()` has been removed (#28).
- Spec-compliant transactions (#38, #49).
- 64-bit integers are now supported through the `bit64` package. Unfortunately, this also means that numeric literals (as in `SELECT 1`) are returned as 64-bit integers (#12).
- Correct handling of DATETIME and TIME columns (#52, @noahwilliamsson). Support timestamp values with sub-second precision on output, and with year beyond 2038 (#56).
- The connection now uses the "utf8mb4" charset by default (#7).
- New default `row.names = FALSE`.
- New SSL-related arguments to `dbConnect()`: `ssl.key`, `ssl.cert`, `ssl.ca`, `ssl.capath`, `ssl.cipher` (#131, #148, @adamchainz).
- CI for Linux, Windows, and OS X (#25).
- Support for Connector/C from both MariaDB and MySQL.
  • Loading branch information
krlmlr committed Oct 4, 2017
2 parents f78c5be + 724550b commit 5238273
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ R\/tags$
src\/Makefile$
src\/Makevars$
src\/.*\.o$
src\/.*\.h.gch$
src\/.*.so$
src\/.*.a$
src\/tags
Expand All @@ -22,7 +23,6 @@ src\/RCS
^windows$
^homebrew$
^a\.out\.dSYM$
^NEWS\.md$
^revdep$
^appveyor\.yml$
^src/.*\.d$
Expand Down
13 changes: 5 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RMariaDB
Version: 0.11-9
Title: Database Interface and MariaDB Driver for R
Version: 1.0-2
Title: Database Interface and 'MariaDB' Driver
Encoding: UTF-8
Description: Implements DBI-compliant Interface to MariaDB and MySQL Databases.
Description: Implements a 'DBI'-compliant interface to 'MariaDB' (<https://mariadb.org/>) and 'MySQL' (<https://www.mysql.com/>) databases.
Authors@R: c(
person("Kirill", "Müller", email = "krlmlr+r@mailbox.org", role = c("aut", "cre")),
person("Jeroen", "Ooms", role = "aut"),
Expand All @@ -16,17 +16,14 @@ Depends:
R (>= 2.8.0)
Imports:
bit64,
DBI (>= 0.7-12),
DBI,
hms,
methods,
Rcpp (>= 0.12.4)
Suggests:
DBItest (>= 1.5-21),
DBItest,
rprojroot,
testthat
Remotes:
rstats-db/DBI,
rstats-db/DBItest
LinkingTo: Rcpp, BH, plogr
License: GPL-2
URL: https://github.com/rstats-db/RMariaDB,
Expand Down
75 changes: 8 additions & 67 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,18 @@
## RMariaDB 0.11-9 (2017-10-01)
# RMariaDB 1.0-2 (2017-10-01)

- Test almost all test cases of the DBI specification.
- Queries not supported by the prepared statement protocol can now be run via `dbExecute()` or `dbSendStatement()`, the function `mariadbExecQuery()` has been removed (#28).
- Avoid storing all results on the client due to instability with large datasets (#60, #61).


## RMariaDB 0.11-8 (2017-09-24)

- CI for Windows and OS X (#25).
- The entire result set is now buffered on the client, this is required when linking against MariaDB's Connector/C (#53).
- Fix segfault that occurs when passing wrong connection parameters.
- Avoid including `mysql_version.h` because it's missing on Fedora.
- Add workaround against undefined macros in Connector/C.


## RMariaDB 0.11-7 (2017-09-24)
Initial release, compliant to the DBI specification.

- Improve documentation for location of option files, with reference (#18).
- Test almost all test cases of the DBI specification.
- Fully support parametrized queries (#22, #27, #39).
- Use snake_case in C++ code.
- Make transactions compliant to the spec (#38, #49).
- Queries not supported by the prepared statement protocol still can be run via `dbExecute()` or `dbSendStatement()`, the function `mariadbExecQuery()` has been removed (#28).
- Spec-compliant transactions (#38, #49).
- 64-bit integers are now supported through the `bit64` package. Unfortunately, this also means that numeric literals (as in `SELECT 1`) are returned as 64-bit integers (#12).
- Support timestamp values with sub-second precision on output.
- Correct handling of DATETIME and TIME columns (#52, @noahwilliamsson). Support timestamp values with sub-second precision on output, and with year beyond 2038 (#56).
- The connection now uses the "utf8mb4" charset by default (#7).
- The `port` and `client.flag` arguments to `dbConnect()` are coerced to integer (#4).
- Date values with the year beyond 2038 are supported (#56).
- Improve DBI compliance (#1, #5, #10, #15, #17, #40).
- Correct handling of DATETIME and TIME columns (#52, @noahwilliamsson).


## RMariaDB 0.11-6 (2017-08-07)

- Move implementations to `.cpp` files.
- Code compiles without pedantic, extra, and conversion warnings (minus `mysql.h`).
- Rcpp handles registration of native routines.
- Formatting code with astyle.
- Pass or skip all DBItest tests.
- Fix CI tests on Linux and Windows, disable tests on OS X.
- New default `row.names = FALSE`.


## RMariaDB 0.11-5 (2016-12-29)

- Add package-level documentation (#159, @Ironholds).
- The `host` and `db` slots of the `MariaDBConnection` object now contain actual host and database names, even if they were retrieved from a configuration file (#127, @peternowee).
- Fix typos in the documentation of `dbConnect()` (#175, @mcol).


## RMariaDB 0.11-4 (2016-12-29)

- Adapt to `DBItest` changes.
- Fix compiler warnings.
- Improve compatibility with different versions of `libmysql`.


# RMariaDB 0.11-3 (2016-06-08)

- Fix failing compilation on Linux if a function is declared elsewhere.
- More robust check for numeric `NA` values.
- New SSL-related arguments to `dbConnect()`: `ssl.key`, `ssl.cert`, `ssl.ca`, `ssl.capath`, `ssl.cipher` (#131, #148, @adamchainz).
- Add `TAGS` file to .gitignore (@sambrightman, #78).
- Can build with MariaDB libraries on Ubuntu (#145).
- Use new `sqlRownamesToColumn()` and `sqlColumnToRownames()` (rstats-db/DBI#91).
- Use `const&` for `Rcpp::Nullable` (@peternowee, #129).
- Use container-based builds on Travis (#143).


# RMariaDB 0.11-2 (2016-03-29)

- Use the `DBItest` package for testing (#100).
- CI for Linux, Windows, and OS X (#25).
- Support for Connector/C from both MariaDB and MySQL.


# RMariaDB 0.11-1 (2016-03-24)
Expand Down Expand Up @@ -121,6 +65,3 @@
* Backport build system improvements from stable branch

* Reenable Travis-CI, switch to R Travis, collect coverage


# Version 0.10.1 and older: See RMySQL
2 changes: 1 addition & 1 deletion R/query.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NULL
#' @param params A list of query parameters to be substituted into
#' a parameterised query.
#' @param statement a character vector of length one specifying the SQL
#' statement that should be executed. Only a single SQL statment should be
#' statement that should be executed. Only a single SQL statement should be
#' provided.
#' @param ... Unused. Needed for compatibility with generic.
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NULL
#' @param check.names If `TRUE`, the default, column names will be
#' converted to valid R identifiers.
#' @inheritParams DBI::sqlRownamesToColumn
#' @param ... Unused, needed for compatiblity with generic.
#' @param ... Unused, needed for compatibility with generic.
#' @examples
#' if (mariadbHasDefault()) {
#' con <- dbConnect(RMariaDB::MariaDB(), dbname = "test")
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
RMariaDB
======

NOTE: This package is a drop-in replacement for the old [RMySQL](https://cran.r-project.org/web/packages/RMySQL/index.html) package.
NOTE: This package is a drop-in replacement for the old [RMySQL](https://cran.r-project.org/package=RMariaDB) package.

> Database Interface and MariaDB Driver for R
[![Build Status](https://travis-ci.org/rstats-db/RMariaDB.svg)](https://travis-ci.org/rstats-db/RMariaDB)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/rstats-db/RMariaDB?branch=master&svg=true)](https://ci.appveyor.com/project/rstats-db/RMariaDB?branch=master)
[![Coverage Status](https://codecov.io/github/rstats-db/RMariaDB/coverage.svg)](https://codecov.io/github/rstats-db/RMariaDB)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/RMariaDB)](http://cran.r-project.org/package=RMariaDB)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/RMariaDB)](http://cran.r-project.org/web/packages/RMariaDB/index.html)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/RMariaDB)](https://cran.r-project.org/package=RMariaDB)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/RMariaDB)](https://cran.r-project.org/package=RMariaDB)

RMariaDB is a database interface and MariaDB driver for R. This version is aimed at full compliance with the [DBI specification](https://cran.r-project.org/web/packages/DBI/vignettes/spec.html).
RMariaDB is a database interface and MariaDB driver for R. This version is aimed at full compliance with the [DBI specification](https://cran.r-project.org/package=DBI/vignettes/spec.html).

## Hello World

Expand Down Expand Up @@ -129,4 +129,4 @@ password=

## Acknowledgements

Many thanks to Christoph M. Friedrich, John Heuer, Kurt Hornik, Torsten Hothorn, Saikat Debroy, Matthew Kelly, Brian D. Ripley, Mikhail Kondrin, Jake Luciani, Jens Nieschulze, Deepayan Sarkar, Louis Springer, Duncan Temple Lang, Luis Torgo, Arend P. van der Veen, Felix Weninger, J. T. Lindgren, Crespin Miller, and Michal Okonlewski, Seth Falcon and Paul Gilbert for comments, suggestions, bug reports, and patches to the original [RMySQL](https://cran.r-project.org/web/packages/RMySQL/index.html) package, and to all [contributors](https://github.com/rstats-db/RMariaDB/graphs/contributors) to this package.
Many thanks to Christoph M. Friedrich, John Heuer, Kurt Hornik, Torsten Hothorn, Saikat Debroy, Matthew Kelly, Brian D. Ripley, Mikhail Kondrin, Jake Luciani, Jens Nieschulze, Deepayan Sarkar, Louis Springer, Duncan Temple Lang, Luis Torgo, Arend P. van der Veen, Felix Weninger, J. T. Lindgren, Crespin Miller, and Michal Okonlewski, Seth Falcon and Paul Gilbert for comments, suggestions, bug reports, and patches to the original [RMySQL](https://cran.r-project.org/package=RMySQL) package, and to all contributors (of [code](https://github.com/rstats-db/RMariaDB/graphs/contributors) and discussions) to this package.
6 changes: 5 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
Update that only changes the package title and package description in the DESCRIPTION.

## Test environments
* local OS X install, R 3.4.1
* ubuntu 12.04 (on travis-ci), R 3.4.1
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note
0 errors | 0 warnings | 2 notes

* This is a new release.

* Package links statically with libmariadb or libmysql, hence the size.

## Reverse dependencies

This is a new release, so there are no reverse dependencies.
4 changes: 2 additions & 2 deletions man/RMariaDB-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mariadb-tables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PKG_CPPFLAGS= -I../windows/libmariadbclient-2.3.3/include/mariadb
PKG_LIBS= -L../windows/libmariadbclient-2.3.3/lib${R_ARCH} \
-lmariadbclient -lssl -lcrypto -lgdi32 -lz -lws2_32 win32/timegm.o -pthread
CXX_STD=CXX11

$(SHLIB): win32/timegm.o

Expand Down
6 changes: 5 additions & 1 deletion src/MariaBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
#include <math.h>
#include "MariaBinding.h"

MariaBinding::MariaBinding() : p(0), i(0), n_rows(0) {
MariaBinding::MariaBinding() :
statement(NULL),
p(0),
i(0),
n_rows(0) {
}

MariaBinding::~MariaBinding() {
Expand Down
2 changes: 2 additions & 0 deletions src/MariaResultPrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ MariaResultPrep::MariaResultPrep(MariaConnectionPtr conn) :
pSpec_(NULL),
rowsAffected_(0),
rowsFetched_(0),
nCols_(0),
nParams_(0),
bound_(false),
complete_(false)
{
Expand Down
5 changes: 4 additions & 1 deletion src/MariaRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
#include "integer64.h"


MariaRow::MariaRow() {
MariaRow::MariaRow() :
pStatement_(NULL),
n_(0)
{
}

MariaRow::~MariaRow() {
Expand Down
4 changes: 2 additions & 2 deletions src/win32/timegm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@



#if defined(WIN32) && !defined(_WIN64)

#include <time.h>

#if defined(WIN32) && !defined(_WIN64)

static int
is_leap(unsigned y) {
y += 1900;
Expand Down

0 comments on commit 5238273

Please sign in to comment.