Issue 85371 - cannot open query in SQL view which works fine in 2.3.1
Summary: cannot open query in SQL view which works fine in 2.3.1
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOH680m3
Hardware: All Linux, all
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.4
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: oooqa, regression, release_blocker
Depends on:
Blocks: 84957
  Show dependency tree
 
Reported: 2008-01-18 15:29 UTC by Mechtilde
Modified: 2008-02-25 15:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
HSQL Database (2.40 KB, application/vnd.sun.xml.base)
2008-01-23 20:25 UTC, Mechtilde
no flags Details
HSQLDb which shows me the same error message (10.10 KB, application/vnd.sun.xml.base)
2008-01-28 13:38 UTC, Mechtilde
no flags Details
mysqldump (2.49 KB, text/plain)
2008-01-28 14:40 UTC, Mechtilde
no flags Details
dazugehörige *.odb (25.41 KB, text/plain)
2008-01-28 14:42 UTC, Mechtilde
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Mechtilde 2008-01-18 15:29:08 UTC
It is not possible to copy a table, query, form to use it as a pattern.
It is also impossible to change something in a query like an alias etc.

When I change something I get the message "Syntax error in SQL expression. This
message also occur if I set a space and delete it and want so save.

These things works since 2.5 years till 2.3.1
I set P1 because this is the base of working with databases
Comment 1 Mechtilde 2008-01-18 15:29:44 UTC
set keywords
Comment 2 Frank Schönheit 2008-01-18 20:25:56 UTC
Can you a) please describe in more detail what you do? I can't reproduce here b)
tell use where you got m3 from? There is no official m3 release, yet. The error
you describe *somewhat* sounds like a know problem which happens when you build
OOo with a too-new flex version, so I wonder how the build environment for the
version you used looks like ..
Comment 3 Mechtilde 2008-01-18 21:17:10 UTC
I can reproduce it with OOH_m2 (Sun build) 

I'm working on the calculation. I wanted to do a copy of one query and change
something because it doesn't work as expected. I want to do it per C&P (right
click). But this wasn't possible. 

Then I do this with version 2.3.1.

I change the version again and want to change something in the query but it
doesn't also work. I get the error message.

I hope this help.I know this is very difficult to describe (in English)

Mechtilde

Comment 4 rene 2008-01-20 21:48:32 UTC
fs: uhm, "too new" flex? Which flex versions *are* supported for building? If
the problem is known, why wasn't config_office changed accordingly?

Which flex does work? /me can choose between
rene@frodo:~$ apt-cache show flex | grep Version
Version: 2.5.33-12
rene@frodo:~$ apt-cache show flex-old | grep Version
Version: 2.5.4a-7

and I am sure some other distris don't even have flex-old anymore..

P.S.: I guess Mechtilde got her m3 from Pavel.
Comment 5 Frank Schönheit 2008-01-21 07:12:05 UTC
fs->rene: Actually, we found the flex issue last week, when we investigated the
problem that Base doesn't work at all (always with an syntax error for even
simple SQL statements) in the current Mac version. Thus, nothing happened to
config_office so far. Also, I would not really like builders to downgrade their
flex. I prefer fixing the problem (in either flex or our sources, I somehow
suppose the former.)

We found that in the Hamburg build environment, we use flex 2.5.4, while a
decent Mac has 2.5.33 installed. Don't know anything about inbetween versions.
Comment 6 rene 2008-01-21 07:30:31 UTC
> fs->rene: Actually, we found the flex issue last week, when we investigated the
> problem that Base doesn't work at all (always with an syntax error for even
> simple SQL statements) in the current Mac version. Thus, nothing happened to
> config_office so far. Also, I would not really like builders to downgrade their
> flex. I prefer fixing the problem (in either flex or our sources, I somehow
> suppose the former.)

Full ACK. That was exactly my point.
Comment 7 Frank Schönheit 2008-01-21 12:37:00 UTC
Can you please attach a sample database, or at least tell the SQL statement of
your query? In the generality you describe it, I still cannot reproduce it. I
suppose it is related to the concrete SQL statement.
Comment 8 Mechtilde 2008-01-21 13:07:31 UTC
@fs

You mean the concrete query I want to copy?
I do the copy with version 2.3.1.

SELECT `Konten`.`Kontonummer`, `Konten`.`Kontoname`, SUM(
`Uberweisung`.`SollEUR` ), SUM( `Uberweisung`.`HabenEUR` ) FROM
`Hauptbuch2008`.`Uberweisung`, `Hauptbuch2008`.`Konten` WHERE (
`Uberweisung`.`Kontenbezeichnung` = `Konten`.`ID` ) AND ( (
`Uberweisung`.`Uberweisungsdatum` >= :Anfangsdatum AND
`Uberweisung`.`Uberweisungsdatum` <= :Enddatum ) ) GROUP BY
`Konten`.`Kontonummer`, `Konten`.`Kontoname` HAVING ( ( `Konten`.`Kontonummer`
<> 'Null' ) )

This query works since the middle of 2005. I only replaced 2008 through 200x ( =
5-7)

I can't also copy tables and forms in version OOH_m2 (Sun), OOH_m3 (Pavel)
SRC_m242 (Sun and Pavel).

I test it also with MySQL via JDBC *and* ODBC

Mechtilde
Comment 9 Mechtilde 2008-01-22 21:31:51 UTC
I test it today with OOH_m4

Now it is possible to copy.
Change something in the query isn't still possible as described:

"It is also impossible to change something in a query like an alias etc.
When I change something I get the message "Syntax error in SQL expression. This
message also occur if I set a space and delete it and want so save."

Please give me a hint if you need more information
Comment 10 Frank Schönheit 2008-01-23 12:45:18 UTC
Sigh. Still cannot reproduce.
Please
- use mysqldump or "SHOW CREATE TABLE <table>" to retrieve the SQL statements
  which can be used to re-create your table's structure on another MySQL
  server
- tell whether the problem is with the query you cited above, or another one
- be specify in what you do
  http://qa.openoffice.org/issue_handling/basic_rules.html#reproducibility
  shows an example. Sorry, but expression like "change something" (what is
  "somehting"?) and "set a space" (in which input field) leave way too much
  room for guesswork.
Thanks.
Comment 11 Mechtilde 2008-01-23 20:20:00 UTC
Because I can see the problem also with the internal HSQLDB I prepared an *.odb
to demonstrate the problem.

Step-by Step:

Open the attached file.
choose query in Design View
There is one Table. I can`t add further once. The icon and the menu are greyed out.
There I can't create a query using two tables.
Comment 12 Mechtilde 2008-01-23 20:25:15 UTC
Created attachment 51121 [details]
HSQL Database
Comment 13 Regina Henschel 2008-01-23 20:34:44 UTC
Hi Mechtilde, wrong file? You have attached a dBase-database, but the folder
with the dbf-files is missing. You said, you'll sent a HSQL database?
Comment 14 Mechtilde 2008-01-25 18:07:43 UTC
@ regina
Thanks for the hint.

Now I'm trying to create an example database to show the problem.

If it is ready I will attach it.

Mechtilde
Comment 15 Mechtilde 2008-01-28 13:38:21 UTC
Created attachment 51204 [details]
HSQLDb which shows me the same error message
Comment 16 Mechtilde 2008-01-28 13:42:55 UTC
I have tried to create an example DB with the internal HSQL which shows the
samme error message.

Open the *odb file
Open the Query in design view
Try to open the SQL-view
But ..... there seems to be another error in it
Comment 17 Frank Schönheit 2008-01-28 14:10:50 UTC
Okay, I can reproduce the problem that the query cannot be opened in / switched
to SQL view. I change the summary accordingly, and target the issue to 2.4.

fs->oj: looks like some parser regression to me. Could you please have a look?
Note the issue is currently nominated as show stopper for 2.4. Thanks.
Comment 18 Mechtilde 2008-01-28 14:38:02 UTC
Then I attach also a mysqldump and the *.odb which you can connect with jdbc

odbc doesn't work with OOH_m4

Comment 19 Mechtilde 2008-01-28 14:40:19 UTC
Created attachment 51205 [details]
mysqldump
Comment 20 Mechtilde 2008-01-28 14:42:28 UTC
Created attachment 51206 [details]
dazugehörige *.odb
Comment 21 ocke.janssen 2008-01-29 08:49:15 UTC
Fixed in cws dba24g.
Comment 22 ocke.janssen 2008-01-30 09:43:23 UTC
Please verify. 
You could also try to insert a parameter in the query designer.
Comment 23 marc.neumann 2008-01-30 11:32:58 UTC
Now the query can open in the design, but can't execute. -->> error messages:
"not in aggregate function or group by clause"
Comment 24 marc.neumann 2008-01-30 11:34:27 UTC
back to oj
Comment 25 ocke.janssen 2008-01-30 12:11:32 UTC
The error message come when you use the hsqldb bugdoc
(http://www.openoffice.org/nonav/issues/showattachment.cgi/51204/TestDB85371.odb)

It is not allowed for hsqldb to execute a query which uses group by clause and
columns which are not used in a aggregate function like sum. When you remove the
visible flag for the 2 parameter all went well.
Comment 26 marc.neumann 2008-01-30 12:18:54 UTC
correct when I remove the visible flags the query works.

verified in CWS dba24g

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=OOH680%2Fdba24g
Comment 27 marc.neumann 2008-01-30 12:20:05 UTC
verified in CWS dba24g
Comment 28 Mechtilde 2008-02-24 22:02:20 UTC
it is unpossible to copy a table, query, form in version OOH_m7 

so the issue isn't fixed.

Comment 29 Mechtilde 2008-02-25 14:18:53 UTC
How to reproduce the issue:

e.g for queries

In the database browser I can see the names of the queries I created.
I want to copy one of them to use it as a template for a new query.
I do a right click on the name, choose copy, and then want to paste it.
But this is impossible now.

This is the status today

When I create the issue I could paste it, but couldn't change the query.


Comment 30 marc.neumann 2008-02-25 14:25:27 UTC
I have no problem to do this:

- Open Bibliography
- create a query
- copy the query 
- paste the query
==>> no problems.

Can you please use an Sun OOO build and a fresh database and try to reproduce
this problem.
Comment 31 Frank Schönheit 2008-02-25 14:36:27 UTC
> In the database browser

Argh! This is the *first* mention of the data source browser in this issue!
Don't you think this is an important information?

> I can see the names of the queries I created.
> I want to copy one of them to use it as a template for a new query.
> I do a right click on the name, choose copy, and then want to paste it.

I assume that "want to paste" it was never sufficient to really paste it. You
certainly do more than just thinking "I want to paste". Sorry to tell you, but
mind reading is not yet implemented.
The version without sarcasm is:
What exactly do you do? (context menu? on which entry? main menu? Ctrl-V? Still
in the data source browser? Or in the Base application window?) What is the
expected result, and what is the actual result? Which is the last version where
you know it worked (OOo 2.3.1? OOo 1.0? Somewhere in-between?)

So, unless you can provide a reproducible description of the problem, we cannot
fix it.

Also, note we *never* were able to reproduce a problem with copying objects, as
the above  issue history shows. What we could reproduce is the problem of
switching the query in the attached "TestDB85371.odb" from graphical to text
mode - this bug is fixed in m7, switching works fine in this version.
Comment 32 marc.neumann 2008-02-25 15:26:57 UTC
according to Mechtilde I close this issue now.