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

SET STATEMENT rand_seedX = ...FOR ... makes the next rand() to return 0

    XMLWordPrintable

Details

    Description

      Values of rand_seed1 and rand_seed2 can be set, but cannot be seen – server always shows fake zeros for them.
      However, after executing SET STATEMENT rand_seed..., the values are set to actual zeros, and the next rand() returns 0. It should not happen.

      MariaDB [test]> set statement rand_seed1=1, rand_seed2=1 for select 1;
      +---+
      | 1 |
      +---+
      | 1 |
      +---+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select rand();
      +--------+
      | rand() |
      +--------+
      |      0 |
      +--------+
      1 row in set (0.00 sec)

      I don't see this problem in Percona.

      commit e64f5d8f758bcc1a8856ba9fba01780533f80747
      Author: Oleksandr Byelkin <sanja@mariadb.com>
      Date:   Sun Oct 26 16:27:54 2014 +0100
       
          Fixed test suite global variable saving

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.