Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-380

conversion from string to decimal isn´t working (or i´m doing it wrong)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.1.62
    • 5.5.25
    • None
    • None
    • i didn´t found the version, but it´s mariadb 5.3.2

    Description

      CREATE TABLE `tmp` (
      `id` int(10) unsigned NOT NULL DEFAULT '0',
      `datahora` decimal(17,6) NOT NULL DEFAULT '0.000000',
      `value` decimal(20,10) NOT NULL DEFAULT '0.0000000000',
      PRIMARY KEY (`id`,`datahora`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1

      ====
      INSERT INTO `tmp` (`id`, `datahora`, `value`) VALUES (1, 1340977500.000000, 1.0000000000);
      ====

      this don´t work...:
      SELECT * FROM tmp WHERE id=1 AND
      datahora="1340977500.00000000000000"

      this work: (without conversion)
      SELECT * FROM tmp WHERE id=1 AND
      datahora=1340977500.00000000000000

      any idea?

      Attachments

        Activity

          People

            Unassigned Unassigned
            rspadim roberto spadim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.