1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Big price gives a mysql error

Discussion in 'Resource Manager Resolved Bugs' started by CyberAP, Apr 1, 2014.

  1. CyberAP

    CyberAP Well-Known Member

    Just enter a value of about 100000000000000000 USD and get a mysql error:
    Probably the price field should say that price value is limited by some amount.
     
  2. MattW

    MattW Well-Known Member

    The GDP of the USA????

    Other than on April fools day, is anyone really going to need to enter a value larger than 10 digits?

    upload_2014-4-1_20-58-56.png
     
  3. CyberAP

    CyberAP Well-Known Member

    And by the way sometimes you might need to use these high numbers for example if you choose to show price in belarusian rubles. :)

    Yes, for countries with high inflation rate.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    I agree it's unlikely, but equally it's very easy to prevent by setting a maxValue in the DataWriter for that field; or some other validation that doesn't allow it to exceed that value.
     
  5. whynot

    whynot Well-Known Member

    Millions: 999,000,000 = 9 digits
    Billions: 999,000,000,000= 12 digits
    Trillions: 15 digits

    Multiply that 15 digits: 99 digits
    Still another 100 to go to reach 1.0E+199

    Could that inflation go over 99? I don't think so.
     
  6. CyberAP

    CyberAP Well-Known Member

    The maximum price XenForo accepts is 99,999,999.99.
     
  7. whynot

    whynot Well-Known Member

    Then some variables don't match.
    99,999,999.99 rounded down : 99,999,999 > 9.9E+7
     
  8. CyberAP

    CyberAP Well-Known Member

    I don't get what you're trying to say :)
    You can't enter a value there that is higher than 99,999,999.99. And there is no field indication that this value is limited by that amount. Also I think the limit should be increased to 1 billion, but that goes to a technical side.
     
  9. whynot

    whynot Well-Known Member

    That I agree, it's a bug.
     
  10. MegaFora

    MegaFora Member

    Realistically, websites based in countries undergoing hyperinflation list things for sale in other currencies - USD or EUR, usually.
    There's at least one big Vietnamese XF forum though isn't there, and the Dong is 20,000 to the USD, so that ten million limit would be worth about $5,000 to them. Still a whole heck of a lot for a resource, but not unimaginable, so maybe an extra decimal place or two would be handy - or a floating point, or something.
     
  11. Mike

    Mike XenForo Developer Staff Member

    A limit been applied to prevent the DB error.
     
    CyberAP and Chris D like this.

Share This Page