MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

DatabaseLink problem with unsigned types

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55681] DatabaseLink problem with unsigned types
  • From: gdelfino at gmail.com
  • Date: Sun, 3 Apr 2005 05:50:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I have a table named "mma_test" in my mysql 4.1.9 server. The only
column in this table is named "id" and it is of UNSIGNED TINYINT type.

Now insert rows with id from 0 to 255

In = SQLInsert[conn, "mma_test", {"id"}, {#}] & /@ Range[0, 255];

Now lets fetch the data we just inserted:

In = Flatten@SQLExecute[conn, "SELECT * FROM mma_test", {}]

Out = {0, 1, 2, 3, 4, 5, (...) 122, 123, 124, 125, 126, 127,
-128, -127, -126, -125, (...) -5, -4, -3, -2, -1}

IMHO, Mathematica 5.1.1 is doing a sign conversion when it shouldn't. I
emailed technical support and ***they told me that this is the expected
behavior***. What do you all think? A bug or a feature? I think that
you should always get positive results from unsigned tables.

Regards,

Gustavo Delfino
Caracas, Venezuela


  • Prev by Date: Re: transpose
  • Next by Date: Re: Integrate with Assumption that a parameter is Integer?
  • Previous by thread: Re: Front End Memory usage while exporting many graphics
  • Next by thread: power series in more than one variables