Commit Graph

226 Commits

Author SHA1 Message Date
Michal Čihař
628b19283d Fix spacing of docstrings
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-05 16:40:44 +01:00
Michal Čihař
55b317c699 Remove /*overload*/ prefix from mb_* calls
I believe this was temporary flagging to see which code is migrated and
can be safely removed now.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-04 16:35:28 +01:00
Michal Čihař
8de01e61c0 Remove unused variable
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 17:15:55 +01:00
Michal Čihař
a9b031b4aa Remove unused global
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 17:13:16 +01:00
Michal Čihař
9187445a9f Display results for all queries returning data
This is limited to 50 queries, and removes detection based on query
string. It rather passes all (up to 50) queries to sql.php, which can
properly handle any query returing results.

Fixes #11741

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 15:07:23 +01:00
Michal Čihař
01d96f8bf4 Fix parameter to detect DROP/CREATE
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 15:05:02 +01:00
Michal Čihař
a786952213 Remove unused variable
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 14:53:26 +01:00
Michal Čihař
085761fe5f Simplify query execution
We get most information as parameters.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 14:52:46 +01:00
Michal Čihař
135077bbc0 Fold updateSqlData into new function
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 14:45:32 +01:00
Michal Čihař
189f893677 Split out actual query execution to separate function
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-16 14:44:54 +01:00
Michal Čihař
0a20708533 Update sql data array in place
There is no need to create a copy here.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-15 10:11:00 +01:00
Michal Čihař
6b9d93a270 Do not try to catch USE when runing through sql.php
In this case it's properly handled there, we should not do any database
changes at this point.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-15 09:40:52 +01:00
Michal Čihař
4d74053e3f Remove not used controluser support from PMA_importRunQuery
This code was never executed.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-14 16:29:51 +01:00
Michal Čihař
18cfc24743 Display results of execute statement
Issue #11741

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-14 16:22:34 +01:00
Hugues Peccatte
f9d582bd09 Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-11-08 15:58:48 +01:00
Hugues Peccatte
6f4676cdfc Merge remote-tracking branch 'origin/master' into useNamespaces_master 2015-10-04 18:04:49 +02:00
Marc Delisle
fd7c8522ea Clarify method name
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-10-03 10:14:29 -04:00
Hugues Peccatte
42c0ebac85 Merge branch 'master' into useNamespaces_master 2015-09-09 22:05:00 +02:00
Madhura Jayaratne
7fadb9e37f Remove Drizzle support from import and export
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-10 01:02:37 +10:00
Hugues Peccatte
0761fb1801 Rename classes files.
Rename classes.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:30:21 +02:00
Hugues Peccatte
f0ba28fc1d Set namespace on Advisor, Config, Console and Util classes.
Set namespace on DbQbe.
Set namespace to 'DbSearch'.
Split Advisor.class.php file.
Change Advisor namespace.
Rename DbQbe class and file.
Set namespace on DisplayResults.
Set namespace on Error.
Use namespace for ErrorHandler.
Add class autoloader.
Change ErrorHandler filename.
Remove some require.
Update Config namespace path.
Update PMA_Util to PMA\libraries\Util.
Rename Font and File classes files.
Use namespace for Footer.
Set namespace in all libraries classes.
Namespace OutputBuffering.
Export SubPartition.
Rename Partition file.
Namespace PDF.
Namespace RecentFavoriteTable.
Replace PMA_Response by Response and PMA_Message by Message.
Update uses and calls.
Fix unit tests.
Fix SqlParser autoload.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:22:52 +02:00
Hugues Peccatte
7af0fcf918 Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-08-24 19:43:19 +02:00
Dan Ungureanu
f8a019512f Remove unnecessary code.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
2015-08-13 00:10:00 +03:00
Jason
6636153071 Resolve conflicts from upstream
Signed-off-by: Jason <jason.daurus@gmail.com>
2015-07-23 11:29:53 +08:00
Dan Ungureanu
91b97fadc2 Remove unneeded closing tags.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
2015-07-19 00:18:38 +03:00
Dan Ungureanu
ecc60f3664 Fixed failing tests. Also, removed deprecated PHPUnit configuration that might cause issues with XDebug.
Fixed a bug where the query delimiter would not be added.
Updated sql-parser to udan11/sql-parser@7c925b6.

Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
2015-07-10 23:18:18 +03:00
Dan Ungureanu
51876a097c Coding style fixes.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
2015-07-10 23:18:17 +03:00
Dan Ungureanu
eeafcad986 Using the new parser to simulate queries.
Updated sql-parser library to udan11/sql-parser@e58d230.

Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
2015-07-10 23:18:17 +03:00
Marc Delisle
e721080899 Remove dead code
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-06-25 08:33:33 -04:00
Nisarg Jhaveri
d1bb026034 Fix bug#4948
Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
2015-06-12 12:18:25 +05:30
Nisarg Jhaveri
34720c2365 Disable foreign key checks in SQL query box and config option
Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
2015-05-31 12:28:41 +05:30
Madhura Jayaratne
6ffbf93188 #4927 "Disable foreign key" doesn't work with a single query SQL file
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-05-27 10:57:42 +05:30
Marc Delisle
18a085f6ac Fix coding style
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-03-30 13:23:33 -04:00
Marc Delisle
b28ae18f22 Merge branch 'QA_4_3' into QA_4_4 2015-03-29 07:57:31 -04:00
Andrea Vallorani
cc56e09667 Bug #4718 simulate query fails
It is not an elegant solution, but it seems functional.
It avoids all the errors caused by the presence of functions in the query.
The $extra_where_clause variable was valorized but never appended to the WHERE clause. (I think that was a mistake)

Signed-off-by: Andrea Vallorani <andrea.vallorani@gmail.com>
2015-03-29 07:46:49 -04:00
Marc Delisle
20f7402cc5 Remove dead code
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-12-05 12:56:42 -05:00
Hugues Peccatte
2768d398b5 Reduce nesting levels.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-11-09 17:36:14 +01:00
Hugues Peccatte
037a034b43 Minor coding style modifications.
Fix typos.
PHPDoc and JSDoc updates.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-11-02 14:04:35 +01:00
Hugues Peccatte
80ced5fe8f Fix PHPCS issues.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-10-30 18:37:49 +01:00
Hugues Peccatte
35bbe992d0 Remove var_dump.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-10-25 12:32:13 +02:00
Hugues Peccatte
14bda32169 Fix delimiter reading.
Rum last SQL query.
Fix SQL reading.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-10-25 12:23:15 +02:00
Hugues Peccatte
f9cd1a1a22 Replace mb functions by standard string functions.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-10-05 11:31:50 +02:00
Hugues Peccatte
48bd3b8ee5 Remove unused $pmaString.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-10-05 10:42:44 +02:00
Hugues Peccatte
3de88162ff Replace PMA_String uses by mb_* calls.
Remove part of unused  variables.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-09-28 20:53:01 +02:00
Hugues Peccatte
5985894160 Fix typos.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-09-07 00:31:45 +02:00
Hugues Peccatte
623715c5f9 Add PMA_String::substrCount.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-09-06 17:53:30 +02:00
Hugues Peccatte
9b77d746ab Mass modifications to use PMA_String.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-09-06 10:44:03 +02:00
Ashutosh Dhundhara
60610f9b83 Fix issues reported by Scrutinizer.
Signed-off-by: Ashutosh Dhundhara <ashutoshdhundhara@yahoo.com>
2014-08-17 02:20:05 +05:30
Marc Delisle
0c850e49f5 Fix coding style
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-06-22 15:01:19 -04:00
Marc Delisle
3c84487ca0 Fix typos
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-06-22 14:56:54 -04:00