FAQ
Dear Tim Bunce,

Hi, I think I found a real bad bug in the DBI module version 1.58 to 1.601 and ActivePerl 5.8.8 when trying to "bind" values to question marks inside an SQL statement.

First I'd like you to note that this is failing under DBI v1.58 to v1.60 under ActivePerl v5.8.8 running under Windows XP. However, the exact same SQL code works just fine under DBI v1.48 and ActivePerl 5.6.1 running under Windows 98. The test hardware is set up for dual-boot to both operating systems on the same system. The database software is MySQL v4.1.22 and the exact same MySQL software and database files are used under both Windows 98 and Windows XP.

Here is the list of SQL statements that were processed by DBI v1.601 and this is what they produced: Each SQL statement is color coded for readability, and the error is bolded to make it obvious. The value '00000120' should not be where it is in the UPDATE statement, in fact, that should be a question mark. The question mark that was supposed to be changed is in the WHERE clause and note it is still a question mark. The wrong question mark got converted.

Please let me know when this gets fixed, as it is causing all sorts of problems with my database processing. I'll even be glad to beta test it for you personally.

SELECT id,keyphrase,keywords,title,content,introduction,conclusion,resourcebox,snippet,author,submitdates,submiturls,type,class,status,folder FROM articles WHERE id = '00000120'
LOCK TABLES articles WRITE
SELECT content,id,title,datelastupdated FROM articles WHERE id = '00000120'
UPDATE articles SET content='Getting proper sleep every night is essential to leading a healthy and productive life. You won\'t be tired and lethargic the next day. Can you believe that sleep helps you lose weight'00000120' People who get a full night\'s rest lose more than people who don\'t because of two hormones the body produces. Leptin is a hormone that sends a signal to your brain to tell you that you are full. The hormone gets produced while you are sleeping. The less sleep you get, the less leptin is produced. Ghrelin, another hormone, is higher in people that do not get enough sleep. This hormone tells you that you are hungry. If you are not getting enough sleep, both of these hormones work against you. Your body keeps telling you it is hungry and neglects to tell you it is full.\r\nSleep can help you be more creative. Scientists have found that you are more creative with a good night\'s sleep. People who got enough sleep at night were able to come up with more creative ways to answer questions and solve problems.\r\nSleep helps memory. How many of us stayed up all night studying for a test, thinking we were doing ourselves a favor? Recent studies have shown, however, that it actually hurts you. When you sleep at night, you remember the things you learned or saw that day. By skipping sleep, or not getting enough sleep at night, your body does not have the time to process everything and make sure you remember everything.\r\nSleep helps you look better. We have all heard the expression about women needing their beauty sleep. Believe it or not, there is some truth to it. Sleep really does help body health. By getting enough sleep, the correct hormones are released in the proper amounts to help you both inside and out. Skin tissue also revives during the night. When you get a good night\'s sleep, you really do look better in the morning.\r\nThere are many benefits to getting enough sleep every night. If you find yourself staying up late every night to play a game, watch some TV, or surf the web, you might want to think about what you\'re losing out on. All you have to do is change your schedule a little bit to make sure you get enough sleep for your body. Your body will reward you.',title='Benefits Of Getting A Good Night Sleep',datelastupdated='1197357192' WHERE id = ?
UNLOCK TABLES

Thanks!
Thomas Straub
tom@bignm.com

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedDec 11, '07 at 11:20a
activeDec 11, '07 at 11:20a
posts1
users1
websitedbi.perl.org

1 user in discussion

Thomas Straub: 1 post

People

Translate

site design / logo © 2022 Grokbase