All pages
Powered by GitBook
1 of 8

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

How can a VBA Application Connect to MariaDB?

Remote connection work but often get error HY000/2002 connection timed out

Hi all,

I have create a remote connection between two linux server running mariadb. One run centos stream 9 with 10.5.16-MariaDB and the second run centos 7 with 5.5.68-MariaDB. Through php script automated with cron I run queries and it work.

The problem is that often i get the error HY000/2002 connection timed out. The error occurs at random times either using cron or launching it manually. For example, the script work for 10 times and on the 11th time I receive the error (HY000/2002 connection timed out) which can occur one or more times consecutively and then return to work on the umpteenth execution. The number of times the script works or not is always different.

I can't find the cause of the error. Any suggestions?

Thanks

This page is licensed: CC BY-SA / Gnu FDL

How can I Learn about Developing MariaDB?

See MariaDB Development for this.

This page is licensed: CC BY-SA / Gnu FDL

How many JOIN Clauses are Allowed in a Query?

According to MySQL docs: joins-limits.html

The maximum number of tables that can be referenced in a single join is 61. This also applies to the number of tables that can be referenced in the definition of a view.

Does the same maximum (61) applies to MariaDB, too?

If yes, are there plans for raising this limit?

This page is licensed: CC BY-SA / Gnu FDL

Where is the table_cache in MariaDB?

All versions of MariaDB are based on MySQL 5.1 and greater, thus the table_cache option is deprecated in favor of table_open_cache. This is also documented at: .

For further reading, please refer to the MySQL manual: How MySQL Opens and Closes Tables.

Examples of use cases:

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'opened_tables';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Opened_tables | 354858 |
+---------------+--------+
1 row in set (0.00 sec)

MariaDB [(none)]> SELECT @@table_open_cache;
+--------------------+
| @@table_open_cache |
+--------------------+
|                400 |
+--------------------+
1 row in set (0.00 sec)

This page is licensed: CC BY-SA / Gnu FDL

Developer Questions

Tools Available for Developing on the MariaDB Code

The code is hosted on server. You can branch the latest code from there, and you can also push your own changes as a new branch that can be shared with others.

Building the code from source is done with standard Unix tools: CMake (or autotools for MariaDB versions below 5.5), Gnu Make, GCC (or other C/C++ compiler on some systems). On Windows, CMake and Visual Studio are used.

The current state of the source with respect to build/test failures can be seen in buildbot.

For project management and bug tracking, we use JIRA.

The source page has links to instructions on setting up a full development environment, if you are interested.

This page is licensed: CC BY-SA / Gnu FDL

Why is ORDER BY in a FROM Subquery Ignored?

Query with ORDER BY in a FROM subquery produces unordered result. Is this a bug? Below is an example of this:

returns a result set that is not necessarily ordered by field2. This is not a bug.

A "table" (and subquery in the FROM clause too) is - according to the SQL standard - an unordered set of rows. Rows in a table (or in a subquery in the FROM clause) do not come in any specific order. That's why the optimizer can ignore the clause that you have specified. In fact, the SQL standard does not even allow the ORDER BY clause to appear in this subquery (we allow it, because ORDER BY ... LIMIT ... changes the result, the set of rows, not only their order).

You need to treat the subquery in the FROM clause, as a set of rows in some unspecified and undefined order, and put the ORDER BY on the top-level

SELECT
.

Source: MDEV-3926, Comment by Sergei Golubchik

See also

  • MDEV-3926, MDEV-5007, MDEV-3795.

  • SELECT

  • ORDER BY

This page is licensed: CC BY-SA / Gnu FDL

ORDER BY
SELECT field1, field2 FROM ( SELECT field1, field2 FROM table1 ORDER BY field2 ) ALIAS
mariadbd Options