emGee Software Solutions Custom Database Applications

Share this

Web Technologies

The Age of “Node.js and…”

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

sl: List npm scripts

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

Git-npm: Tool for lazy developers

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

react on-screen joystick controls

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

Angular v6.1 Now Available 

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

Angular 6 ngrx from 0 to expert

Echo JS - Sat, 07/28/2018 - 18:32
Categories: Web Technologies

Fun with Bugs #69 - On Some Public Bugs Fixed in MySQL 5.7.23

Planet MySQL - Sat, 07/28/2018 - 10:17
Several MySQL releases happened yesterday, but of them all I am mostly interested in MySQL 5.7.23, as MySQL 5.7 (either directly or indirectly, via forks and upstream fixes they merge) is probably the most widely used MySQL GA release at the moment.

In this post (in a typical manner for this "Fun with Bugs" series)  I'd like to describe several bugs reported by MySQL Community users and fixed in MySQL 5.7.23. As usual, I'll try to concentrate mostly on InnoDB, replication, partitioning and optimizer-related bugs (if any).

Checking MySQL release notes is like swimming with dolphins - it's pure fun  
I'd like to start with InnoDB and partitioning-related fixes:
  • The most important fix (that will make downgrades from 5.7.23 more problematic probably) is for Bug #86926 - "The field table_name (varchar(64)) from mysql.innodb_table_stats can overflow.", reported by Jean-François Gagné a year ago. The length of the table_name column in mysql.innodb_table_stats and mysql.innodb_index_stats tables has been increased from 64 to 199 characters (not 100% sure where this new value comes from), and one has to run mysql_upgrade while upgrading to 5.7.23.
  • Bug #90296 - "Hard error should be report when fsync() return EIO". Now this recent request from Allen Lai is implemented.
  • Bug #88739 - "Mysql scalability improvement patch: Optimized away excessive condition". The patch that removes unnecessary check for read-only transactions was suggested by Sandeep Sethia.
  • Bug #86370 - "crash on startup, divide by zero, with inappropriate buffer pool configuration". This funny bug was reported by Shane Bester. I wonder how many more bombs of this kind (use of uint or ulint data types) still remain in the code...
  • Bug #87253 - "innodb partition table has unexpected row lock". This bug was reported by  Yx Jiang and a patch was later suggested by Zhenghu Wen. If the comment at the end is correct, the fix is NOT included in MySQL 8.0.12.
Now let's check some replication bugs fixed:

  • Bug #89272 - "Binlog and Engine become inconsistent when binlog cache file gets out of space". This bug was reported by Yoshinori Matsunobu. Good question in the last comment there, by Artem Danilov:
    "I wonder why does only ENOSPC end up with flush errors and clears the binary log cached. What about any other disk error? Can this fix be extended for all disk errors?"
  • Bug #88891 - "Filtered replication leaves GTID holes with create database if not exists". This serious bug was reported by Simon Mudd
  • Bug #89938 - "Rejoin old primary node may duplicate key when recovery", was reported by Zhenghu Wen, who cares about group replication a lot (unlike me, I have Galera for that).
  • Yes another bug report from Jean-François Gagné, this time in group replication - Bug #89146 - "Binlog name and Pos are wrong in group_replication_applier channel's error msgs".
  • Bug #81500 - "dead branch in search_key_in_table()". This bug was reported 2 years ago by Andrei Elkin, now my colleague (again) in MariaDB. Index is properly used on slave to find rows after this fix.
Surely in MySQL 5.7.23 there had to be some community bug fixed that is kept private. This time it's a bug in mysqldump:
"mysqldump exited abnormally for large --where option values. (Bug #26171967, Bug #86496, Bug #27510150)"and this is a complete nonsense to me!

The last but not the least, we all should be thankful to Daniël van Eeden for these bug reports and patches contributed:
  • Bug #89001 - "MySQL aborts without proper error message on startup if grant tables are corrupt".
  • Bug #89578 - "Contribution: Use native host check from OpenSSL"
Had you noted any fixes to numerous public bug reports for InnoDB FULLTEXT indexes, "online" DDL or InnoDB compression, or optimizer maybe? I had not, and no wonder - the way these features are used by Community is obviously not something Oracle cares much about.

Anyway, I'd suggest to consider upgrade to MySQL 5.7.23 to anyone who cares about security and uses OpenSSL, replication of any kind or InnoDB partitioned tables in production.
Categories: Web Technologies

Never type hint on arrays - larry@garfieldtech.com

Planet PHP - Fri, 07/27/2018 - 20:18
Never type hint on arrays Submitted by Larry on 27 July 2018 - 11:18pm

Let's be controversial: In modern PHP, you should never type-hint an array.

Before you start throwing tomatoes, hear me out.

Continue reading on Steemit

Categories: Web Technologies

MySQL Shell 8.0.12 for MySQL Server 8.0 and 5.7 has been released

Planet MySQL - Fri, 07/27/2018 - 15:31

Dear MySQL users,

MySQL Shell 8.0.12 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under
Oracle’s dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Shell 8.0.12.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing
an integrated solution for high availability and scalability using
InnoDB based MySQL databases, without requiring advanced MySQL
expertise. For more information about how to configure and work with
MySQL InnoDB cluster see
https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html.

The X DevAPI enables you to create “schema-less” JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document
Store support see https://dev.mysql.com/doc/refman/en/document-store.html.
For more information about the X DevAPI see
https://dev.mysql.com/doc/x-devapi-userguide/en/.

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see
https://dev.mysql.com/doc/index-connectors.html.

For more information on the APIs provided with MySQL Shell
see https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/
and https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/.

Using MySQL Shell’s SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.12, see
the “Generally Available (GA) Releases” tab at http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see
http://bugs.mysql.com/

Enjoy!

Changes in MySQL Shell 8.0.12 (2018-07-27, General Availability)

Functionality Added or Changed

* Important Change: An RPM package for installing ARM
64-bit (aarch64) binaries of MySQL Shell on Oracle Linux
7 is now available in the MySQL Yum Repository and for
direct download.
Known Limitation for this ARM release: You must enable
the Oracle Linux 7 Software Collections Repository
(ol7_software_collections) to install this package, and
must also adjust the libstdc++7 path. See Yum’s Platform
Specific Notes
(http://dev.mysql.com/doc/refman/8.0/en/linux-installatio
n-yum-repo.html#yum-install-platform-specifics) for
additional details.

* MySQL Shell now enables you to store user credentials in
an operating system specific secret store. You can then
enter a MySQL user’s password during connection and store
it for future connections. Currently the following secret
stores are supported:

+ MySQL login-path

+ MacOS keychain

+ Windows API
(Bug #23304789, Bug #81484)

* The way you access the online Shell help has been
standardized. Use the \help pattern command to search the
help. The scope of the command has been increased to
support retrieving help for the following categories:

+ Class and function help for the Admin API, X DevAPI
and Shell API. Previously, to retrieve help for API
objects, you had to create an instance of the object
and use the object.help() method.

+ SQL syntax help, provided that a global session
object exists.
Wildcards can now be used to search for help. A number of
additional bugs relating to incomplete help information
have also been fixed. (Bug #23255291, Bug #81277, Bug
#24963435, Bug #25732663, Bug #85481, Bug #25739522, Bug
#85511, Bug #25739664, Bug #85514, Bug #26393155, Bug
#86950, Bug #24943074, Bug #26429399, Bug #87037, Bug
#27870491, Bug #90455, Bug #27870503, Bug #90456, Bug
#27875150, Bug #90474, Bug #24948933, Bug #83527)

* The util.checkForServerUpgrade() operation has an
additional outputFormat parameter that you can specify
when running the utility. The utility can now generate
output in two formats:

+ TEXT format, which is the default. This option
provides output suitable for humans, as previously
returned by the utility.

+ JSON format. This option provides output suitable
for machines, which can be parsed and processed for
various further use cases.

* The cluster.removeInstance() command has been improved,
with the following changes:

+ A new interactive option has been added to enable or
disable interactive mode for the command. The output
displayed in interactive mode has been improved,
displaying more useful information.In interactive
mode, you are prompted to continue with the removal
of the instance (or not) in case it is not
reachable.

+ The operation now ensures that the instance is
removed from the metadata of all the cluster members
and itself. This only applies to ONLINE members.

+ A new global option dba.gtidWaitTimeout is available
to define the timeout to wait for transactions
(GTIDs) to be applied when required by AdminAPI
commands. If the timeout value defined by
dba.gtidWaitTimeout is reached when waiting for the
cluster transactions to be applied for
cluster.removeInstance() and force: false (or not
defined) then an error is issued and the operation
aborted. When force: true then the operation
continues and does not generate an error.
References: See also: Bug #27817894.

* When using the ipWhitelist to define which servers could
access the cluster, the internal user accounts were not
matching the whitelist. Now AdminAPI applies the same
filtering logic from ipWhitelist for the internal
administrative accounts.
References: See also: Bug #26140094, Bug #28165891.

* In order to be compliant with the X DevAPI specification,
the following changes have been made:

+ Collection.modify(condition).arrayDelete() and
Collection.modify(condition).merge() have been
deprecated.

+ Collection.find().limit(x).skip(y) has been renamed
to Collection.find().limit(x).offset(y).

+ Collection.find().limit(x).skip(y) has been
deprecated.

+ Collection.find().limit(x).offset(y) has been
implemented.

+ BaseResult.getAffectedItemsCount() has been
implemented.

+ BaseResult.getWarningCount() has been deprecated.

+ BaseResult.getWarningsCount() has been implemented.

+ Result.getAffectedItemCount() has been deprecated.

+ SqlResult.getAffectedRowCount() has been deprecated.

+ SqlResult.nextDataSet() has been renamed to
SqlResult.nextResult().

+ SqlResult.nextDataSet() has been deprecated.

+ SqlResult.nextResult() has been implemented.

Bugs Fixed

* The sample prompt theme files for MySQL Shell were
deployed to an incorrect location on the Windows
platform, in the root install folder. The files are now
correctly deployed in the \share\mysqlsh\prompt
sub-folder. (Bug #28188761)

* The cluster.forceQuorumUsingPartitionOf() operation sets
the group_replication_force_members variable on the
target instance to force a new group membership and
restore the quorum, but it did not reset the value of the
variable at the end of the process. Consequently, if
Group Replication later needed to be restarted on the
target instance it failed because the
group_replication_force_members variable was still set.
Now, the group_replication_force_members variable is
reset to an empty string at the end of the
cluster.forceQuorumUsingPartitionOf() operation. (Bug
#28064621)

* When upgrading from version 1.0.11 to version 8.0.11 of
MySQL Shell on Linux, the upgrade failed if the original
package was the community edition and the new package was
the commercial edition, or vice versa. Upgrading from one
edition to the other edition is now enabled. (Bug
#28037407)

* The util.checkForServerUpgrade() operation can now use
either an X Protocol connection or a classic MySQL
protocol connection. (Bug #28027707)

* The checkForServerUpgrade() operation to verify upgrade
prerequisites included an unnecessary check relating to
ZEROFILL and display length attributes in columns. The
check has now been removed. (Bug #27927641, Bug #90634)

* Some messages displayed by MySQL Shell were showing a
MySQL server version that does not exist. (Bug #27924694)

* For sessions using the classic MySQL protocol, if the
session_track_gtids system variable is set on the server
to capture and return GTIDs to the client, MySQL Shell
now displays the GTIDs for successfully committed
transactions. The returned GTID values are also now
recorded in tracing information. (Bug #27871148)

* When the defaultMode MySQL Shell configuration option had
been set with the –persist option, batch code execution
from a file was always attempted using the specified
default language, even if the file extension indicated a
different supported language. Now when a file is loaded
for batch processing using the –file or -f option, files
with the extensions .js, .py, and .sql are processed in
the appropriate language mode, regardless of the set
default language. (Bug #27861407)

* The methods provided in the shell.options configuration
interface to set and save persistent option values used
underscores in JavaScript as well as in Python mode. The
methods have now been changed to
shell.options.setPersist() and
shell.options.unsetPersist() in JavaScript to follow the
appropriate naming convention. (Bug #27861141)

* When executing a SQL script using MySQL Shell, delimiters
( such as the default semi-colon character) present in
multi-line comments caused execution to fail. Delimiters
are now ignored inside multi-line comments. (Bug
#27841719)

* MySQL Shell returned an error when querying timestamp
values that were zero, because a zero value for the month
or day in a date was not accepted. Zero timestamp values
can now be used without producing an error. (Bug
#27833822, Bug #90355)

* The shell.getSession() function returns a reference to
the session global object representing the already
established connection between MySQL Shell and a MySQL
server, known as a global session. MySQL Shell now
gracefully handles the situation where the function is
called when no global session has yet been established.
(Bug #27809310)

* It was possible to use AdminAPI operations on server
instances running an incompatible version of MySQL. (Bug
#27765769)

* The setting of the bind_address variable is no longer a
requirement. (Bug #27765484)

* When creating a cluster or adding an instance, if the
localAddress option is not specified, the port used for
group_replication_local_address is automatically assigned
with the value: port * 10 + 1. However, if the resulting
port determined by the previous rule was already in use
then a random port was generated and used. Now MySQL
Shell checks that the group_replication_local_address
port is available, and fails if it is not. (Bug
#27758041)

* The MySQL Shell application icon on Microsoft Windows was
not being displayed for the MySQL Shell 8.0 GA release,
due to an incorrect association introduced for the icon
during code refactoring. The icon is now displayed
correctly. (Bug #27746532)

* The dbPassword option is no longer valid in the options
dictionary of all AdminAPI commands. (Bug #27745106)

* The \status (\s) command in MySQL Shell now displays full
information about the version and build of the connected
MySQL server. (Bug #27740420)

* The check for reserved keywords carried out by the
util.checkForServerUpgrade() operation was updated to
match the list of reserved keywords for the MySQL 8.0 GA
release. (Bug #27724201)

* When handling escape sequences, MySQL Shell now
identifies and skips over SQL comments and string
literals within quotation marks. (Bug #27665229)

* Python’s mapping type has been added to MySQL Shell, so
that dictionary syntax can be used to interact with data
in Python mode. (Bug #27614110)

* When a file was redirected to standard input for
execution in MySQL Shell, on Unix, the first part of the
file was taken as being the password. The password prompt
now looks for user input first before resorting to
standard input. (Bug #27572380)

* It was possible to use the
dba.forceQuorumUsingPartition() operation on a cluster
which had not lost quorum. (Bug #27508698)

* The help message for
dba.rebootClusterFromCompleteOutage() operation was
incorrectly suggesting to use
dba.forceQuorumUsingPartition(). (Bug #27508627)

* If Ctrl + C was entered or an unexpected error occurred
at a password prompt in MySQL Shell, the terminal state
was not restored correctly afterwards. (Bug #27379834)

* The dba.rebootClusterFromCompleteOutage() operation was
creating a new user on the target instances, which could
lead to the existence of an increasing number of users.
The fix ensures that these users are not created by the
dba.rebootClusterFromCompleteOutage() operation. (Bug
#27344040)

* Now when you issue dba.getCluster() and retrieve a
cluster without quorum a warning is issued in addition to
the log message. (Bug #27148943)

* The memberSslMode option could be used with
cluster.addInstance() and cluster.rejoinInstance()
operations but if you specified a different value than
the one used at cluster creation an error was thrown. Now
set the SSL mode at the cluster level only, in other
words when issuing dba.createCluster(). The memberSslMode
option has been removed from cluster.addInstance() and
cluster.rejoinInstance(). (Bug #27062122)

* When you issued dba.configureLocalInsance() on an
instance, it configured the disabled_storage_engines
variable with the MyISAM, BLACKHOLE, FEDERATED, CSV, and
ARCHIVE storage engines to ensure that the storage engine
was set to InnoDB, as required by Group Replication. The
change to this option was not being reported correctly by
AdminAPI, and hence the required restart after changing
the disabled_storage_engines variable was not clear. This
change was deemed a recommendation, rather than a
requirement, hence dba.configureLocalInsance() no longer
configures disabled_storage_engines. (Bug #26754410)

* Creating a cluster using an account which was missing the
global grant option failed with an ambiguous error
message, even though dba.checkInstanceConfiguration() did
not return any errors. Now when you create a cluster, the
account being used to administer the cluster is checked
to ensure that it has the global grant option. (Bug
#25966235)

* MySQL Shell is able to automatically reconnect global
session when running in the interactive mode, but
AdminAPI methods lacked this feature. This resulted in
you having to reconnect manually. Now, the AdminAPI
methods which utilize the global session object have been
improved in order to detect an interrupted session and
trigger the reconnection mechanism. The Cluster object
uses its own internal session instance, which does not
support automatic reconnection. If connection to the
cluster is lost, you need to manually recreate the
Cluster object. (Bug #24702489)

* In the event of a whole cluster stopping unexpectedly,
upon reboot the memberSslMode was not preserved. In a
cluster where SSL had been disabled, upon issuing
dba.rebootClusterFromCompleteOutage() this could prevent
instances from rejoining the cluster. (Bug #90793, Bug
#27986413)

On Behalf of the MySQL/Oracle Release Engineering Team,
Hery Ramilison

Categories: Web Technologies

Pages