Git Product home page Git Product logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Reproducible in r143

==== Running RPostgreSQL/tests/dbtemptable.R
Loading required package: RPostgreSQL
Loading required package: DBI
row number 0 is out of range 0..-1

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: .Call("RS_PostgreSQL_exec", conId, statement, PACKAGE = .PostgreSQLPkgName)
 2: postgresqlExecStatement(conn, statement, ...)
 3: is(object, Cl)
 4: is(object, Cl)
 5: .valueClassTest(standardGeneric("dbSendQuery"), "DBIResult",     "dbSendQuery")
 6: dbSendQuery(con, "CREATE TEMPORARY TABLE xyz ON COMMIT DROP AS select * from foo limit 1; select * from xyz;")
aborting ...
check_with_vars.sh: line 42:  5871 Segmentation fault      R --slave < $f

A test script and a patch against r143 is attached.

The segmentation fault is caused by accessing the query result without
checking the existence of result.
A check for the number of tuples obtained is added.

The expected results is
==== Running RPostgreSQL/tests/dbtemptable.R
Loading required package: RPostgreSQL
Loading required package: DBI
  name
1  bar
PASS -- ended without segmentation fault


Original comment by [email protected] on 24 Sep 2010 at 11:52

Attachments:

from rpostgresql.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Further thinking on the context of the location, the code is trying to identify 
if the column is set to NOT NULL or NULL value is allowed.  However, the NOT 
NULL enforcement is done by the server side and the necessity or even utility 
in the client side is questionable.

Perhaps, this is better discussed in [email protected], since this is 
related to DBI interface as a whole, including other drivers and usage.

I actually think these could be useful in a result for dbReadTable() call,
but not for general dbSendQuery or dbGetQuery results where the SQL is visible 
and the queried target may not represent a simple table.


Original comment by [email protected] on 25 Sep 2010 at 2:30

Attachments:

from rpostgresql.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Reassigned owner.

Original comment by [email protected] on 13 Oct 2010 at 2:18

  • Changed state: Started

from rpostgresql.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Fixed as of r160, r162.

Original comment by [email protected] on 14 Oct 2010 at 2:41

  • Changed state: Fixed

from rpostgresql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.