CF7 CFUPDATE BUG

Ok, first off I know I'm going to hear people say use CFQuery
to do the update. - this isn't a choice for this application, as
this is legacy code.
Here's the problem, we have a form that has this data in it
(sorry for the crappy layout, I'm cutting and pasting the FORM
cfdump results):
struct
ALLOW_FEATURE 1
COMMENTS [empty string]
DEPT_ID 1006,1034,1016
FIELDNAMES
PRODUCT_ID,PRODUCT_NAME,SKU,MANUFACTURER,PRODUCT_DESCRIPTION,COMMENTS,TICKET_TYPE,STATUS_ FLAG,ALLOW_FEATURE,SHOW_DT,IS_GIFTCERT,TAX_FLAG,SHIP_CATEGORY,SALE_PRICE,RETAIL_PRICE,HAND LE_COST,DEPT_ID,DEPT_ID,DEPT_ID,IMAGE_NAME,UPDATE_BUTTON
HANDLE_COST 0.00
IMAGE_NAME [empty string]
IS_GIFTCERT N
MANUFACTURER [empty string]
PRODUCT_DESCRIPTION #NI317 Poly filled jacket for cold
weather.
PRODUCT_ID 18930
PRODUCT_NAME Poly Fill Jacket
RETAIL_PRICE 0.00
SALE_PRICE 64.88
SHIP_CATEGORY T
SHOW_DT [empty string]
SKU 6F170
STATUS_FLAG Y
TAX_FLAG Y
TICKET_TYPE 0
UPDATE_BUTTON Update Product
Now, on the action page, we have a bunch of things going on
using other aspects of that data that I won't bore you with, but
when we go to update using CFUPDATE using the following chunk of
code:
<cfupdate tablename="sto_product" datasource="#sto_dsn#"
formfields="sku,product_name,product_description,comments,status_flag,allow_feature,tax_f lag,manufacturer,sale_price,retail_price,weight,dimensions,handle_cost,shipping_flag,stock _qty,store_id,ticket_type,is_giftcert,tax_flag,ship_category">
We get this error (I've replaced the real path with
"xxxxxxxxxxx"):
Error Occurred While Processing Request
The given fieldname "DEPT_ID" could not be found in the table
"sto_product".
The error occurred in
D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 99
Called from D:\Inetpub\xxxxxxxxxxxt\edit_product.cfm: line 94
Called from D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 54
Called from D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 1
98 :
99 : <cfupdate tablename="sto_product"
datasource="#sto_dsn#"
formfields="sku,product_name,product_description,comments,status_flag,allow_feature,tax_f lag,manufacturer,sale_price,retail_price,weight,dimensions,handle_cost,shipping_flag,stock _qty,store_id,ticket_type,is_giftcert,tax_flag,ship_category">
Now if you notice, DEPT_ID isn't
ANYWHERE in the formfields declaration. For some reason
CFUPDATE is trying to use that field even though I am giving it a
list of fields to use. Also, I've noticed that if you have spaces
after each field name (before or after the comma) CFUPDATE craps
out as well. Since this works in CFMX6.1 with all the hotfixes in
place, it seems Cf 7 has a bug with CFUPDATE.
Has anyone else run into this problem at all?

I'm having the same problem. CF 7.02 running on Windows 2003
Server.

Similar Messages

  • Problem with CFUPDATE porting from CF4 to CF7

    Hi, I am porting a site from CF4.1 to CF7 and am getting the
    following error in the site.
    Error Occurred While Processing Request
    The given fieldname "STYLE" could not be found in the table
    "OBJECTS".
    The error occurred in doeditobject.cfm: line 19
    18 : <CFIF SITEADMINPERMS is True OR SECTIONADMINPERMS is
    True OR EDITPERMS is True>
    19 : <CFUPDATE DATASOURCE="#SITENAME#" TABLENAME="OBJECTS"
    FORMFIELDS="TEXT,TITLE,LINK">
    20 : <CFLOCATION
    URL="main.cfm?Action=editobject&SID=#Form.SID#&LID=#URL.LID#&EDITTYPE=#URL.EDITTYPE#">
    21 : <CFELSE>
    STYLE is not given as a fieldname so I don't understand where
    to start with this error.
    Any thoughts. I know that I have not provided a lot of
    information but I am not sure what is relevant to this error.
    The three form fields mentioned contain text. TEXT field
    contains HTML to be written to the database.
    Thanks in advance for any help.
    Sean.

    My guess is it has something to do with the HTML. There may
    be a <style> tage that is causing the problem.
    Any chance you can just write the insert statement?

  • Bug in CF7 built in time validation?

    I'm using cfform and cfinput on a textbox, this is what I'm
    using to recreate the error:
    If I enter a time between 20:00 and 20:59 I get an error,
    otherwise as far as I can tell any other time validates.
    This error does not happen on our CF6 boxes, just CF7.

    thebuddhist -
    The problem you are having is a result of a coding error in
    the cfform.js file and the
    other problem that Dan is indicating, is that a non-valid
    time like 20:63 can be entered
    and it will process as a valid time.
    ================================
    cfform.js - CFIDE folder - able to change
    ================================
    If you have the ability to change the cfform.js file on the
    server then try this:
    on or about line 492, you will find some code like below,
    change the [1-4]
    to [0-3]
    var result = _CF_checkregex(object_value,
    /^(([0-1]?[0-9]|[2][1-4]) :
    ([0-5]?[0-9])(:[0-5]?[0-9])?).?([AP]M|[AP]m|[ap]m|[ap]M)?$/,
    required);
    return result;
    ===> Change to below:
    var result = _CF_checkregex(object_value,
    /^(([0-1]?[0-9]|[2][0-3]) :
    ([0-5]?[0-9])(:[0-5]?[0-9])?).?([AP]M|[AP]m|[ap]m|[ap]M)?$/,
    required);
    return result;
    and all should work fine.
    ===================================
    cfform.js - CFIDE folder - not able to change
    ===================================
    If this is located at a hosting service and they will not
    change the cfform.js
    to the above, then copy your cfform.js to the same folder as
    the form is in
    of course with the change made.
    Then on the cfform tag, add the following attribute:
    scriptsrc="."
    Mine is like below:
    <cfform action="formname.cfm" method="post"
    enctype="multipart/form-data" scriptsrc=".">
    This should then call the cfform.js file within the folder
    for processing the time elements.
    =====================================================================
    As for the other problem, this is what I did to work around
    it:
    On the action page I added this coding:
    <cfset MidNight_A =
    DateAdd("h",1,CreateTime(23,00,00))>
    <cfset MidNight_B =
    DateAdd("h",0,CreateTime(00,00,00))>
    <cfif #form.StartTime lt #MidNight_A# AND
    #form.StartTime# gt #MidNight_B# AND
    #form.StopTime# lt #MidNight_A# AND
    #Form.StopTime# gt #MidNight_B#>
    process time fields
    <cfelse>
    Valid times were not entered.
    </cfif>
    This may not be the best practice / prettiest way to work
    around the non-valid
    time format. However, it seems to function fine for me (so
    far). I am certainly
    open to suggestions of a better way to accomplish the task if
    there is one.
    Leonard B

  • CF8 cfinsert / cfupdate Error

    OS: Windows Server 2003
    CF: CF8 Enterprise 8.0.1
    DB: 10g
    There are two problems:
    ** NOTE: NEITHER OF THE TWO ERRORS BELOW HAPPEN IN COLDFUSION
    7, ONLY IN VERSION 8. **
    (1) Inserting new database records using cfinsert.
    For certain tables, when attempting to insert a new record
    using cfinsert, the following error is displayed:
    [Macromedia][Oracle JDBC Driver]Internal error: Net8 protocol
    error.
    This only happens some database tables and not on others
    (most seem to work, only a couple do not). The basic configuration
    of all the tables tested is the same (a primary key exists). The
    table is being referred to in all upper-case in the cfinsert tag,
    as is required for an Oracle DB. Using an insert inside a cfquery
    tag works fine. Also, deleting all data out of the table allows one
    cfinsert to work correctly, with subsequent attempts causing the
    error.
    (2) Updating an existing database record using cfupdate.
    For certain tables, when attempting to update an existing
    record cfupdate, the following error is displayed:
    An error occurred during the update process. Error code: The
    primary key for the IRCCO table was not found in the '' datasource.
    /// Ensure that the table name is in the format that the database
    server expects. (For example. Oracle Server table name must be
    uppercase or the server table name must be qualified in the format
    "schema.table_name". For SQL Server, the format is
    "databasename.username.tablename", for example,
    customers.dbo.orders)
    This only happens on some database tables and not on others
    with a similar configuration (the same tables with the cfinsert
    problem). The tables associated with the error do in fact have a
    primary key, so I'm not sure why the error above indicates
    otherwise. Using and update inside a cfquery tag seems to work
    fine.
    (I have a tech-support case, 0180152620, open for these
    issues right now. I just wanted to see if anyone else out there had
    seen this problem and perhaps fixed it.)

    That may be true, but the cfinsert/cfupdate tags afford us
    the opportunity to do some framework-level automation across
    multiple "modules" in our product. I suppose we could write our own
    tags/code to do the dynamic-SQL ourselves (we've actually written
    our own pre-processor tag for cfquery), but it would be great if
    the cfinsert/cfupdate tags just worked as well as they do in CF7
    now. (It would also seem to obviate what would seem to be a primary
    reason for using CF in first place.)

  • What are the recommended steps to upgrade from CF7 to CF8

    I have read all of the documentation for how to upgrade from
    CF 7.02 to CF 8. Well there is actually only one blurb in all of
    the CF docs.
    "Upgrade installation You can upgrade from ColdFusion MX,
    ColdFusion MX 6.1, and ColdFusion MX 7. When upgrading from
    ColdFusion MX, ColdFusion MX 6.1, or ColdFusion MX 7, the installer
    preserves the existing settings and installs in a new directory,
    automatically assigning ports that do not conflict with the
    existing installation."
    OK that sounds simple enough, so i went ahead and installed
    it. Well it did not work, now I am stuck somewhere between 7 and 8.
    My basic step, as I can best recall at 1:00AM.
    * Select Multi server Configuration
    * Select install path, I used D:\JRun4
    * This is where my existing cf7 install was located
    * installer told me port 8300 was being used so it gave me
    port 8306 instead
    * Selected d: for ColdFusion8DotNetService install path
    * Select Passwords for admin and rds
    * installed cf
    * received error after install
    (Adobe_ColdFusion_8_InstallLog.log)
    ANT Script Error:
    Status: ERROR
    Additional Notes: ERROR - jrun.xmlUnable to remove existing
    file D:\JRun4\bin\jrun.exe
    * rebooted
    * can't login to cfadmin at port 8306
    * tried to login to cfadmin at port 8300, everythin works
    * it appears the cf7 services are still running,
    * didn't notice any new cf8 services, excpet the dotnet
    stuff
    Any assistance would be appriciated.
    I am on windows 2003/CF8EE/Multiserver configuration

    A_B wrote:
    > I have not seen anything come out from Adobe on this
    subject but I did talk to
    > two of the CF engineers at the Max Conference regarding
    this issue. I spoke
    > with Dean Harmon and Tom Jordahl about this issue. Here
    are the basic take
    > aways from what I recall. I have not yet attempted this
    but will be sometime
    > in the next month or two. There are a few options but
    basically JRUN is an
    > updated version with CF8 and there is a new JRE that it
    runs on
    Essentially CF comes with the updates that will become JRun 4
    Updater 7
    integrated into it. (The beta of Updater 7 is under way).
    > - Backup existing JRUN directory (c:\JRun4 or whatever)
    completely.
    > - Make a backup of all the existing CF settings via a
    CAR file in the CF admin.
    > - Do an uninstall of your CF7 installation. This goes
    against my better
    > judgement since you should not need to uninstall 7
    before installing 8 since
    > there should be an upgrade path. I understand that there
    are differences with
    > JRUN etc ... but this should be done via an install.
    > - Install CF8 and then restore your settings via the CAR
    file. If you are
    > crafty enough I believe you can also bring back all the
    XML files and set a
    > flag to let the CF admin to an upgrade.
    Use the CAR file, XML file formats have changed between
    versions.
    > I want to also note that this is for the multi-server
    install on top of JRUN
    > in which you already have JRUN installed with CF7. I'm
    surprised that Adobe
    > has not released better instructions on how to do this
    but they haven't and
    > they seem to have let us to try to figure this out which
    is completely wrong of
    > them. How hard is it to write up a tech article.
    What you are describing is a simultaneous update of JRun and
    CF. For
    just an update of CF you need to redeploy the CF EAR file as
    described
    in the JRun manual. For just an update of JRun you have to
    wait until
    updater 7 is released (or join the beta and file bugs if you
    don't like
    the procedure).
    > Another possible option would be to update JRUN with the
    latest release,
    The latest release is only updater 6.
    > download the latest JRE and create a custom jvm.config
    file to use for the new
    > JRE. Then you would create a new instance of JRUN using
    the JRUN console and
    > deploy a CF8 EAR/WAR file to it. You still then have the
    issue of getting
    > settings and things transferred.
    Use a CAR file for that.
    > This seems possible to do it this way but does not seem
    as clean at all.
    In place upgrades are never clean. In my book, an upgrade
    means
    rebuilding from scratch.
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • Is cfinsert and cfupdate open to SQL Injection

    Hello All,
    I'm looking for a real answer on if cfinsert and cfupdate are vulnerability to SQL Injection. The closest thing I can find from Adobe is Ben Forta's Personal recommendation. I was hoping to find some form of "official note" in the live docs to indicate there is a SQL Injection issue with cfinsert  - cfupdate. (Other than someone's post  to Ben's Blog)
    http://www.forta.com/blog/index.cfm/2006/10/3/Use-CFINSERT-And-CFUPDATE
    In this forum I have seen this question asked, and the only answer is "You should validate your inputs". Yes, you should, but that does not answer the question of if cfinsert and cfupdate is vulnerability to SQL Injection.
    I have found this blog entry that if I interpret is correctly from his findings cfinsert and cfupdate where only vulnerability to SQL Injection IF you did not give  cfinsert  - cfupdate the list of fields to take action on. -Is this true?
    http://blog.securityps.com/2009/05/demystifying-cfinsert-sql-injection.html
    Also, on a closely related note, is cfinsert  - cfupdate on ColdFusion 9 also vulnerable? If so, why? Seems like a BUG that could be easly addressed by the CF server team.
    Thank you,

    I do agree with you here.  But to be devil's advocate for a second: the same could be said of <cfquery>.  One has to take additional measures to ensure the same vulnerabilities are mitigated with that.
    I'm not sure that it's really news that these two tags are not the most well-thought-out features in the CF arsenal, and if you listen to most opinions in the community regarding <cfinsert> and <cfupdate>, it's: "don't use them".
    They're great for quick and dirty insert/update processes in internal or test code, but I'd never use them in production.
    It also remains a fact that any external input (form fields, URL param) must be validated as being kosher and within expected margins before they're used in any way.  That is just common sense.  And if one neglects to do that: one brings any eventuality onto one's self.  The problem here really is with people not doing their "due diligence" on externally sourced data, not specififcally with <cfinsert>, <cfupdate> or <cfquery>.
    Still: I think Adobe should make it more clear in the docs that additional measures need to be take to make them safe.  And by that time... one might as well use a <cfquery> to do the SQL.
    Adam

  • Possible Bug in Adminstrator - Verity Collections page

    Am running 7.0.2 Enterprise on Win2k in J2EE mode (Jrun
    updater6) and have been working on a cf5 to cfmx migration. HAd to
    delete all the migrated collections, and recreate and reindex
    everything, no big deal. Since this is done programatically, I
    ocassionally took a peek at the Verity page in the CF adminstrator
    to keep track of progress. We have over 200 collections indexing
    ~75,000 files on the server. Once all the indexing was completed,
    started testing the search on the site, and all worked as expected.
    BUT, when checking the verity Admin page, I cannot get a
    listing of the collections. Last view had about 90 collections
    showing (estimate). Am getting the "Unable to retrieve collections
    from the Search Service.
    Please verify that the ColdFusion MX Search Server is
    installed and running."
    I know it is running, because the search works, and I can add
    a doc to a folder and re-index and it gets picked up. Is there a
    limit to how many collections can be displayed in the Adminstrator.
    And on the same note, this code <cfcollection
    action="LIST" name="allcoll"> will throw a timeout error
    "com.verity.api.administration.ConfigurationException:
    java.io.IOException: Read timed out "
    which it did not do with less than 50 collections.
    Then, when deleting collections (using a cfdirectory to get
    the names from the directory since I cannot list them) I get this
    error
    "The collection you specified does not exists or is not
    registered with the ColdFusion Search Service." Thsi I know is
    wrong because I can search against it...
    I am fairly confident that the problem is related to the
    number of collections I have registered, but since I cannot delete
    them, I am kinda stuck.

    OK, so its not a bug. What it is is that verity on CF7 cannot
    list collections that were migrated from CF5. Once I recreated
    them, everything works fine. Deleting them was tough tough. I had
    to move the folders with the collection info out of thier location,
    then move them back in 10 at a time and run a cfcollection action =
    list and loop thru to cfcollection action = delete routine in order
    to clear them out. Once that was done and I recreated and
    re-indexed, everything is happy now.

  • Different CFCHART output in CF7 and CF9

    Hi,
    I'm testing CF9 (at the moment I'm on CF7) and I notice that the output of charts with multiple chartseries  in CF9 is wrong.
    The chart is displayed multiple times.
    See my code:
    <cfquery name="select_kp" >
    select  id,code, name
    from cdb_request_schedule_kp
    </cfquery>
    <cfquery name="select_qb_kp">
    select  a.krit_punkt_id, code, name,
      count(*) anzahl
    from  cdb_request_schedule a, cdb_request_schedule_kp b
    where    a.krit_punkt_id = b.id
    and     termin_ist between to_date('01.01.2009','dd.mm.yyyy') and to_date('31.12.2009','dd.mm.yyyy')
    group by krit_punkt_id, code,name
    </cfquery>
    <cfloop list="#valueList(select_kp.code)#" delimiters="," index="n">
       <cfquery name="select_qb_kp_#n#" dbtype="query">
       select krit_punkt_id,code,name,anzahl from select_qb_kp
       where code = '#n#'
       </cfquery>    
      </cfloop>
    <cfchart 
    chartwidth="600"
    chartheight="350"
    xaxistitle="critical point"
    yaxistitle="Number" 
    showborder="yes">
    <cfloop list="#valueList(select_kp.code)#" delimiters="," index="n">
    <cfchartseries
    type="bar"
    query="select_qb_kp_#n#" 
    itemcolumn="code"    
    valuecolumn="anzahl"
    serieslabel="#n#"/> 
    </cfloop>
    </cfchart> 
    Please see the attached file .
    Is it a bug in CF9 or what's wrong?
    best regards
    claudia

    Hi Keshav and jelena
    The exit got called ( EXIT_SAPLKAEP_001) but the structure CS_RECORD is not coming as fully filled and that is the reason why the values are not coming . Now I need to understand  why the structure  in background and foreground is coming different
    The code is simple written in the exit . In the following code BLART is not coming but when suppose I change the value of ZZACT_COST in debugging mode then also its coming 0 only  in the spool.
    Here are the following code
    IF CS_RECORD-VRGNG EQ L_C_KZPI.
    *Get Overhead cost
      CS_RECORD-ZZOVRHD_COST = CS_RECORD-WKGBTR.
    ELSE.
      IF CS_RECORD-BLART NE L_C_BLART_SW AND CS_RECORD-BLART NE L_C_BLART_SS
           AND CS_RECORD-BLART NE L_C_BLART_SZ AND CS_RECORD-WRTTP EQ L_C_WRTTP.
        IF CS_RECORD-KSTAR EQ L_C_KSTAR.
    *Get Actual Revenue
          CS_RECORD-ZZACT_REVENUE = CS_RECORD-WKGBTR.
        ELSEIF CS_RECORD-VRGNG NE L_C_KOAO.
    *Get Actual cost
          CS_RECORD-ZZACT_COST = CS_RECORD-WKGBTR.
          ENDIF.
      ENDIF.
    ENDIF.
    Please suggest somethng

  • Coldfusion 8 Bug or What?

    I don't know if this is a bug but am at a loss of words.
    Installed CF8 or CF7. The installer asked me to remove CF7 post
    installed.
    Removed CF7 from the Server as instructed. Well, the problems
    is CF8
    (CFIDE) folder overwrote the CF7
    (CFIDE) folder, as expected.
    But when I uninstalled CF7, it removed the CF8
    (CFIDE) folder; which was needed. So I am stuck without a
    CF8 administrator and I really hate to reinstall CF8 just for the
    (CFIDE) folder. Any suggestions?
    Nutshell, if upgrading to 8 from 7, please backup your
    (CFIDE) folder after you have installed 8. You will need the
    administrator
    ADOBE!

    i believe it is possible for cfide dir to be overwritten in
    the iis
    webroot if the new cf version is also associated with same
    iis during
    install...
    nevertheless, the new cf version's cfide folder should still
    be in the
    default install directory. with cf8 it is
    C:\ColdFusion8\wwwroot\CFIDE
    same goes for cfdocs folder, too...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • CFQUERY Bug in CF8

    I ran into a strange behavior which seems to be a bug in CF
    8. See the code below. Run the first query which includes an INSERT
    / SELECT statement followed by another SELECT. In CF 8 the variable
    query1 goes missing, but in CF 7, query1 is there.
    The second query which includes a regular INSERT followed by
    a SELECT works the same in CF 8 and CF7.
    Any ideas why this is happenning?

    It's not a bug. In short, you have to use SET NOCOUNT ON /
    OFF. See the response by Jochem van Dieten
    here
    > @@IDENTITY;
    You should be using SCOPE_IDENTITY()

  • DirectoryWatcher - bug & doc error

    I've set up a DirectoryWatcher event to monitor a shared
    directory on a network (CF7.01 Ent on Win2003 has full R/W/D
    permissions). I've noticed two quirks, possibly bugs or
    undocumented "features".
    1) The interval setting in the config file is ignored and the
    event is triggered the moment a new file is added. The
    documentation says the directory is only checked at the interval
    specified in the config file which defaults to 60000ms (60sec). I
    suspect this setting is for Unix flavours of CF only but can't find
    documentation to suggest that CF on Windows will ignore the
    interval setting.
    2) I'm only using the addFunction=onAdd event but this is
    called twice whenever a file is added. If 1 file is added it gets
    run twice, if 3 files are added it runs 6 times. I added some code
    within the onAdd function to log whenever it's executed and this
    confirms it's run twice when a new file is added. (New files are
    created by a different CF server on the network.)
    The documentation says to set the changeFunction and
    deleteFunction "to nothing" if you don't want them monitored, so I
    did. However, I have reason to believe the changeFunction is still
    executed despited the line "changeFunction=" without any value.
    I tried a test and disregarded the documentation and
    commented out the changeFunction and deleteFunction lines in the
    config file and hey presto, the "addFunction=onAdd" function is now
    executing just once per file!
    This suggests there is 1 bug and 1 documentation error. The
    bug is something like "changeFunction=" will actually execute the
    onAdd event (CF's wiring must be mixed up), hence a new file will
    execute onAdd twice. The documentation error is that "set to
    nothing if you don't want to see these events" should actually say
    "remove or comment out these lines if you don't want these events
    to be triggered".
    Gary.

    Hi Russ,
    same issue here (FM 11, Win7). I'm not sure, but in my opinion it's an error in the documentation. The values for ComponentType should be:
    Constants.FV_BK_FOLDER (0x2): Folder
    Constants.FV_BK_GROUP (0x40): Group
    Constants.FV_BK_FILE (0x200): File
    Additionally you could check the sort of file type via BookComponentFileType (FM, MIF, XML, Ditamap).
    In a short test script for traversing a hierarchical book the BookComponentFileType has some more values:
    Constants.FV_BK_FOLDER (0x2): Folder
    Constants.FV_BK_BOOK (0x4): Book (inside another book)
    Constants.FV_BK_FM (0x8): FrameMaker document
    Constants.FV_BK_MIF (0x10): MIF document
    Constants.FV_BK_XML (0x20): XML document (also Ditamap and Bookmap)
    Constants.FV_BK_GROUP (0x40): Group
    The main difference between ComponentType and BookComponentFileType seems to be the more detailed information about the file type.
    Best Regards, Andreas
    Message was edited by: justBE

  • Index with "or" clause (BUG still exists?)

    The change log for 2.3.10 mentions "Fixed a bug that caused incorrect query plans to be generated for predicates that used the "or" operator in conjunction with indexes [#15328]."
    But looks like the Bug still exists.
    I am listing the steps to-repro. Let me know if i have missed something (or if the bug needs to be fixed)
    DATA
    dbxml> openContainer test.dbxml
    dbxml> getDocuments
    2 documents found
    dbxml> print
    <node><value>a</value></node>
    <node><value>b</value></node>
    INDEX (just one string equality index on node "value")
    dbxml> listIndexes
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: node-element-equality-string for node {}:value
    2 indexes found.
    QUERY
    setVerbose 2 2
    preload test.dbxml
    query 'let $temp := fn:compare("test", "test") = 0
    let $results := for $i in collection("test.dbxml")
    where ($temp or $i/node[value = ("a")])
    return $i
    return <out>{$temp}{$results}</out>'
    When $temp is true i expected the result set to contain both the records, but that was not the case with the index. It works well when there is no index!
    Result WITH INDEX
    dbxml> print
    <out>true<node><value>a</value></node></out>
    Result WITHOUT INDEX
    dbxml> print
    <out>true<node><value>a</value></node><node><value>b</value></node></out>

    Hi Vijay,
    This is a completely different bug, relating to predicate expressions that do not examine nodes. Please try the following patch, to see if it fixes this bug for you:
    --- dbxml-2.3.10-original/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp     2007-04-18 10:05:24.000000000 +0100
    +++ dbxml-2.3.10/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp     2007-08-08 11:32:10.000000000 +0100
    @@ -1566,11 +1572,12 @@
         else if(name == Or::name) {
              UnionQP *unionOp = new (&memMgr_) UnionQP(&memMgr_);
    +          result.operation = unionOp;
              for(VectorOfASTNodes::iterator i = args.begin(); i != args.end(); ++i) {
                   PathResult ret = generate(*i, ids);
                   unionOp->addArg(ret.operation);
    +               if(ret.operation == 0) result.operation = 0;
    -          result.operation = unionOp;
         // These operators use the presence of the node arguments, not their valueJohn

  • Bug report follow-up

    is there a way to follow-up on a bug report that i submitted?  i have the bug number, but would like to see if the report was understood, filled out properly and determine the status of the bug report.
    thanks,
    doug

    They comment on bugs if actions were taken. Otherwise - don't expect any feedback.

  • Solaris8 and 9 (possibly 7) /dev/poll driver bug report.

    Hello,
    I'd like to report a bug in the solaris 8 and 9 /dev/poll driver (poll(7d)).
    As i do not have a support account with sun or anything like that, there
    seems to be no other way to do that here (which is of course a very sad
    thing).
    Bug details:
    The /dev/poll device provides an ioctl-request (DP_ISPOLLED) for checking
    if a particular filedescriptor is currently in the set of monitored
    filedescriptors for that particular /dev/poll fd set (open /dev/poll fd).
    A quote from the documentation of the poll(7d) manual page taken from
    Solaris9:
    "DP_ISPOLLED ioctl allows you to query if a file descriptor is already in
    the monitored set represented by fd. The fd field of the pollfd structure
    indicates the file descriptor of interest. The DP_ISPOLLED ioctl returns 1
    if the file descriptor is in the set. The events field contains the
    currently polled events. The revents field contains 0. The ioctl returns 0
    if the file descriptor is not in the set. The pollfd structure pointed by
    pfd is not modified. The ioctl returns a -1 if the call fails."
    It says that when you query for an filedescriptor which is currently being
    monitored in the set, that it would return 1, and change the events field of
    the pollfd structure to the events it's currently monitoring that fd for.
    The revents field would be set to zero.
    However the only thing which actually happens here, is that FD_ISPOLLED
    returns 1 when the fd is in the set and 0 if not. When the fd is in the
    set, when FD_ISPOLLED returns 1, the events field remains unmodified, but
    the revents field gets changed.
    A small sample code to illustrate:
    #include <stdio.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <sys/devpoll.h>
    main() {
    struct pollfd a;
    int dp_fd = open("/dev/poll", O_WRONLY);
    a.fd = 0; /* stdin */
    a.events = POLLIN; /* we monitor for readability, POLLIN=1 */
    a.revents = 0;
    write(dp_fd, &a, sizeof(a));
    a.fd = 0;
    a.events = 34; /* filled in with bogus number to show malfunctioning */
    a.revents = 0;
    printf("DP_ISPOLLED returns: %d\n", ioctl(dp_fd, DP_ISPOLLED, &a));
    printf("a.fd=%d, a.events=%hd, a.revents=%hd\n", a.fd, a.events,
    a.revents);
    According to the documentation of /dev/poll and namely DP_ISPOLLED this
    program is supposed to print the following:
    DP_ISPOLLED returns: 1
    a.fd=0, a.events=1, a.revents=0
    However it prints the following:
    DP_ISPOLLED returns: 1
    a.fd=0, a.events=34, a.revents=1
    You can take any number instead of '34' and it will simply remain untouched
    after the DP_ISPOLLED ioctl-request.
    I hope it's clear now that the solaris8 and solaris9 (and probably solaris7
    with /dev/poll patch too) DP_ISPOLLED implementation is broken.
    This bug is also easily illustrated by looking at the solaris8 kernel sourcecode:
    <snippet osnet_volume/usr/src/uts/common/io/devpoll.c:dpioctl()>
    case DP_ISPOLLED:
    pollfd_t pollfd;
    polldat_t *pdp;
    if (pollfd.fd < 0) {
    mutex_exit(&pcp->pc_lock);
    break;
    pdp = pcache_lookup_fd(pcp, pollfd.fd);
    if ((pdp != NULL) && (pdp->pd_fd == pollfd.fd) &&
    (pdp->pd_fp != NULL)) {
    pollfd.revents = pdp->pd_events;
    if (copyout(&pollfd, (caddr_t)arg,
    sizeof(pollfd_t))) {
    mutex_exit(&pcp->pc_lock);
    DP_REFRELE(dpep);
    return (set_errno(EFAULT));
    *rvalp = 1;
    </snippet>
    its' clearly visible that the code writes the current monitored events to
    the revents field:
    'pollfd.revents = pdp->pd_events;'
    and that it doesnt set revents to zero.
    It's funny to see that this has been like this since Solaris8 (possibly 7). That means nobody ever used DP_ISPOLLED that way or people were simply to lazy to file a bug report.
    Another funny thing related to this. is that Hewlett-Packard did seem to know about this. Since HP-UX11i version 1.6 they also support /dev/poll. From their manual page i ll quote some sentences from their WARNING session:
    "The ioctl(DP_ISPOLLED) system call also returns its result in the revents member of the pollfd structure, in order to be compatible with the implementation of the /dev/poll driver by some other vendors."
    Hopefully this will get fixed.
    I also like to reexpress my very negative feelings towards the fact that you're not able to file bug reports when you do not have a support contract. Ridiculous.
    Thanks,
    bighawk

    Have I mentioned how much i love my playbook now Great job on os 2.0

  • [bdb bug]repeatly open and close db may cause memory leak

    my test code is very simple :
    char *filename = "xxx.db";
    char *dbname = "xxx";
    for( ; ;)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    I try to run my test program for a long time opening and closing db repeatly, then use the PS command and find the RSS is increasing slowly:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 466 588 4999 980 0.3 -bash
    2615 pts/0 R 0:01 588 2 5141 2500 0.9 ./test
    after a few minutes:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 473 588 4999 976 0.3 -bash
    2615 pts/0 R 30:02 689 2 156561 117892 46.2 ./test
    I had read bdb's source code before, so i tried to debug it for about a week and found something like a bug:
    If open a db with both filename and dbname, bdb will open a db handle for master db and a db handle for subdb,
    both of the two handle will get an fileid by a internal api called __dbreg_get_id, however, just the subdb's id will be
    return to bdb's log region by calling __dbreg_pop_id. It leads to a id leak if I tried to open and close the db
    repeatly, as a result, __dbreg_add_dbentry will call realloc repeatly to enlarge the dbentry area, this seens to be
    the reason for RSS increasing.
    Is it not a BUG?
    sorry for my pool english :)
    Edited by: user9222236 on 2010-2-25 下午10:38

    I have tested my program using Oracle Berkeley DB release 4.8.26 and 4.7.25 in redhat 9.0 (Kernel 2.4.20-8smp on an i686) and AIX Version 5.
    The problem is easy to be reproduced by calling the open method of db handle with both filename and dbname being specified and calling the close method.
    My program is very simple:
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include "db.h"
    int main(int argc, char * argv[])
    int ret, count;
    DB_ENV *dbenvp;
    char * filename = "test.dbf";
    char * dbname = "test";
    db_env_create(&dbenvp, 0);
    dbenvp->open(dbenvp, "/home/bdb/code/test/env",DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL, 0);
    for(count = 0 ; count < 10000000 ; count++)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    dbenvp->close(dbenvp, 0);
    return 0;
    DB_CONFIG is like below:
    set_cachesize 0 20000 0
    set_flags db_auto_commit
    set_flags db_txn_nosync
    set_flags db_log_inmemory
    set_lk_detect db_lock_minlocks
    Edited by: user9222236 on 2010-2-28 下午5:42
    Edited by: user9222236 on 2010-2-28 下午5:45

Maybe you are looking for

  • What is difference between 32 bit and 64 bit sql server memory management

    What is difference between 32 bit and 64 bit sql server memory management Thanks Shashikala

  • Itunes 10.7.0 21x64 will not install

    New windows 7 64 bit install attempting to run Itunes 10.7.0 21x64.  Get error on start of install that says: "The installer encountered errors before itunes could be configured.  Errors occurred during installation.  Your system has not been modifie

  • PO print language

    Hi Guys, Does anyone have any idea how the langauge to print in determined in PO. I checked for vendor master but even though it is different it is printing in other language? Regards, Sid

  • File Renaming not Working

    I am trying to transfer the files directly from the SD card files structure and renameing the files in the new destination. When i try to do this it moves the entire structure of the sd card and doesnt rename the mts files. I have tried removing them

  • Can't resolve broken links

    Hello everyone! I am hoping that someone will be able to assist me. I am working in RH 9 and i have received the following error when i select to resolve my broken links. "You cannot resore a topic that would be outside the project folder. Please mak