ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
am 04.11.2002 20:07:52 von Gelu Gogancea
Hi,
How-To-Repeat:
The next SQL statement :
replace/insert into stocex select * from stoc;
....data doesn't match with the columns(only up to the 11-th column(mUser)in
this example).
Table definition:
CREATE TABLE stoc(IDST INT(16) NOT NULL AUTO_INCREMENT PRIMARY KEY,IDE3
INT(16),IDDOCIN INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric
INT(1),Saptamana CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status
CHAR(4),Special CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar
TINYINT(1),DataIntro DATE,DataModif DATE,DataIesire DATE,Probleme
CHAR(2),INDEX(IDE3),INDEX
(IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
),INDEX(DataIesire),INDEX(Probleme));
CREATE TABLE stocex(IDST INT(16) NOT NULL,IDE3 INT(16),IDDOCIN
INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric INT(1),Saptamana
CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status CHAR(4),Special
CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar TINYINT(1),DataIntro
DATE,DataModif DATE,DataIesire DATE,Probleme CHAR(2),INDEX(IDE3),INDEX
(IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
),INDEX(DataIesire),INDEX(Probleme));
Result is :
20000 411604 333 0 RD26A 2 35 016687 IP 1 depoz YY 0 127 0000-00-00
0000-00-00 0000-00-00 10
instead of:
20000 411604 333 0 RD26A 2 35 016687 IP 1 100 depozit YY 0 2002-08-26
0000-00-00 0000-00-00 IO
MYSQL ver : 4.0.4...same behaviour in Windows 98/NT, Red Hat 8.0.Under MySQL
3.x work perfect, no problem.
The problems it seems to be in sql_base.cc in function fill_record()
....after 10-11 incrementing of v(variable) a desynchronise occur between ptr
and value.
Regards,
Gelu
_____________________________________________________
G.NET SOFTWARE COMPANY
Permanent e-mail address : gg@gonetsoftware.com
gelugogancea@yahoo.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12898@lists.mysql.com
To unsubscribe, e-mail
Re: ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
am 04.11.2002 20:56:19 von Sinisa Milivojevic
Gelu Gogancea writes:
> Hi,
> How-To-Repeat:
> The next SQL statement :
> replace/insert into stocex select * from stoc;
>
> ...data doesn't match with the columns(only up to the 11-th column(mUser)in
> this example).
>
> Table definition:
>
> CREATE TABLE stoc(IDST INT(16) NOT NULL AUTO_INCREMENT PRIMARY KEY,IDE3
> INT(16),IDDOCIN INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric
> INT(1),Saptamana CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status
> CHAR(4),Special CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar
> TINYINT(1),DataIntro DATE,DataModif DATE,DataIesire DATE,Probleme
> CHAR(2),INDEX(IDE3),INDEX
> (IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
> Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
> INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
> ),INDEX(DataIesire),INDEX(Probleme));
>
> CREATE TABLE stocex(IDST INT(16) NOT NULL,IDE3 INT(16),IDDOCIN
> INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric INT(1),Saptamana
> CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status CHAR(4),Special
> CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar TINYINT(1),DataIntro
> DATE,DataModif DATE,DataIesire DATE,Probleme CHAR(2),INDEX(IDE3),INDEX
> (IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
> Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
> INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
> ),INDEX(DataIesire),INDEX(Probleme));
>
>
> Result is :
> 20000 411604 333 0 RD26A 2 35 016687 IP 1 depoz YY 0 127 0000-00-00
> 0000-00-00 0000-00-00 10
>
> instead of:
> 20000 411604 333 0 RD26A 2 35 016687 IP 1 100 depozit YY 0 2002-08-26
> 0000-00-00 0000-00-00 IO
>
> MYSQL ver : 4.0.4...same behaviour in Windows 98/NT, Red Hat 8.0.Under MySQL
> 3.x work perfect, no problem.
>
> The problems it seems to be in sql_base.cc in function fill_record()
> ...after 10-11 incrementing of v(variable) a desynchronise occur between ptr
> and value.
>
> Regards,
>
> Gelu
Sorry,
It is quite correct, but can you send us a full test case.
It would be nice if number of rows would be very small.
This means dump of entire table (with small number of rows), then
REPLACE command and a SELECT command.
Also, you have sent create statements for two tables, while you are
commenting only one.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12899@lists.mysql.com
To unsubscribe, e-mail
Re: ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
am 04.11.2002 21:32:34 von Gelu Gogancea
Hi Sinisa,
OK.I make a dumb of stoc table with 100 rows.But my question is:where i can
send this data ?
...or you wish to put this dumb in the e-mail body
From what i know ,the attachments is not accepted by the MySQL lists.
Regards,
Gelu
_____________________________________________________
G.NET SOFTWARE COMPANY
Permanent e-mail address : gg@gonetsoftware.com
gelugogancea@yahoo.com
----- Original Message -----
From: "Sinisa Milivojevic"
To:
Cc:
Sent: Monday, November 04, 2002 9:56 PM
Subject: Re: ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
> Gelu Gogancea writes:
> > Hi,
> > How-To-Repeat:
> > The next SQL statement :
> > replace/insert into stocex select * from stoc;
> >
> > ...data doesn't match with the columns(only up to the 11-th
column(mUser)in
> > this example).
> >
> > Table definition:
> >
> > CREATE TABLE stoc(IDST INT(16) NOT NULL AUTO_INCREMENT PRIMARY KEY,IDE3
> > INT(16),IDDOCIN INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric
> > INT(1),Saptamana CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status
> > CHAR(4),Special CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar
> > TINYINT(1),DataIntro DATE,DataModif DATE,DataIesire DATE,Probleme
> > CHAR(2),INDEX(IDE3),INDEX
> >
(IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
> >
Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
> >
INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
> > ),INDEX(DataIesire),INDEX(Probleme));
> >
> > CREATE TABLE stocex(IDST INT(16) NOT NULL,IDE3 INT(16),IDDOCIN
> > INT(16),IDDOCIE INT(16),CODApFrig CHAR(10),AnFabric INT(1),Saptamana
> > CHAR(2),SerieAparat CHAR(20),MotivMisc CHAR(10),Status CHAR(4),Special
> > CHAR(5),mUser CHAR(16),ZonaDep CHAR(4),Inventar TINYINT(1),DataIntro
> > DATE,DataModif DATE,DataIesire DATE,Probleme CHAR(2),INDEX(IDE3),INDEX
> >
(IDST),INDEX(IDDOCIN),INDEX(IDDOCIE),INDEX(CODApFrig),INDEX( AnFabric),INDEX(
> >
Saptamana),INDEX(SerieAparat),INDEX(MotivMisc),INDEX(Status) ,INDEX(Special),
> >
INDEX(mUser),INDEX(ZonaDep),INDEX(Inventar),INDEX(DataIntro) ,INDEX(DataModif
> > ),INDEX(DataIesire),INDEX(Probleme));
> >
> >
> > Result is :
> > 20000 411604 333 0 RD26A 2 35 016687 IP 1 depoz YY 0 127 0000-00-00
> > 0000-00-00 0000-00-00 10
> >
> > instead of:
> > 20000 411604 333 0 RD26A 2 35 016687 IP 1 100 depozit YY 0 2002-08-26
> > 0000-00-00 0000-00-00 IO
> >
> > MYSQL ver : 4.0.4...same behaviour in Windows 98/NT, Red Hat 8.0.Under
MySQL
> > 3.x work perfect, no problem.
> >
> > The problems it seems to be in sql_base.cc in function fill_record()
> > ...after 10-11 incrementing of v(variable) a desynchronise occur between
ptr
> > and value.
> >
> > Regards,
> >
> > Gelu
>
> Sorry,
>
> It is quite correct, but can you send us a full test case.
>
> It would be nice if number of rows would be very small.
>
> This means dump of entire table (with small number of rows), then
> REPLACE command and a SELECT command.
>
> Also, you have sent create statements for two tables, while you are
> commenting only one.
>
> --
> Regards,
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
> /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
> <___/ www.mysql.com
>
>
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12900@lists.mysql.com
To unsubscribe, e-mail
Re: ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
am 04.11.2002 21:46:41 von Sinisa Milivojevic
Gelu Gogancea writes:
> Hi Sinisa,
> OK.I make a dumb of stoc table with 100 rows.But my question is:where i can
> send this data ?
> ..or you wish to put this dumb in the e-mail body
> >From what i know ,the attachments is not accepted by the MySQL lists.
>
> Regards,
>
> Gelu
> _____________________________________________________
> G.NET SOFTWARE COMPANY
>
Upload it to :
ftp://support.mysql.com:/pub/mysql/secreat
and let me know a file name ...
Please add also REPlACE and SELECT command and explain what you think
is wrong.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12901@lists.mysql.com
To unsubscribe, e-mail
ver.4.0.4-INSERT/REPLACE...SELECT, PROBLEM
am 11.12.2002 21:43:28 von Michael Widenius
Hi!
Sorry for the long delay regarding this.
Somehow this bug report landed between two chairs :(
(We hope to have a public bug reporting system up soon to ensure that
things like this doesn't happen again)
>>>>> "Gelu" == Gelu Gogancea writes:
Gelu> Hi,
Gelu> How-To-Repeat:
Gelu> The next SQL statement :
Gelu> replace/insert into stocex select * from stoc;
Gelu> ...data doesn't match with the columns(only up to the 11-th column(mUser)in
Gelu> this example).
Gelu> Result is :
Gelu> 20000 411604 333 0 RD26A 2 35 016687 IP 1 depoz YY 0 127 0000-00-00
Gelu> 0000-00-00 0000-00-00 10
Gelu> instead of:
Gelu> 20000 411604 333 0 RD26A 2 35 016687 IP 1 100 depozit YY 0 2002-08-26
Gelu> 0000-00-00 0000-00-00 IO
I tried this with the example table you gave us:
mysql> replace into stocex select * from stoc where IDST=30;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> select * from stocex;
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
| IDST | IDE3 | IDDOCIN | IDDOCIE | CODApFrig | AnFabric | Saptamana | SerieAparat | MotivMisc | Status | Special | mUser | ZonaDep | Inventar | DataIntro | DataModif | DataIesire | Probleme |
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
| 30 | 195316 | 2 | 0 | FB18MR | 1 | 50 | 000504 | IP | 1 | depoz | G1 | 0 | 127 | 0000-00-00 | 0000-00-00 | 0000-00-00 | 10 |
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
1 row in set (0.00 sec)
mysql> select * from stoc where IDST=30;
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
| IDST | IDE3 | IDDOCIN | IDDOCIE | CODApFrig | AnFabric | Saptamana | SerieAparat | MotivMisc | Status | Special | mUser | ZonaDep | Inventar | DataIntro | DataModif | DataIesire | Probleme |
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
| 30 | 195316 | 2 | 0 | FB18MR | 1 | 50 | 000504 | IP | 1 | depoz | G1 | 0 | 127 | 0000-00-00 | 0000-00-00 | 0000-00-00 | 10 |
+------+--------+---------+---------+-----------+----------+ -----------+-------------+-----------+--------+---------+--- ----+---------+----------+------------+------------+-------- ----+----------+
1 row in set (0.00 sec)
As you can see we get a perfect match.
By the way, I had some problems loading the data you gave us into a
table as the text file with data did not match any of the table
descriptions you had :(
If you still have a problem, please create a complete sql script that
shows the total problem that we can simply run with:
mysql test < test-script.sql
The easyest way to create the table with data is to use:
mysqldump --opt database table_name > test-script.sql
Please ftp the script (again) to
ftp://support.mysql.com/pub/mysql/secret and send an email to
bugs@lists.mysql.com and we will look at this at once.
(If you want to have a chance to get the bug fix in 4.0.6 we need to
get the test tomorrow...)
Regards,
Monty
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread13264@lists.mysql.com
To unsubscribe, e-mail