problème installing viewCVS script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PaSta

    #1

    problème installing viewCVS script

    Hi,

    In the script that creates MySQL database, there is a create table
    section that gives me a syntax error. Can you help me?

    DROP TABLE IF EXISTS descs;
    CREATE TABLE descs (
    id mediumint(9) NOT NULL auto_increment,
    description text,
    hash bigint(20) NOT NULL,
    PRIMARY KEY (id),
    KEY hash (hash)
    );


    ERROR 1064: You have an error in your SQL syntax. Check the manual
    that corresponds to your MySQL server version for the right syntax to
    use near 'hash bigint(20) DEFAULT '0' NOT NULL,
    PRIMARY KEY (id),
    KEY


    Where is the problem?

    Thanks
  • Aggro

    #2
    Re: problème installing viewCVS script

    PaSta wrote:
    [color=blue]
    > Hi,
    >
    > In the script that creates MySQL database, there is a create table
    > section that gives me a syntax error. Can you help me?
    >
    > DROP TABLE IF EXISTS descs;
    > CREATE TABLE descs (
    > id mediumint(9) NOT NULL auto_increment,
    > description text,
    > hash bigint(20) NOT NULL,
    > PRIMARY KEY (id),
    > KEY hash (hash)
    > );[/color]

    Tested with:
    mysql Ver 11.16 Distrib 3.23.49, for pc-linux-gnu (i686)

    mysql> DROP TABLE IF EXISTS descs;
    Query OK, 0 rows affected (0.00 sec)

    mysql> CREATE TABLE descs (
    -> id mediumint(9) NOT NULL auto_increment,
    -> description text,
    -> hash bigint(20) NOT NULL,
    -> PRIMARY KEY (id),
    -> KEY hash (hash)
    -> );
    Query OK, 0 rows affected (0.07 sec)

    No problems.

    [color=blue]
    >
    > ERROR 1064: You have an error in your SQL syntax. Check the manual
    > that corresponds to your MySQL server version for the right syntax to
    > use near 'hash bigint(20) DEFAULT '0' NOT NULL,
    > PRIMARY KEY (id),
    > KEY
    >
    >
    > Where is the problem?[/color]

    You didn't mention what version you are using.

    Comment

    • Aggro

      #3
      Re: problème installing viewCVS script

      PaSta wrote:
      [color=blue]
      > Hi,
      >
      > In the script that creates MySQL database, there is a create table
      > section that gives me a syntax error. Can you help me?
      >
      > DROP TABLE IF EXISTS descs;
      > CREATE TABLE descs (
      > id mediumint(9) NOT NULL auto_increment,
      > description text,
      > hash bigint(20) NOT NULL,
      > PRIMARY KEY (id),
      > KEY hash (hash)
      > );[/color]

      Tested with:
      mysql Ver 11.16 Distrib 3.23.49, for pc-linux-gnu (i686)

      mysql> DROP TABLE IF EXISTS descs;
      Query OK, 0 rows affected (0.00 sec)

      mysql> CREATE TABLE descs (
      -> id mediumint(9) NOT NULL auto_increment,
      -> description text,
      -> hash bigint(20) NOT NULL,
      -> PRIMARY KEY (id),
      -> KEY hash (hash)
      -> );
      Query OK, 0 rows affected (0.07 sec)

      No problems.

      [color=blue]
      >
      > ERROR 1064: You have an error in your SQL syntax. Check the manual
      > that corresponds to your MySQL server version for the right syntax to
      > use near 'hash bigint(20) DEFAULT '0' NOT NULL,
      > PRIMARY KEY (id),
      > KEY
      >
      >
      > Where is the problem?[/color]

      You didn't mention what version you are using.

      Comment

      Working...