to an LRU scan that occurred when removing the table’s adaptive hash index entries (Bug #68184). The remapping of TRUNCATE TABLE  to DROP TABLE  and CREATE TABLE  in MySQL 8.0 avoids the problematic LRU scan. 

TRUNCATE TABLE  can be used with Performance Schema summary tables, but the effect is to reset the summary columns to 0 or NULL , not to remove rows. See Section 27.12.20, “Performance Schema Summary Tables” . 

Truncating an InnoDB  table that resides in a file-per-table tablespace drops the existing tablespace and creates a new one. As of MySQL 8.0.21, if the tablespace was created with an earlier version and resides in an unknown directory, InnoDB  creates the new tablespace in the default location and writes the following warning to the error log: The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location . Known directories are those defined by the datadir , innodb_data_home_dir , and innodb_directories  variables. To have TRUNCATE TABLE  create the tablespace in its current location, add the directory to the innodb_directories  setting before running TRUNCATE TABLE . 

## 13.2 Data Manipulation Statements 

## 13.2.1 CALL Statement 

CALL sp_name ([ parameter [,...]]) CALL sp_name [()] 

The CALL  statement invokes a stored procedure that was defined previously with CREATE PROCEDURE . 

Stored procedures that take no arguments can be invoked without parentheses. That is, CALL p()  and CALL p  are equivalent. 

CALL  can pass back values to its caller using parameters that are declared as OUT  or INOUT  parameters. When the procedure returns, a client program can also obtain the number of rows affected for the final statement executed within the routine: At the SQL level, call the ROW_COUNT()  function; from the C API, call the mysql_affected_rows()  function. 

For information about the effect of unhandled conditions on procedure parameters, see Section 13.6.7.8, “Condition Handling and OUT or INOUT Parameters” . 

To get back a value from a procedure using an OUT  or INOUT  parameter, pass the parameter by means of a user variable, and then check the value of the variable after the procedure returns. (If you are calling the procedure from within another stored procedure or function, you can also pass a routine parameter or local routine variable as an IN  or INOUT  parameter.) For an INOUT  parameter, initialize its value before passing it to the procedure. The following procedure has an OUT  parameter that the procedure sets to the current server version, and an INOUT  value that the procedure increments by one from its current value: 

CREATE PROCEDURE p (OUT ver_param VARCHAR(25), INOUT incr_param INT) BEGIN # Set value of OUT parameter SELECT VERSION() INTO ver_param; # Increment value of INOUT parameter SET incr_param = incr_param + 1; END; 

Before calling the procedure, initialize the variable to be passed as the INOUT  parameter. After calling the procedure, you can see that the values of the two variables are set or modified: 

mysql> SET @increment = 10; 

