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

`DEFAULT` & `COMMENT` doens't work sometimes.

    XMLWordPrintable

Details

    Description

      I was working on Windows 7 and developing a Laravel project with MariaDB 10.2.6.
      The bug was found when I tried to define a datatable:

      CREATE TABLE `users` (
        `id` int(10) UNSIGNED NOT NULL,
        `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
        `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
        `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'null when sign-up via oauth',
        `message` int(11) NOT NULL DEFAULT '0' COMMENT 'Id of the last message that has been read',
        `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `created_at` timestamp NULL DEFAULT NULL,
        `updated_at` timestamp NULL DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
      

      The columns `password` and `message` are both defined with default value and comment. However, column `message` is not what defined as the above SQL lines.

      I tested this carefully on my windows, but I was not able to get access to the Internet on that machine.

      Attachments

        1. 1.png
          43 kB
          Alice Sherepa
        2. 2.png
          49 kB
          Alice Sherepa
        3. 2.png
          53 kB
          Alice Sherepa
        4. IMG_20170706_103442_HDR.jpg
          1.93 MB
          PHP.Developer
        5. IMG_20170706_103540_HDR.jpg
          1.56 MB
          PHP.Developer
        6. IMG_20170706_104136_HDR.jpg
          1.23 MB
          PHP.Developer

        Issue Links

          Activity

            People

              Unassigned Unassigned
              masterwto PHP.Developer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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